よりうざくする方法があったらコメントで教えてください!
使い方
- SSHで誰かのMacOSXにログイン
- 以下のスクリプトをコピペして実行
- GUIでログインしているアカウントと同じアカウントでないと動きません
- 自分のマシンのターミナルで実験することも可能
sh <<SCRIPT
open /
open .
open ~/Desktop
osascript <<EOF
run script hoge
script hoge
tell application "Finder"
activate
--ウィンドウをランダムに移動
repeat with i from 0 to 100
set position of Finder window 1 to {random number from -500 to 1000, random number from 0 to 500}
set position of Finder window 2 to {random number from -500 to 1000, random number from 0 to 500}
set position of Finder window 3 to {random number from -500 to 1000, random number from 0 to 500}
end repeat
--Text-to-speech
say "Hey!"
-- 画面をチカチカさせる(事前にシステム環境設定で、キーボード>ショートカット>アクセシビリティ>カラーを反転…のショートカットをONにしておく)
tell application "System Events"
repeat with j from 0 to 8
key code 28 using {control down, option down, command down}
end repeat
end tell
-- 警告音を鳴らす
beep
beep
beep
--ダイアログ表示
set sNum to display dialog "ねえねえどんな気持ち???" with icon stop buttons {"消えろ", "うざい", "もう1回"} default button 1
if button returned of sNum = "もう1回" then
run hoge
end if
end tell
end script
EOF
SCRIPT
仕組み
osascriptコマンドでうざそうなAppleScriptを実行している。
注意事項
- 仕事中に仕掛けるとガチで怒られると思う