--スクリプトの先頭部分に追加 use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "ApplicationServices" use framework "Quartz" 0602名称未設定2017/10/16(月) 20:24:12.62ID:qr1Aa6Zn0 --http://piyocast.com/as/archives/3759 --左クリックする on left_click(newX, newY) set pt to current application's CGPointZero set x of pt to newX set y of pt to newY current application's CGPostMouseEvent(pt, 1, 1, 1) current application's CGPostMouseEvent(pt, 1, 1, 0) end left_click
--右クリックする on right_click(newX, newY) set pt to current application's CGPointZero set x of pt to newX set y of pt to newY current application's CGPostMouseEvent(pt, 1, 2, 1) current application's CGPostMouseEvent(pt, 1, 2, 0) end right_click