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


Joined: 14 Nov 2004 Posts: 151 Location: Raleigh NC
|
Posted: Sun Jul 10, 2005 11:12 pm Post subject: Help with EVLoop |
|
|
There is probably an easy way to do this but I am at a loss here. I need to have an action take place in a script im writing every 130 seconds. How can I make this happen since evloop only runs when an action has occurred? Is there a way to shell a series of functions or something similar?
WD _________________ K Wetzel
Programming - Technology - Communications
"The Home of the SLC Security Console"
SLC now available for Linux... |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Mon Jul 11, 2005 12:48 am Post subject: |
|
|
| Code: |
REM Place at the beginning of your script before your Evloop
REM 0-00:02:10 == 130 seconds
timer START,1,CTDOWN,0-00:02:10
dialog create,Dialog,...
dialog show
:Evloop
wait event
%E = @event()
goto %E
:Timer1CTDOWN
REM This is where you do any validation that you need, etc.
Info Timer expired!
goto Evloop
:CLOSE
timer stop,1
exit
|
Maybe this helps?... _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
webdaddy Contributor


Joined: 14 Nov 2004 Posts: 151 Location: Raleigh NC
|
Posted: Tue Jul 12, 2005 3:53 pm Post subject: Thanks |
|
|
I just checked that that did the trick. I knew it was something similar to that because I have seen that in others code or similar variations but I could'nt remember how to do it. Program is now functioning properly. Awesome! _________________ K Wetzel
Programming - Technology - Communications
"The Home of the SLC Security Console"
SLC now available for Linux... |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Jul 12, 2005 4:01 pm Post subject: |
|
|
You're welcome Kevin. Was glad to assist.  _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
webdaddy Contributor


Joined: 14 Nov 2004 Posts: 151 Location: Raleigh NC
|
Posted: Tue Jul 12, 2005 9:18 pm Post subject: Oh no |
|
|
I wanted the timer to run every 10 seconds or so but it seems to only run the first time that the program is run. Then it never runs the timer again. So basically regardless of whatever else is going on I want it to run every 5 seconds. Is that possible? I thought this would work but like I said it does it only once. Could I start the timer inside of EvLoop? _________________ K Wetzel
Programming - Technology - Communications
"The Home of the SLC Security Console"
SLC now available for Linux... |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Jul 12, 2005 9:41 pm Post subject: |
|
|
No. Because any event that is generated, especially at less that 5 second
intervals, will prolly cause an error because the timer is already running.
I would restart the timer at the end of your Timer1CTDOWN event label,
after doing your other processing but before returning to the Evloop. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
webdaddy Contributor


Joined: 14 Nov 2004 Posts: 151 Location: Raleigh NC
|
Posted: Wed Jul 13, 2005 1:42 am Post subject: Nice |
|
|
Thats exactly what I did 2 seconds after I posted. I basically stopped the timer after the timer1 code and then restarted it within evloop.
Thanks again for all your help. Your software rocks by the way. _________________ K Wetzel
Programming - Technology - Communications
"The Home of the SLC Security Console"
SLC now available for Linux... |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Wed Jul 13, 2005 2:16 am Post subject: |
|
|
| webdaddy wrote: | | Thanks again for all your help. |
Your welcome.
| webdaddy wrote: | | Your software rocks by the way. |
Thanks! Glad all my hard work isn't in vain.  _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
|