I have always used embedded scripts for my actions. But now some actions are taking longer than the 10 seconds allowed. So I would like some advice on how to convert my scripts to external files. I use both Applescripts and Python. My typical senario is to create a script file with lots of subroutines/handlers. I put them in the Indigo script/attachments directory or the python directory. Then from the actions I would call the subroutine as an embedded script. For example:
Example Script File in the Attachments Directory:
WindowBlinds.scpt
on openWindow(window)
…
end openWindow
on closeWindow(window)
…
end closeWindow
plus lots of supporting subroutines
end script
In the Indigo actions I would use an embedded script - triggered by a button press for example:
openWindow(1)
So how I do I convert that to an embedded file?
Do I write a one line program file to open a window?
Do I have to write a different file to open/close each window? - there could be a lot.
Is there a way to pass parameters to an external file? Indigo Variables?
How do you “import” the handlers from the Applescript? Python looks easier for import.
The example external script files seem to start and run forever. But I can not see how to apply that in my case.
Thanks.