>630 英語HelpのFAQにある How can a repeating action be stopped without exiting the script? って項にあるサンプル使うとワンキーでLoopのスタート/ストップできた。 多重ループで使ってみたいのだけども、もっとエレガントになるかな?
#MaxThreadsPerHotkey 3 s:: #MaxThreadsPerHotkey 1 if KeepLoopRunning = y { KeepLoopRunning = return } KeepLoopRunning = y Loop { 〜処理〜 Sleep, 0 Loop { 〜処理〜 Sleep, 0 if KeepLoopRunning = break } if KeepLoopRunning = break }KeepLoopRunning = return