OnEvent>Custom,SubroutineName,VariableName,Subroutine
Custom Trigger - runs given subroutine periodically and triggers when specified variable = TRUE
Code: Select all
OnEvent>CUSTOM,MyTriggerSub,DoIT,DoSomething
If>OK=1
Gosub>MyTriggerSub
Endif
SRT>MyTriggerSub
//This custom trigger monitors a registry key value
RegistryReadKey>HKEY_CURRENT_USER,Software\MySoft,MyValue,res
If>res=FIRE
Let>DoIT=TRUE
Endif
END>MyTriggerSub
SRT>DoSomething
//reset the registry key and do something
RegistryWriteKey>HKEY_CURRENT_USER,Software\MySoft,MyValue,IDLE
//do something else
Let>DoIT=FALSE
END>DoSomething
1. Does OnEvent> runs the MyTriggerSub periodically?
2. How periodically? Every 5 seconds? Every 10 seconds? Every 30 seconds?...etc.
3. Can other part of code call MyTriggerSub such as Line 3 above still trigger the OnEvent?