User interface AppleScript不带主窗口的可可应用程序
我试图在Xcode中创建Apple脚本Cocoa应用程序,但行为有些奇怪:我不想向用户显示任何GUI。本质上,它的命令行应用程序是用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
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