投稿

10月, 2015の投稿を表示しています

Automatorの変数をAppleScript内で使う

Quick Edit Pencil
Automatorで設定した変数をAppleScript内で変数名を指定することはできない
なので、AppleScriptでinputの値を変数に格納する
on run {input, parameters} set val1 to item 1 of input set val2 to item 2 of input set cnt to (count of input) end run
参考サイト AutomatorでAppleScriptに値を渡す http://ameblo.jp/softwaredeveloper/entry-11988473204.html AppleScriptのサンプル
on run {input, parameters} set pictFol to path to pictures folder from user domain as text --ピクチャフォルダのパスを取得 set searchCha to item 1 of input --Automatorで受け渡された変数値(ファイル名)を取得 set the clipboard to searchCha --クリップボードにコピー return input end run