Source language: Translate to:

Multiple Timer actions

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Multiple Timer actions

Postby NyperCro » Mon Jun 30, 2014 12:14 pm

Me again :)

Im wondering how to make multiple Timer actions or somehow delay action for xx seconds ?
I have a code in one Timer and i want without ending same Timer to start another Timer to delay an action and return to position where action stopped.

example :

Timer1

:time
.
.
FileWrite "[PubDir]tsr.bat" "All" "tasklist /fi [#34]USERNAME ne NT AUTHORITY\SYSTEM[#34] /fi [#34]STATUS eq running[#34] >[#34][PubDir]tsr.ch[#34]"
Run "[PubDir]tsr.bat" "" "RunOnce+Wait+Hidden" "" ""
FileRead "[PubDir]tsr.ch" "All" "[TskRead111]"

InternetPost "HTTP location" "finfo=[HDSerialNum]&data=[TskRead111]" "[OK1]" ""

FileErase "[PubDir]tsr.bat"
FileErase "[PubDir]tsr.ch"

IsAppRunning "[LOCATION]\program_sa.exe" "[Start]"

If "[Start]" "=" "True"

Timer2 = Here i need another timer to wait for a xx seconds and continue the script


GotoLine "time"


I hope you understand what i need
NyperCro
 
Posts: 20
Joined: Thu Dec 15, 2011 12:53 am

Re: Multiple Timer actions

Postby dec » Mon Jun 30, 2014 12:47 pm

Hello,

What about the "Delay" action?

Delay

Purpose:
Pause for a specified number of milliseconds.

Category:
Control

Syntax:
Delay "milliseconds"

milliseconds

Number of milliseconds to pause. A millisecond is one thousandth of a second. For a one second interval enter 1000 milliseconds. For one minute interval enter 60000 milliseconds.

Example:
Delay "2000"
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Multiple Timer actions

Postby NyperCro » Mon Jun 30, 2014 1:19 pm

Thank You, i didnt see that command
Does this hangs app or is similiar like timer ?
NyperCro
 
Posts: 20
Joined: Thu Dec 15, 2011 12:53 am

Re: Multiple Timer actions

Postby Neosoft Support » Tue Jul 01, 2014 10:00 am

Delay only affects the execution of the script. Otherwise, the app continues to accept keyboard, mouse input, etc.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Multiple Timer actions

Postby dpayer » Wed Jul 02, 2014 8:40 am

Neosoft Support wrote:Delay only affects the execution of the script. Otherwise, the app continues to accept keyboard, mouse input, etc.



So should it be possible to have several "Delay" commands and Timers working simultaneously?

Or, does NB only run one script at a time?
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Multiple Timer actions

Postby Neosoft Support » Wed Jul 02, 2014 10:05 am

So should it be possible to have several "Delay" commands and Timers working simultaneously?
Or, does NB only run one script at a time?


Yes, that should work. Multiple timers can execute their code concurrently. Watch the debugger to see how this works.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest