I'm trying to create a custom generic Xcode behaviour, that once invoked will launch a script to generate AppleDoc documentation related to the current project opened in the ide.
I initially asked this question: Xcode 4: custom behavior does not execute my sh script? which helped me to understand what I was missing: it's not possible to use Xcode variables in external scripts! So, my new question is: how can I use AppleScript to retrieve the informations I need (Project name, company, paths...)? I'm pretty sure that this is possible, since Xcode is highly "scriptable", but so far I was able to retrieve only the name of the xcode project file:
tell application "Xcode"
tell active project document
name
end tell
end tell
The code above returns "MyProject.xcodeproj". I'm a totally newbie when it comes to AppleScript and it's hard for me to understand the reference in Xcode.sdef (the hierarchy seems pretty simple, but I'm unable to create the right script to retrieve what I want).
Can you give some hints or point me to a newbie-proof tutorial about AppleScript + Xcode?
(I didn't find nothing but "hello world" for Finder examples :P)