| View previous topic :: View next topic |
| Author |
Message |
harry Contributor


Joined: 01 May 2003 Posts: 61
|
Posted: Wed Oct 17, 2007 5:48 pm Post subject: absolute no matter what stop program |
|
|
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 |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Wed Oct 17, 2007 6:14 pm Post subject: |
|
|
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 |
|
 |
harry Contributor


Joined: 01 May 2003 Posts: 61
|
Posted: Wed Oct 17, 2007 8:10 pm Post subject: |
|
|
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 |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Wed Oct 17, 2007 8:56 pm Post subject: |
|
|
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 |
|
 |
harry Contributor


Joined: 01 May 2003 Posts: 61
|
Posted: Wed Oct 17, 2007 9:25 pm Post subject: |
|
|
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 |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Thu Oct 18, 2007 5:56 pm Post subject: |
|
|
Use a timer can be stopped with the TIMER stop,<n> command.
I was glad to help, even if in a small way.  _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Oct 18, 2007 7:45 pm Post subject: |
|
|
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 |
|
 |
harry Contributor


Joined: 01 May 2003 Posts: 61
|
Posted: Thu Oct 18, 2007 8:06 pm Post subject: |
|
|
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 |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Fri Oct 19, 2007 9:32 am Post subject: |
|
|
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 |
|
 |
harry Contributor


Joined: 01 May 2003 Posts: 61
|
Posted: Fri Oct 19, 2007 3:15 pm Post subject: |
|
|
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 |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Oct 19, 2007 8:02 pm Post subject: |
|
|
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  _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
harry Contributor


Joined: 01 May 2003 Posts: 61
|
Posted: Fri Oct 19, 2007 8:50 pm Post subject: |
|
|
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 |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sat Oct 20, 2007 6:01 am Post subject: |
|
|
| 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 |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sat Oct 20, 2007 7:47 pm Post subject: |
|
|
Still the same wife, still the same kids, still the same headaches, just we're all older now.. 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.
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 |
|
 |
harry Contributor


Joined: 01 May 2003 Posts: 61
|
Posted: Sat Oct 20, 2007 10:55 pm Post subject: |
|
|
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 |
|
 |
|