On Jul 17, 2008, at 11:13 AM, Kevin Cathey wrote: Phillip,
Actually, Phillip replied. I was the OP. :-) 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: set theBuildResult to build if theBuildResult starts with "Build succeeded" then launch end ifend tell
OK... but the "launch" call causes the executable to run. What I want to do is capture the output generated by the executable and use it back in the AppleScript world.
Phillip's suggestion was to drop down to a shell environment and use the "open" shell command to open my application. Unfortunately, this is not an option. My application will not execute from "open", it has to execute from XCode.
I'd like to do (using your example as a shell)
if theBuildResult starts with "Build succeeded" then set theExecutablesOutput to launch end if
But the results of the "launch" event is not the output of the program.
My hope is that XCode is recording the output of the program in some "well-known location" that I can grab and read. I need to know what that well-known location is though.
Scott
|