AppleScript 関数を作成するサンプル

環境
macOS 11.6

構文
on 関数名(引数)
処理コード
end f

関数名(引数)

使用例

on f(x,y)
      x + y
end f

f(3,5)

実行結果
osascript test.scpt

 

AppleScript

Posted by arkgame