Something very strange is going on with my program. I’m trying to control and get data from iTunes on a remote computer using remote apple events.
Here are some snippets that work and don’t work.
This works in Applescript Editor and in an Applescript Studio app but doesn’t in my ApplescriptObjC app in xcode:
set theIP to "192.168.1.1.xxx"
tell application "iTunes" of machine ("eppc://" & theIP)
using terms from application "iTunes'
playpause
end using terms from
end tell
The above script also doesn’t work in my ApplescriptObjC app when I include the username and password.
This works in every case but for obvious reasons (the IP address changes from user to user) I cannot use this in my final ApplescriptObjC app:
tell application "iTunes" of machine "eppc://username:password@192.168.1.xxx"
using terms from application "iTunes'
playpause
end using terms from
end tell
I get the IP address using
choose URL
and then I remove the afp:// and port number using text item delimiters.
I basically need the ApplescriptObjC app to talk to iTunes on a remote machine at a dynamic IP address.
Thanks for any help!
EDIT: Sorry, I should note that when I say it doesn’t work, I mean I get an error saying “Can’t find remote machine.”