Re: Multiple copies of Citrix running
Re: Multiple copies of Citrix running
- Subject: Re: Multiple copies of Citrix running
- From: has <email@hidden>
- Date: Fri, 25 May 2007 17:36:47 +0100
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.:
#!/usr/bin/env ruby
require 'appscript'
include Appscript
front_process = app('System Events').processes[its.frontmost].first
if front_process.name.get == 'Citrix ICA Client'
process_id = front_process.unix_id.get
app.by_pid(process_id).activate
end
HTH
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html
_______________________________________________
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