Re: Multiple copies of Citrix running
Re: Multiple copies of Citrix running
- Subject: Re: Multiple copies of Citrix running
- From: Philip Aker <email@hidden>
- Date: Fri, 25 May 2007 11:39:30 -0700
On 2007-05-25, at 09:36:47, has wrote: Philip Aker wrote:
The script is launched from the Mac OS scripts menu, and works fine when there is only one version of Citrix running. However, with Citrix it is possible to launch multiple versions of the applications and each version appears as a separate process, but with the same process name.
[...] tell application "System Events" to {name, unix id} of (item 1 of (every process whose frontmost is true))
That will give you the process id, but there's no way in AppleScript to target processes using that value. You can do it with appscript though, e.g.:
System Events will also give you the 'id' property (which is the PSN). Not to mention that an astute scriptor (such as yourself) should be able to grab the PSN from the command part of "ps -axwwopid,command|grep 'Citrix ICA Client'".
tell application "System Events" set plist to {name, id} of every application process set procs to item 1 of plist set psns to item 2 of plist repeat with p from 1 to count of procs if (item p of procs is "Mail") then set frontmost of process id (item p of psns) to true end if end repeat end tell
Cheers,
|
_______________________________________________
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