This might be a really dumb question but i can't find the answer to it.
I'm writing a python script that will loop trying a certain action for 30s. Every 10 seconds or so i want to trigger an event.
Here is some basic code as its probably easier to understand
Code: Select all
while os.path.exists(eg.globals.driveLetter+":") == False:
if i == 1 or i == 10 or i == 20:
eg.TriggerEvent("Start_"+eg.globals.driveLetter.upper())
print " Start_"+eg.globals.driveLetter.upper()+" "+str(i)
elif i == 30:
print "Breaking "+str(i)
break
i = i + 1
print "Sleeping "+str(i)
time.sleep(1)
Eg
...
Trigger
Trigger
Trigger
Is there anyway to Trigger the event inline or call a macro from within my script and then return to the script after?
Or will i have to put all the plugin commands directly into the script?
Thanks.