Re: Xcode and applescript
Re: Xcode and applescript
- Subject: Re: Xcode and applescript
- From: Philip Aker <email@hidden>
- Date: Sun, 10 May 2009 20:48:21 -0700
On 2009-05-10, at 16:07:08, Dmitry Markman wrote: suppose I have a project that have 2 targets and first target has second target as a dependency then when I try to run the following script
set posix_project_t_path to "/Users/dima/Projects/AppleScript/AppleScriptTest/AppleScriptTest.xcodeproj" set project_t_path to POSIX file posix_project_t_path
tell application "Xcode" open project_t_path set my_project to project of active project document tell my_project set target1 to target "AppleScriptTest" end tell set dep1 to get target dependencies of target1 log (get class of dep1) log (get length of dep1) set dp to get item 1 of dep1 log dep1 log dp end tell
I'm getting an error (at the line "log dp")
There are lots of quirks and bugs in Xcode scripting. Below is the closest I can get without parsing the project file as a plist.
set targ_name to "AppleScriptTest"
-- do shell script "open /Users/dima/Projects/AppleScript/AppleScriptTest/AppleScriptTest.xcodeproj" set res to {} tell application "Xcode" tell project 1 tell target targ_name set end of res to "TARGET_ID: " & id tell item 1 of target dependencies set end of res to "DEPENDENCY_ID: " & id end tell end tell end tell end tell res
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.
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