Re: Quit a remote application
Re: Quit a remote application
- Subject: Re: Quit a remote application
- From: Axel Luttgens <email@hidden>
- Date: Sat, 01 May 2004 19:36:24 +0200
Gnarlodious wrote:
Entity Nigel Smith spoke thus:
tell application "System Events" of machine "eppc://nigel:pwd@127.0.0.1"
to exists process "Adobe Photoshop 7.0"
So I'm trying to quit Entourage on a remote machine.
tell application "System Events" of machine
"eppc://Rachel:bugaboo@Gnarlodious-Cube" to exists process "Microsoft
Entourage"
which works even though the disk isn't mounted (cool).
Now I want to extract the boolean, but this doesn't work:
set appState to (tell application "System Events" of machine
"eppc://Rachel:bugaboo@Gnarlodious-Cube" to exists process "Microsoft
Entourage")
So what's the trick?
It seems that one needs a tell block instead of a single tell statement:
tell application "System Events" of machine "eppc://Rachel:bugaboo@Gnarlodious-Cube"
set X to exists process "Microsoft Entourage"
end tell
Don't ask me why.
But works here for me with various apps.
Next, I want to quit Entourage but this doesn't work (no response):
tell application "System Events" of machine
"eppc://Rachel:bugaboo@Gnarlodious-Cube" to tell application "Microsoft
Entourage" to quit
And neither does this:
tell application "Microsoft Entourage" of machine
"eppc://Rachel:bugaboo@Gnarlodious-Cube" to quit
which sends error "application not running" even though it is.
Tried here with BBEdit.
The second form (eg. "tell application "BBEdit" of ... to quit") works,
but afterwards comes a complaint about the process not being found on host.
Unless a dialog appears before quitting (for example, because of an
unsaved document).
Perhaps not really a problem, as it is possible to use a try block.
Same behavior with TextEdit.
Would be interesting to know why.
Axel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.