Hi,
I'm trying to write an applescript to execute actions on a remote machine.
I have one iMac Core Duo and a Mac mini G4 both installed with Mac OS 10.4.9.
The IP address of my mac mini is 192.168.1.61.
I wrote this script that I execute from my iMac:
If I run this script when Safari is already opened on the mac mini, it works fine (it sets a Safari window in the foreground).
But if Safari is NOT opened when I run the script, I get the following error:
Have the same behaviour with other applications. It works fine to send commands when they are already opened but I can't launch them.
According to the examples I found on the web, this should work...
Or? How do I launch an application on a remote machine using applescript?
Thanks
Benjamin
PS: I have another solution: run a ssh command to execute an applescript directly on the remote machine. But I'd like to understand why this doesn't work
I'm trying to write an applescript to execute actions on a remote machine.
I have one iMac Core Duo and a Mac mini G4 both installed with Mac OS 10.4.9.
The IP address of my mac mini is 192.168.1.61.
I wrote this script that I execute from my iMac:
Code:
set remMachine to "eppc://benjamin@192.168.1.61"
tell application "Safari" of machine remMachine to activate
If I run this script when Safari is already opened on the mac mini, it works fine (it sets a Safari window in the foreground).
But if Safari is NOT opened when I run the script, I get the following error:
Code:
Erreur d'AppleScript
Erreur dans Safari : Cannot find process on host
Have the same behaviour with other applications. It works fine to send commands when they are already opened but I can't launch them.
According to the examples I found on the web, this should work...
Or? How do I launch an application on a remote machine using applescript?
Thanks
Benjamin
PS: I have another solution: run a ssh command to execute an applescript directly on the remote machine. But I'd like to understand why this doesn't work