« [record]レコードの作り方色々 | トップページ | [Folder]フォルダの基本 »

[choose folder] フォルダを選ぶ

フォルダを単体を選ぶ

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.8"
use framework "Foundation"
use scripting additions


tell application "Finder"
set aliasDefaultLocation to container of (path to me) as alias
end tell


try
set aliasResponse to (choose folder "フォルダを選んでください" with prompt "フォルダを選択してください" default location aliasDefaultLocation without multiple selections allowed, invisibles and showing package contents)
on error
log "エラーしました"
return
end try




フォルダを複数選ぶ

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.8"
use framework "Foundation"
use scripting additions


tell application "Finder"
set aliasDefaultLocation to container of (path to me) as alias
end tell


try
set listAliasFolderPath to (choose folder "フォルダを選んでください" with prompt "フォルダを選択してください" default location aliasDefaultLocation with multiple selections allowed without invisibles and showing package contents)
on error
log "エラーしました"
return
end try

repeat with objAliasFolderPath in listAliasFolderPath
set aliasFolderPath to objAliasFolderPath as alias

log aliasFolderPath
end repeat

|

« [record]レコードの作り方色々 | トップページ | [Folder]フォルダの基本 »

AppleScript Folder」カテゴリの記事