告诉AppleScript的来建立X code ++项目 [英] Tell AppleScript To Build XCode Project

查看:213
本文介绍了告诉AppleScript的来建立X code ++项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我想有以下步骤:

The following are the steps I would like to have:


  1. 公司X code

  2. 打开一个特定的X codeproj文件

  3. 构建和调试它

  4. 退出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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆