如何使用Applescript启用关于菜单栏项
我想知道如何在applescript上启用“关于我的应用程序”菜单栏项。我试过这个如何使用Applescript启用关于菜单栏项,applescript,Applescript,我想知道如何在applescript上启用“关于我的应用程序”菜单栏项。我试过这个 tell application "System Events" tell process "MyApp" set AboutApplication to {} repeat with AboutApplication in AboutApplication try set frontmost to true
tell application "System Events"
tell process "MyApp"
set AboutApplication to {}
repeat with AboutApplication in AboutApplication
try
set frontmost to true
set AboutApplication to enabled of menu item "About MyApp" of menu "Object" of menu bar item "Object" of menu bar 1
if activeMenuItem is true then
end if
end try
end repeat
end tell
end tell
但我很确定这是错的。
有人能告诉我如何启用它吗?
我认为你不能用AppleScript实现这一点
如果要创建AppleScriptObjC应用程序,则需要将适当的脚本添加到“关于”菜单项,并使用XCode GUI启用 如果您正在使用脚本编辑器编写一个简单的脚本,并且希望在另一个应用程序中启用一个菜单项,那么这是没有意义的,因为该应用程序在该菜单项后面没有任何代码。即使您能够启用菜单项本身,如果您单击它,也不会发生任何事情,最多也不会发生崩溃 这样做没有意义