How can I remotely execute scripts using Messages?

I want to be able to remotely execute applescripts by sending messages from iMessage. I want to test who is sending the message (so it is secure), then execute the text that is received. I have tried using the message received handler for when a message is received, but it doesn't seem to work. How can I do this?

iMac, OS X Mountain Lion (10.8.4)

Posted on Jul 19, 2013 6:07 PM

Reply
6 replies

Jul 20, 2013 1:26 PM in response to Ontonator

Hi,


Your starter for 10.

Go to Hard Drive name/Library/Scripts/Messages


Open iTunes Remote Control.applescript in the AppleScript editor.


It has a disclaimer at the top saying you can modify it under certain conditions.

I would make a copy first and work on that.



User uploaded file
9:26 PM Saturday; July 20, 2013


 iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 Couple of iPhones and an iPad
"Limit the Logs to the Bits above Binary Images."  No, Seriously

Jul 21, 2013 11:53 AM in response to Ontonator

Umm,


I have the same AppleScript in iChat 5.x.x in the same folder in Snow Leopard. (well, actually it is in the iChat folder in the Scripts folder)


I even have it on my Leopard Computer for iChat 4.0.9 (again in the iChat folder).


We are talking about the Library folder seen at the top level of the Hard Drive (Along with System, Applications, Users) rather then the Home Folder/Library of the logged in User.



User uploaded file
7:53 PM Sunday; July 21, 2013


 iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 Couple of iPhones and an iPad
"Limit the Logs to the Bits above Binary Images."  No, Seriously

Jul 22, 2013 11:26 AM in response to Ontonator

HI,


At this point if you want to modify the Apple version to something you can use then I, like Barney-15E, would suggest the Community he mentioned.


Mac OS X Technologies

User uploaded file
7:26 PM Monday; July 22, 2013


 iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 Couple of iPhones and an iPad
"Limit the Logs to the Bits above Binary Images."  No, Seriously

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I remotely execute scripts using Messages?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.