Remote applescript help.

When I do this:

set ipu1 to display dialog "Enter the adress of the target computer in the following format:" default answer "eppc://username:password@MachineName.local/" default button "OK"
		set ipu to text returned of ipu
tell application "Finder" of machine ipu
					activate
					display alert "hello."
end tell

I get an error: Finder got an error: «class ttxt» of {«class bhit»:“OK”, «class ttxt»:“what?”, «class gavu»:false} doesn’t understand the «event panSdisA» message. (-1708)

and Ican’t figure out why… Help?

I don’t know what else might be wrong but better syntex is this:


set ipu to text returned of (display dialog "Enter the address of the target computer in the following format:" default answer "eppc://username:password@MachineName.local/" default button "OK")
tell application "Finder" of machine ipu
	activate
	display alert "hello."
end tell

Hi,

you should use this syntax:

set ipu to text returned of (display dialog "Enter the address of the target computer in the following format:" default answer "eppc://username:password@MachineName.local/" default button "OK")
using terms from application "Finder"
	tell application "Finder" of machine ipu
		activate
		display alert "hello."
	end tell
end using terms from

There is a big difference between Panther and Tiger (I guess from your error message that you’re using Panther).
In Tiger, all scripting additions commands which put up a user interface are disabled from operating remotely

Also, Panther doesn’t support display alert.

I use tiger…

What version is on the remote machine?

tiger

right :D, I didn’t see that

hm, then you should get this error message actually:
Finder got an error: No user interaction allowed

I’m not sure about the error message (I do see a typo in the variable names though), but you should my post in this thread: display dialog over network

It doesn’t specifically mention alert, but that may be something to consider.