Search code examples
postapplescriptitunes

Applescript listen for POST, and trigger iTunes


How would I, using Applescript, wait for data to be POSTed to it, and when it is, trigger iTunes to pause / play. I've figured out the iTunes part; but how would I do the other part?

Thanks!


Solution

  • I don't believe you can use AppleScript as an HTTP handler, so I'm not sure you can do this. You might be able to use Remote Events as described here to send a message to the machine from another Mac, but how you would do that from a non-Mac machine I'm not certain. I'd suggest using another web server program and calling out to itunes from it using AppleScript rather than trying to use AppleScript to directly receive HTTP calls.