If you'd looked at the dictionary for Xcode, you'd have seen that the build command needs an object to work on, and if you look a bit further you'll see that that object needs to be a project or a target. So:
tell application "Xcode"
local theResult
set myProject to active project document
try
set theResult to build the first target of myProject
on error m
set theResult to m
end try
return theResult
end
I recommend using error catching even when experimenting because I've found that when an error occurs XCode will tell you all about it and then quit which gets a bit tiresome.




LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks