Telling Another Machine...

How do I tell another machine to start an application (on that machine)?

Both computers are running OS X (10.2.4).

I tried the following, but it beeped on my machine, not the other one:

set theMachine to machine "iMac"
set theApp to application "Finder" of theMachine
tell theApp
	beep
end tell

Thoughts?

Why does this work?

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?

It may have something to do with Apple’s built in security. I’m new to AppleScripting over a network connection, so I can’t offer much assistance.

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 !?!?!?!?!?!?!

thanks
thej