告诉AppleScript的来建立X code ++项目 [英] Tell AppleScript To Build XCode Project
问题描述
下面是我想有以下步骤:
The following are the steps I would like to have:
- 公司X code
- 打开一个特定的X codeproj文件
- 构建和调试它
- 退出X $ C $ç
下面是写的AppleScript我第一次尝试:
The following is my first attempt to write AppleScript:
tell application "Xcode"
tell project "iphone_manual_client"
debug
end tell
close project "iphone_manual_client"
end tell
当x code有这个项目开盘这只适用。我想有该项目被打开时,才需要这么做。
This only works when xcode has this project opened. I would like to have the project to be opened only when it is necessary to do so.
可以在任意的AppleScript大师那里指向我正确的方向?谢谢你。
Can any AppleScript gurus out there points me to the right direction? Thanks.
-Chuan -
-chuan-
推荐答案
我想我设法解决这个问题。以下是AppleScript的:
I think I managed to solve it. The following is the AppleScript:
tell application "Xcode"
open "Users:chuan:Desktop:iphone_manual_client:iphone_manual_client.xcodeproj"
tell project "iphone_manual_client"
clean
build
(* for some reasons, debug will hang even the debug process has completed.
The try block is created to suppress the AppleEvent timeout error
*)
try
debug
end try
end tell
quit
end tell
这个路径是在格式:而不是/。现在唯一的问题是调试控制台已完成其工作后,AppleScript的似乎挂起,仿佛等待着什么发生。我需要做更多的研究来的AppleScript知道什么是错的脚本。
The path has to be in format of ":" instead of "/". The only problem now is that after the debug console has done its job, AppleScript seems to "hang" as though waiting for something to happen. I need to do more research on AppleScript to know what is wrong with the script.
这篇关于告诉AppleScript的来建立X code ++项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!