InsertionLocator
            Finder で選択されている場所を取得する AppleScript モジュールです。
Finder の insertion location プロパティは、常に Finder ウィンドウのトップレベルを意味します。選択されているフォルダやリスト表示で表示されているサブフォルダを取得したい場合もあるでしょう。InsertionLocator はそれらを取得することができます。そして、アプリケーションにあわせて細かい振る舞いをカスタマイズすることができます。
                  use GUIScriptingChecker : script "GUIScriptingChecker"
                
                  use InsertionLocator : script "InsertionLocator"
                
                  if not do() of GUIScriptingChecker then
                
                  -- GUI Scripting is disable
                
                  return
                
                  end if
                
                  tell (make InsertionLocator)
                
                  -- It is assumed that a folder is selected in Finder window of icon view.
                
                  log do() -- if folder is selected, the item will be return.
                
                  log is_closed_folder() -- true
                
                  -- Folders whose contents are not shown should not be insertion location
                
                  log set_allow_closed_folder(false)'s do() -- return container of selected folder.
                
                  log is_closed_folder() -- false
                
                  end tell
              更新履歴
- 1.3.4 -- 2020-02-02
                  
- OpenHelpBook.scptd is used to display a help book instead of HelpBook.osax.
 - OS X 10.9 or later is required.
 
 - 1.3.3 -- 2016-12-28
                  
- Mac OS X 10.6 is required because the help book bundle is updated.
 - The help book is updated.
 - Fixed : compatibility with AppleScriptObjC.
 
 - 1.3.2 -- 2016-05-11
                  
- Fixed : error when a folder is selected in a list view window after OS X 10.10 or later.
 - Mac OS X 10.5 or later is required.
 
 - 1.3.1 -- 2015-09-17
                  
- Added last_result() method.
 
 - 1.3 -- 2011-12-20
                  
- Fixed : an error when a folder is selected in the list view window under Mac OS X 10.6.
 
 - 1.2.9 -- 2010-07-31
                  
- Fixed : an error when the front Finder window displays search results.
 
 - 1.2.8 -- 2010-03-25
                  
- Fixed : an error when the contents first Finder window is trash and no items are selected.
 
 - 1.2.7 -- 2009-11-05
                  
- Fixed an error in the following conditions :
                      
- Finder's view options palatte is displayed.
 - And the first Finder window has a tool bar.
 - And the first Finder window is list view.
 
 
 - Fixed an error in the following conditions :
                      
 - 1.2.6 -- 2009-10-28
                  
- Fixed errors when Finder's floating widow is opened.
 
 - 1.2.5 -- 2009-09-09
                  
- When resolving original item of Finder's selection is failed, the location the alias file is in is returned.
 
 - 1.2.4 -- 2009-03-22
                  
- Fixed error when floating windows (e.g. View Options window) are opened in Finder.
 
 - 1.2.3 -- 2008-11-06
                  
- Fixed is_colosed_folder() returns wrong result in the case of folloing conditions
                      
- The front window is list view.
 - A sub folder in an expeded folder is selected.
 - The selected folder is not expanded.
 
 
 - Fixed is_colosed_folder() returns wrong result in the case of folloing conditions
                      
 - 1.2.2 -- 2008-03-10
                  
- Add a constructor method.
 - Accesssor methods "set_allow_closed_folder" , "set_use_gui_scripting" and "set_allow_package_contents" return me (the script object to which messages are sent).
 
 - 1.2.1 -- 2007.05.19
                  
- First Release