Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
User interface AppleScript不带主窗口的可可应用程序_User Interface_Command Line_Applescript - Fatal编程技术网

User interface AppleScript不带主窗口的可可应用程序

User interface AppleScript不带主窗口的可可应用程序,user-interface,command-line,applescript,User Interface,Command Line,Applescript,我试图在Xcode中创建Apple脚本Cocoa应用程序,但行为有些奇怪:我不想向用户显示任何GUI。本质上,它的命令行应用程序是用AppleScript编写的。我想我需要摆脱主窗口并管理事件循环。 任何指示都将受到高度赞赏 谢谢 David只需删除AppDelegate.xib上的窗口,但不要删除AppDelegate.xib文件,在AppDelegate.applescript中,您可以在 applicationWillFinishLaunching 区域 例如 有什么原因不能在Apple

我试图在Xcode中创建Apple脚本Cocoa应用程序,但行为有些奇怪:我不想向用户显示任何GUI。本质上,它的命令行应用程序是用AppleScript编写的。我想我需要摆脱主窗口并管理事件循环。 任何指示都将受到高度赞赏

谢谢
David

只需删除AppDelegate.xib上的窗口,但不要删除AppDelegate.xib文件,在AppDelegate.applescript中,您可以在

applicationWillFinishLaunching
区域

例如


有什么原因不能在AppleScript编辑器应用程序中执行此操作吗?如果您在Automator中将其作为应用程序编写,则不会有任何GUI。我需要.App bundle,我必须使用开发ID进行签名。应用程序通过命令行执行,并且不会显示任何GUI。
script AppDelegate
    property parent : class "NSObject"

    -- IBOutlets
    property theWindow

    on applicationWillFinishLaunching_(aNotification)
       -- Put your script Here       < --------------- Script Here
    end applicationWillFinishLaunching_

end script