set theMachine to machine "eppc://10.0.1.4"
tell application "Finder" of theMachine
display dialog "Boo"
end tell
But this doesn’t:
set theMachine to machine "iMac"
tell application "Finder" of theMachine
display dialog "Boo"
end tell
I wouldn’t care since it works, except that the “10.0.1.4” is assigned by the router and can change. How do I get something that works reliably even if the network id changes? How do I tell it to use a password so I’m not prompted when I run the script?
To add the username and password into the script do this {code snip}:
tell application “Finder” of machine “eppc://username:password@192.168.1.16”
mount volume “afp://username:password@192.168.1.1/OSX”
open folder “OSX:users:bob:documents”
end tell
the last half of the the first line specifies the protocol (eppc://) then specifies the username and password separated by a colon WITHOUT SPACES. That is followed by the machine name. In htis case an IP.
Mounting a volume uses the same username / password / machine designation as the first line. the volume name is added in this case (OSX).
Now just add the code to do your real work.
MY QUESTION TO THE APPLESCRIPT COMMUNITY
How in heck can this be done using any other app than the FInder !?!?!?!?!?!?!