idea:
- in indigo a plugin runs that checks (every x seconds) a file (/users/yourid/documents/indigocommands/toIndigo) with commands from applescript to indigo
-- if the file is new or has a new line the plugin reads it and executes the requested command i.e. set variable to xx or dimmer etc.
-- write to file /users/yourid/documents/indigocommands/toApple the response from indigo
-- reset the file and wait for next command
in applescript:
- write requested commands to a file like this:
- Code: Select all
do shell script 'echo "set variable xx to yy" >> /users/yourid/documents/indigocommands/toIndigo'
do shell script 'echo "set device xx state yy to zz" >> /users/yourid/documents/indigocommands/toIndigo'
do shell script 'echo "get variable xx" >> /users/yourid/documents/indigocommands/toIndigo'
do shell script 'echo "get device xx state yy" >> /users/yourid/documents/indigocommands/toIndigo'
- read back result
- Code: Select all
set responseFromIndigo to do shell script 'cat /users/yourid/documents/indigocommands/toApple'
this concept bypasses the security issues with the applescript -> indigo interface.
Karl