forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


absolute no matter what stop program
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Wed Oct 17, 2007 5:48 pm    Post subject: absolute no matter what stop program Reply with quote

Ok , so i 've been trying to get a stop routine
that will work in a program with a long "wait" in a "repeat"
i have a
until @event(killbutton)
but that won't stop it when in the "wait"
anybody have a kill routine that will always work?

thanks
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Oct 17, 2007 6:14 pm    Post subject: Reply with quote

I think the 'wait' is the problem your experiencing here. I think that VDS
stops script execution until the wait interval expires. Here's something
to try ->

Code:

  repeat
    %%event = @event()
  until @condition(1)@equal(%%event,KillButton)

REM @condition(1) is NOT a function, just a placeholder for you primary
REM condition.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Wed Oct 17, 2007 8:10 pm    Post subject: Reply with quote

i thought
until @equal(%%event,KillButton)
was my primary condition?
i tried that a while back and it doesn't stop the progy

this progy sits and runs through at 180-900 seconds waiting until
files are made and then it renames & moves it for safe keeping

and i think your right vds does hang in the wait paramater.
when debugging you hit a button and nothing shows in "EVENT"
until the script continues
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Oct 17, 2007 8:56 pm    Post subject: Reply with quote

For me in any case, I use repeat loops with a counter. Since I wasn't sure
exactly what you were doing, I assumed that there was some other
possible condition to your loop. My mistake.

I think that you might be better off setting a TIMER event and then using
your apps primary Evloop to catch the 'KillButton' event. Use a variable to
track when the timer loop is running, and then kill the timer if the
'KillButton' event is fired.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Wed Oct 17, 2007 9:25 pm    Post subject: Reply with quote

so the timer can be interrupted/termanated with a key stroke?

your suggestions are helpful even if your not really knowing exactly what i'm doing ( and that includes me too) thanks
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Oct 18, 2007 5:56 pm    Post subject: Reply with quote

Use a timer can be stopped with the TIMER stop,<n> command.

I was glad to help, even if in a small way. Smile

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Oct 18, 2007 7:45 pm    Post subject: Reply with quote

I use a repeat myself and check the events each pass of the loop. That's always worked for me. Oh, and I usually have a "Wait 0.5" in there so I don't peg out the CPU.
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Thu Oct 18, 2007 8:06 pm    Post subject: Reply with quote

hey Garrett you still in tacoma??
anyway its good to see that lots of you guys are still here.
i don't use vds enough and its maybe a year or more between progys...
so thanks for answering my brain dead lamer questons.

harry
aka: george, a vds'er since 2.2

BTW: this is what finally worked for me,with no repeat,until or evloop
the goto and startover label are used instead.

:startover
rem do other stuff
:takeabreak
timer start,1,ctdown,00-00:00:10
wait event,
if @equal(@event(),killbutton)
goto killbutton
else
end
timer stop,1
goto startover

:Close
:KILLBUTTON
stop
Back to top
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Fri Oct 19, 2007 9:32 am    Post subject: Reply with quote

You have not got a ':timer1ctdown' label so if the timer ever counts down to zero you will get an error.
_________________
cheers

Dave
Back to top
View user's profile Send private message
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Fri Oct 19, 2007 3:15 pm    Post subject: Reply with quote

that no lablel thing (timer1ctdown)
doesn't seem to bother it . i've had the progy running for
about 14hours now and the timer goes off (completes its cycle)
every 3mins. to 9 mins depending on
if a file is found or not with no errors or chokes as of yet
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Fri Oct 19, 2007 8:02 pm    Post subject: Reply with quote

Down in Lakewood now, near the V.A. Hospital at American Lake, just to the side of FT Lewis, or tucked in there.

Like you also, I don't really use VDS much, except the occasional little project. So I've forgotten so much now Sad

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Fri Oct 19, 2007 8:50 pm    Post subject: Reply with quote

its good that there are some , lots of code samples here and on my
computers otherwise i'd be extra braindead with VDS by now.......

i'm sure you still have kids how about the wifetype? same one?

well i'm still a glassblower, also opened up a moped/scooter shop
about 4 years ago..... this last winter i hooked up with a old pal and him & i are the tech for 2 local community radio stations 1 a fcc sanctioned
fm station & 1 is a part15 am ( no license needed), i did all the station programing too & been using vds for all the other little tools needed.......
it's all local music(whidbey island) ,try the shoutcast stream...
209.166.94.197:8000 or port 8004 , one is for dialup and the other is
broadband.

_________________
most computer errors happen between the keyboard and the chair
Back to top
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Sat Oct 20, 2007 6:01 am    Post subject: Reply with quote

harry wrote:
no errors or chokes as of yet

Ahh yes, that's because your script does not have a "goto @event()' line.

_________________
cheers

Dave
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sat Oct 20, 2007 7:47 pm    Post subject: Reply with quote

Still the same wife, still the same kids, still the same headaches, just we're all older now.. Wink LOL

Actually, one of my kids turned 18 this year.... Figured they were all suppose to spread their wings when they turned 18 and get their own life!!! WRONG!!! Hahahahahahaaa.... It's all good though since we all get along great anyway, and he's good about pitching in work wise in the house or money wise if he has any.

So still doing the glass blowing, but added moped and radio to the mix eh? Seems actually like a good, fun and interesting mix of things to do. Smile

I've actually been spending most of my time playing an game online called "Freelancer". It's kind of a space sim thing similar to Eve, but much less complicated and much more fun, and also doesn't cost anything to play online. When I get bored of killing people all over the universe, then I either watch a movie, or dabble a bit in VDS or something else.

Speaking of which, I feel the urge to kill people in space coming on right now....... Cya!

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Sat Oct 20, 2007 10:55 pm    Post subject: Reply with quote

a 18 year old is not too bad....
i have a 33 year old thats been to iraq and back and now a grandson ....yeiks!! that'll age ya. oh well, at least i still have all
my hair!

_________________
most computer errors happen between the keyboard and the chair
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group