Script after timeout

Advanced programming using WinTask scripting language

Script after timeout

Postby Betty on Wed Sep 19, 2012 7:21 am

Hi,
I’m currently running 10 scripts in my test environment, and I have a question regarding the #ExecTimeout and #ScriptAfterTimeout variables.
In my scripts I’m cheking the execution time and if it extends a certain value I’ll kill the script, my question is related to the script I’m running when the script is killed: Is it possible to make a generic “script after time out” so that it can also can write an entry to a logile referencing the rob that triggered the ScriptAfterTimeout? (I assume then that the kill script would have to accept parameters)
Betty
 
Posts: 22
Joined: Thu May 12, 2005 11:21 am

Re: Script after timeout

Postby TechSupport on Thu Sep 20, 2012 8:00 am

Hello,

Yes you can pass a parameter when you assign #ScriptAfterTimeout$. The code can be like that:
#exectimeout=10
#ScriptAfterTimeout$="killprocesses.rob "+chr$(34)+command$(0)+chr$(34)
StartBrowser("FF", "www.wintask.com", 3)
ret=UsePage("Bla Bla")


And in Killprocesses you know what is the script name where the error occurred using command$(1), like that:
msgbox(command$(1))
'Or you can store this information into a file.

Regards.
WinTask Tech Support
TechSupport
 
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am


Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron