0

如何使用苹果脚本隐藏mac系统上的excel文件。我正在使用以下一些步骤。

   tell application "Microsoft Excel"
       make new workbook 
       set visible to false
   end tell

此脚本运行成功并隐藏 excel 应用程序。但是请参阅 excel 文件中的实例 doklet 。我想在 docklet 中隐藏 excel 实例。如果 excel 实例隐藏在 docklet 中(一些设置跟随 Go to folder

  1. 应用
  2. 微软办公软件 2011
  3. 左键单击 Microsoft Excel
  4. 显示包装内容
  5. 内容
  6. 信息列表
  7. 点击添加新孩子
  8. 添加新子项是Application is Agent(UIElement) with check box true 如果按照某些步骤操作,则 excel 实例不会显示在 docklet 中,但不会隐藏 excel 文件。
4

1 回答 1

0

这将切换文件的可见性...

set f to choose file with invisibles
tell application "System Events"
    set visible of f to not (visible of f)
end tell

编辑:你可以用这个隐藏 Excel...

tell application "System Events"
    set visible of process "Microsoft Excel" to false
end tell
于 2012-12-13T12:25:10.370 回答