Re: Applescript support in Xcode4
Re: Applescript support in Xcode4
- Subject: Re: Applescript support in Xcode4
- From: Deivy Petrescu <email@hidden>
- Date: Thu, 23 Jun 2011 11:06:34 -0400
On Jun 22, 2011, at 10:15 , Dmitry Markman wrote:
> Hu Deivy
>
> thanks for the answer
>
> I'm generating new project from scratch
> so delete every settings is basically NOP
>
> set value is working, believe it or not :-)
>
> I tried make new command but it didn't work:
> tell build configuration "Debug"
> make new build setting with properties {name:"SANDBOX", value:sandbox}
> end tell
> it's asking about missing parameter at for command make
>
> you should create empty project, then it will turn you projects as a list with 1 element
> you can as projects from application directly, but it will return the same list
>
>
> On Jun 22, 2011, at 9:55 AM, Deivy Petrescu wrote:
>
>> Dmitry,
>> I am surprised it worked in Xcode 3.
>> From what I understand you deleted every build setting, this should have deleted the "SANDBOX" setting as well.
>> So it is not surprise it can not set it to anything.
>>
>> Also, when I was running it here, I did not get a list when working with " my_work_space"
>> "item 1 of" returned an error
>
> Dmitry Markman
>
Dmitry,
I checked Xcode 3's dictionary and created a test project to test your script.
I am doing things by step, as I learn more I improve my scripts.
This is the way I normally work.
so here is a first step for Xcode 3, Xcode 4 will follow later.
This script
set project_path to "/Users/deivy/X_Projects/Window/Untitled.xcodeproj"
set project_file to POSIX file project_path as alias
set sandbox to "/path/to/sandbox"
tell application id "com.apple.Xcode"
open project_file
activate
set my_work_space to project document 1
tell my_work_space to tell its build configurations
return every build setting
end tell
end tell
gets me the following output:
{{build setting "ONLY_ACTIVE_ARCH" of build configuration id "C01FCF4F08A954540054247B" of project "Untitled" of application "Xcode", build setting "PREBINDING" of build configuration id "C01FCF4F08A954540054247B" of project "Untitled" of application "Xcode", build setting "ARCHS" of build configuration id "C01FCF4F08A954540054247B" of project "Untitled" of application "Xcode", build setting "GCC_OPTIMIZATION_LEVEL" of build configuration id "C01FCF4F08A954540054247B" of project "Untitled" of application "Xcode", build setting "SDKROOT" of build configuration id "C01FCF4F08A954540054247B" of project "Untitled" of application "Xcode", build setting "GCC_WARN_ABOUT_RETURN_TYPE" of build configuration id "C01FCF4F08A954540054247B" of project "Untitled" of application "Xcode", build setting "GCC_C_LANGUAGE_STANDARD" of build configuration id "C01FCF4F08A954540054247B" of project "Untitled" of application "Xcode", build setting "GCC_WARN_UNUSED_VARIABLE" of build configuration id "C01FCF4F08A954540054247B" of project "Untitled" of application "Xcode"}, {build setting "GCC_WARN_UNUSED_VARIABLE" of build configuration id "C01FCF5008A954540054247B" of project "Untitled" of application "Xcode", build setting "PREBINDING" of build configuration id "C01FCF5008A954540054247B" of project "Untitled" of application "Xcode", build setting "ARCHS" of build configuration id "C01FCF5008A954540054247B" of project "Untitled" of application "Xcode", build setting "GCC_C_LANGUAGE_STANDARD" of build configuration id "C01FCF5008A954540054247B" of project "Untitled" of application "Xcode", build setting "GCC_WARN_ABOUT_RETURN_TYPE" of build configuration id "C01FCF5008A954540054247B" of project "Untitled" of application "Xcode", build setting "SDKROOT" of build configuration id "C01FCF5008A954540054247B" of project "Untitled" of application "Xcode"}}
It seems that apparently now something is happening.
I get some errors with the script you said worked in Xcode 3
"active project document" does not work where you said it did.
let me know if you want to take this offlist.
Deivy Petrescu
email@hidden
_______________________________________________
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