Applescript应用程序将向多个应用程序添加键/值对
我的目标是创建一个拖放AppleScript应用程序,它将替换应用程序info.plist文件中的nsielement键/值对。这将有效地从Dock&application Switcher中隐藏应用程序图标 到目前为止,这将在ƒContents中创建一个名为“Info.plist.plist”的额外“Info.plist”文件,其中nsielement值是唯一的键/值对(它不会扩展原始文件)。你能提出一个解决方案吗Applescript应用程序将向多个应用程序添加键/值对,applescript,Applescript,我的目标是创建一个拖放AppleScript应用程序,它将替换应用程序info.plist文件中的nsielement键/值对。这将有效地从Dock&application Switcher中隐藏应用程序图标 到目前为止,这将在ƒContents中创建一个名为“Info.plist.plist”的额外“Info.plist”文件,其中nsielement值是唯一的键/值对(它不会扩展原始文件)。你能提出一个解决方案吗 -- OS X 10.3.9 on open ItemList rep
-- OS X 10.3.9
on open ItemList
repeat with x in ItemList
set apppath to POSIX path of x
set infile to quoted form of (apppath & "Contents/Info.plist")
do shell script "defaults write " & infile & " 'NSUIElement' '1'"
end repeat
end open
我不确定我是否有足够的信息来给出答案,但我猜是这样的
do shell script "defaults write " & infile & " 'NSUIElement' '1'" with administrator privileges
会有用的 你为什么提到——OS X 10.3.9
?它是否在10.3.9上运行,或者脚本是否打算在10.3.9上运行?