Re: Getting "stdout" of an app launched by XCode through AppleScript
Re: Getting "stdout" of an app launched by XCode through AppleScript
- Subject: Re: Getting "stdout" of an app launched by XCode through AppleScript
- From: Philip Aker <email@hidden>
- Date: Thu, 17 Jul 2008 09:39:54 -0700
On 08-07-17, at 09:13, Kevin Cathey wrote:
Phillip,
This is actually surprising easy. What you need to do is get the
project you want to build. You can get this by either passing in a
name, or getting a list of the open projects and choosing from
there. Then, you need to make sure that project is open, that's as
simple as:
open theProjectPath
Then, once the project is open, to build the active target, and if
it succeeds, run the built executable, your AS will look something
like this:
tell theProject
set theBuildResult to build
if theBuildResult starts with "Build succeeded" then
launch
end if
end tell
That should do it.
That was Scott's question.
However, I'd like to ask about why Xcode is overloading the
AppleScript 'launch' keyword.
Please don't do that, it snubs convention and is probably illegal.
As a general note, many Cocoa apps don't handle the 'launch' event
properly, so that behavior should be corrected as well.
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