以下是我想要的步骤:
>启动xcode
>打开一个特定的xcodeproj文件
>构建和调试它
>退出xcode
以下是我第一次尝试编写AppleScript的方法:
tell application "Xcode" tell project "iphone_manual_client" debug end tell close project "iphone_manual_client" end tell
这只能在xcode打开此项目时有效.我希望只有在有必要的时候才能打开这个项目.
任何AppleScript大师可以指出我的方向正确吗?谢谢.
-chuan-
解决方法
我想我设法解决了.以下是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做更多的研究,以了解脚本有什么问题.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。