normally with ssh you can run (on the command line) 'ssh machine command' to run a command on a remote machine. so put a compiled applescript called 'testscript' in your home directory and try and run it from a remote (or even the local) machine:
ssh yourmac testscriptand it will run that applescript. however, while that applescript shows up in the dock, it seems to have no access to running processes.
ssh yourmac 'open testscript'the command above will instruct the running finder process to launch the applescript. see also the macosxhint Run an AppleScript from the command line and running applescripts via ssh? at macfixitforums.
Remote Eudora mail checking AppleScript:
tell application "Finder" to get creator type of every processi use the above applescript along with this in my .qmail file on my linux box to tell eudora to check mail only when i actually get new mail:
if result contains "CSOm" or result contains «class CSOm» then
tell application "Eudora 5.1 (OS X)"
connect with checking without sending and waiting
end tell
end if
./Mailboxnow, anyone know how to pass information to and receive from the applescript? no matter how the applescript exits (you can even put in a 'return' or and 'exit' statement in the script), the ssh command will always return 0 if the script was able to run.
|ssh mymac 'open /Users/rajiv/CheckMail.app'
Mac OS X Hints
http://hints.macworld.com/article.php?story=20011101024436520