dansays / homebridge-applescript

Applescript plugin for homebridge: https://github.com/nfarina/homebridge
20 stars 8 forks source link

Running external scripts #6

Open Ricardo1980 opened 8 years ago

Ricardo1980 commented 8 years ago

Just a suggestion, if it is not possible right now: The possibility to run an applescript that is in an external file.

clumsyCoder00 commented 8 years ago

I was able to run an external script file saved as an app with the code as follows in the config file:

` { "accessory": "Applescript", "name": "Nest Fan", "on": "tell application ''/Volumes/Media Drive/ownCloud/Documents/Hobbies/Computer/Software Files/Applescript/Alfred/Fan On.app'' to activate",

"off": "tell application ''/Volumes/Media Drive/ownCloud/Documents/Hobbies/Computer/Software Files/Applescript/Alfred/Fan Off.app'' to activate" }`

This runs a script app called "Fan On.app" with the "on" command and a file called "Fan Off.app" with the "off" command.

bradleyrawleigh commented 7 years ago

Yes. I've done something similar with iTunes and airplay device control through steps I found online from others with additional edits made myself. If you'd like I. An post additional examples.

bradleyrawleigh commented 7 years ago

Sorry. If you'd like I can post additional examples***