而不显示被告席上运行它使用AppleScript另一个应用程序 [英] Run another application using AppleScript without showing it on the dock

查看:154
本文介绍了而不显示被告席上运行它使用AppleScript另一个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用AppleScript,你可以创建一个运行其他应用程序的脚本,然后将该脚本本身保存为一个应用程序并将其放置在被告席上。这个问题(而不是一个真正的问题)是,当你点击它,它仍然会在被告席上的其它应用。是否有可能prevent从被告席显示其他应用程序,但显示其作为GUI执行时它通常会做什么?

Using AppleScript you can create a script that runs another application, and then save that script itself as an application and place it in the dock. The problem (not really a problem) is that when you click it, it will still show the other application on the dock. Is it possible to prevent the other application from showing in the dock, yet show its GUI as it would normally do when executed?

感谢

推荐答案

我能想到的是实际修改其他应用程序唯一的解决办法已经没有Dock图标。它的工作原理,但它是讨厌的:结果
•是的,你直接修改从您的脚本其他应用程序而不是做一些事情。结果
•因此,会在每次发布会上说其他的应用程序,而不是调用的改变,从你的脚本。结果
•它的 $ P $由具有菜单栏的(虽然键连击和任何窗口的控制仍然有效)。结果

The only solution I can think of is to actually modify the 'other app' to have no Dock icon. It works, but it's nasty:
•Yep, you're directly modifying the other app—not doing something from your script.
•Accordingly, it will change every launch of said other app, not just invocation from your script.
•It prevents OtherApp from having a menubar (though key combos and any in-window controls will still work).

它很容易,虽然逆转,几乎总是可以通过添加一个GUI模式标志应用程序的Info.plist文件刚刚做:

It's easily reversed though, and can almost always be done just by adding a GUI mode flag to the app's Info.plist file:


  1. 右手或Ctrl键单击其他应用程序,并选择显示包内容

  2. 打开内容文件夹

  3. 在您选择的文本/ XML编辑器*
  4. 打开的Info.plist
  5. 添加以下两行,上面写着第一行之后<&字典GT; 结果
    <密钥GT; NSUIElement< /键> 结果
    <真/>

  6. 保存,然后火起来的应用程序。记住…没有菜单栏,因此使其窗口确定一个人集中精力,-Q,当你确认它没有Dock图标运行到退出。

  1. Right- or Ctrl-click the other app and Choose 'Show Package Contents'
  2. Open the 'Contents' folder
  3. Open the Info.plist in your text/xml editor of choice*
  4. Add these two lines right after the first line that says <dict>
    <key>NSUIElement</key>
    <true/>
  5. Save, then fire up the app. Remember… no menubar, so make sure one of its windows has focus and -Q to quit when you verify it runs with no Dock icon.

*如果你是娇气与编辑XML,或者如果plist文件是二进制多种,你会需要一个专门的plist编辑器。苹果自己的属性列表编辑器是包含在他们的自由开发工具的。

*If you're squeamish with editing xml, or if the plist file is the binary variety, you'll need a dedicated plist editor. Apple's own Property List Editor is included with their free Dev Tools.


  1. 一个孩子添加到根(信息属性列表)。

  2. 设置的名称 NSUIElement

  3. 从编辑(或上下文)菜单,值类型设置为布尔值。

  4. 单击该复选框(设置布尔为true)。

这篇关于而不显示被告席上运行它使用AppleScript另一个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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