Re: User Scripts
Re: User Scripts
- Subject: Re: User Scripts
- From: Philip Aker <email@hidden>
- Date: Thu, 15 Jan 2009 17:43:49 -0800
On 2009-01-15, at 11:00:32, Andreas Grosam wrote:
how can I ensure that an application launched from a user script
will be put to the foreground and becomes the active application,
which possibly opens a modal dialog when it starts up?
I call this simple script:
#!/bin/sh
$HOME/Applications/DiffMerge.app/Contents/MacOS/DiffMerge -nosplash
"%%%{PBXFilePath}%%%"
The app not always launches in the foreground or is behind a Xcode
editor window, and it also does not always become the active
application. That is, Xcode still might be the active application,
but the launched tool may be in the foreground.
When started, the app opens a modal dialog - which might be the
culprit. Without causing the app to open a modal dialog at its start
up, all seems working well: it is put to the foreground and it also
becomes the active application.
I would like to use the command open instead, however, with open it
seems it is not possible to pass program arguments.
How can I accomplish this in an easy way?
Try this:
#!/bin/sh
$HOME/Applications/DiffMerge.app/Contents/MacOS/DiffMerge -nosplash "%%
%{PBXFilePath}%%%"
/usr/bin/osascript -e 'tell application "DiffMerge" to activate'
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >User Scripts (From: Andreas Grosam <email@hidden>) |