Page 1 of 1

Airfoil and Applescript

PostPosted: Sun Nov 12, 2017 10:17 am
by jltnol
So the following script works with just about any app I throw at it, but not Airfoil. I suspect it has something to do with the fact that Airfoil is some special kind of app, or not even an "app" at all in the traditional sense... It doesn't show up under Recent Apps, which was my first clue.
Basically, I'd like Indigo to launch Airfoil, which is not hosted on the Indigo server. This AppleScript has worked well, as it has both the username and password built into the script ( yes, not very safe..) but it works, and I can have Indigo do other things on remote Macs with Apple script

Code: Select all
set theRemoteMac to "eppc://jeffrey:Jbx&593@192.168.5.103"
tell application "Finder" of machine theRemoteMac
   open ("/Applications/Airfoil.app" as POSIX file as alias)
end tell

I've tried lots of combinations of the above script, and the one below, as it works when run on the Mac Airfoil is running on.... but still can't get this to work.

Code: Select all
tell application "Airfoil"
   activate
end tell


Since AppleScript is being degraded, and won't be around for long, ultimately, Python would probably be better, but all of my attempts to get this to work in python, don't. I've seen lots of examples of doing things with python on the computer the script is running, but not much on doing things on a remote computer.

Re: Airfoil and Applescript

PostPosted: Sun Nov 12, 2017 5:45 pm
by jay (support)
I just tried this and it worked:

Code: Select all
tell application "Finder" of machine "eppc://USERNAME:PASSWORD@FatBook.local"
   open alias "Macintosh HD:Applications:Airfoil.app:"
end tell

Re: Airfoil and Applescript

PostPosted: Sun Nov 12, 2017 9:08 pm
by jltnol
Jay
As usual... I can't thank enough for your help with this script. Your solution worked perfectly.

Regards


Jeffrey

Re: Airfoil and Applescript

PostPosted: Sun Nov 12, 2017 9:48 pm
by jay (support)
Glad it worked for you.