1)AppleScriptを実行したのでしょうか? (同じことを繰り返し質問しなければならないので、質問には全て答えて頂ければ幸いです)システム環境設定>キーボード>入力ソース>日本語の画面が表示されている状態で、入力方法のポップアップボタンが点滅したという状況でしょうか? その場合、delay コマンドの待機時間を調節してみてください。現在は、delay 0.5となっていますが、delay 1.0などど、少し長めにして動作を調べてみてください。
2)AppleScriptのGUI scriptingをご使用の場合(System Eventsのkeystrokeコマンドなど)、調整が難しいので、shell scriptでdefaultsコマンドを実行するものの方が確実に入力方法を変更できると思います。 以下のAppleScriptを試してみてください。 入力ソースは日本語にしておきます。
set theScript to "defaults read com.apple.inputmethod.Kotoeri JIMPrefTypingMethodKey"
set theKey to do shell scripttheScript
if theKey is "0" then
set theScript to "defaults write com.apple.inputmethod.Kotoeri JIMPrefTypingMethodKey 1"
else
set theScript to "defaults write com.apple.inputmethod.Kotoeri JIMPrefTypingMethodKey 0"
end if
do shell scripttheScript