XActivate
            AppleScript でアプリケーションをアクティブにする際は、すべてのウインドウが前面に持ってこられますが、XActivate はメインウインドウだけを前面に持ってくることなど、オプションを指定してアプリケーションプロセスをアクティブにできます。
アプリケーションを隠すこともできます。
内部で Cocoa の NSRunningApplication を使用しています。
                  use scripting additions
                
                  use XActivate : script "XActivate"
                
                  tell XActivate
                
                  -- default behavior is bringing one window to forntmost.
                
                  do("com.apple.Safari")
                
                  delay 1
                
                  -- bringing all windows to frontmost by specifing "all_windows" parameter.
                
                  do({id:"com.apple.finder", all_windows:true})
                
                  delay 1
                
                  hide("com.apple.finder")
                
                  end tell
              更新履歴
- 1.0.1 -- 2020-02-05
                  
- OpenHelpBook.scptd is used to display a help book instead of HelpBook.osax.
 
 - 1.0 -- 2018-07-26
                  
- First release.