コピペしてすぐに使えます。
ウィンドウで開いているパスを取得するスクリプトです。
表示しているウィンドウのパスを取得
try
	tell application "Finder"
		activate
		try
			tell Finder window 1
				activate
			end tell
		on error
			display dialog "ウィンドウが開かれていません。" buttons {"終了"} default button 1
			return
		end try
		set tmpPath to do shell script "osascript -e 'tell app \"Finder\" to POSIX path of (insertion location as alias)'"
		display dialog "Path" buttons {"Export", "OK"} default button 2 default answer tmpPath
		set tmpDialog to result
	end tell
end try
set tmpBtn to button returned of tmpDialog
if tmpBtn = "Export" then
	do shell script "echo " & tmpPath & " >> ~/Desktop/Path.txt"
end if
説明
実行するとFinderの一番手前にあるウィンドウのパスをテキストボックスに表示します。
テキストボックス付きのダイアログの[OK]ボタンを押すと終了します。
[Export]ボタンの押すと、デスクトップにパスが記載されたPath.txtを作成します。
既にPath.txtがある場合には追記する動作をします。
Path.txtの「Path」は任意のファイル名に変更して問題ありません。
  
  
  
  