Re: Opening an applet on a remote mac
Re: Opening an applet on a remote mac
- Subject: Re: Opening an applet on a remote mac
- From: Axel Luttgens <email@hidden>
- Date: Sat, 02 Jan 2016 13:44:40 +0100
> Le 2 janv. 2016 à 00:33, Stockly, Ed a écrit :
>
> […]
>
> Is it possible to use remote scripting additions on installed on the remote mac?
>
> When I try to display a dialog on the remote mac I get this error:
>
> Finder got an error: Handler does not allow remote events.
>
> (The reason I’m using an app on the remote machine is that I couldn’t make sending a do shell script command work remotely.)
>
> ------
> set remoteMachineAddress to "eppc://" & remoteUsername & ":" & remotePassword & "@" & remoteSubnetAddress
> using terms from application "Finder"
> tell application "Finder" of machine remoteMachineAddress
> activate
> beep 2
> display dialog "?"
> set remoteHomeFolder to home
> set remoteApp to item ":Desktop:RemoteText" of remoteHomeFolder
> tell remoteApp to open
> end tell
> end using terms from
Indeed, various remote operations aren’t allowed for security reasons.
On the other hand, with the help of some already running application, it is possible to launch a remote application which may locally perform any allowed operation.
So, one could for instance devise a stay-open applet to be used as some kind of library.
As a very bare skeleton, save this one as "edstockly.app" on the remote machine’s desktop:
on displayDialog(Msg)
-- Should trap possible user cancel.
display dialog Msg
end displayDialog
On the local machine, one may then execute:
using terms from application "Finder"
tell application "Finder" of machine remoteMachine
open application file "edstockly.app" of desktop
end tell
end using terms from
tell application "edstockly" of machine remoteMachine
displayDialog("Hello")
quit
end tell
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden