Capture ID of running Trigger

Posted on
Sun Dec 31, 2017 5:07 am
jeremyjjr offline
Posts: 104
Joined: Sep 10, 2013
Location: St Albans, UK

Capture ID of running Trigger


I need a python trigger script to identify the ID of the parent or invoking trigger.

thisTrigger = indigo.triggers.???

Any ideas?



Posted on
Sun Dec 31, 2017 5:57 pm
jay (support) offline
Site Admin
User avatar
Posts: 16206
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Capture ID of running Trigger

Doesn't exist - currently actions executing aren't really connected to the event that caused them (at least within the server at runtime).

One way to fake it is to make your script a shared python function, then from your trigger rather than directly executing the script you call the function and pass in the ID of the trigger. So each trigger that you want to execute the function from would execute the following script (I'm assuming the name from the example above):

Code: Select all
import indigo_attachments
indigo_attachments.myTriggerFunction(IDOFTRIGGERHERE) # Insert the ID of the trigger calling this script

So, each trigger will have it's own script, but it'll just be the 2 lines above. All the real work is done in your shared function.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: Google [Bot] and 1 guest