Skip to content

Instantly share code, notes, and snippets.

@titancode
Last active September 28, 2015 09:18
Show Gist options
  • Select an option

  • Save titancode/1417651 to your computer and use it in GitHub Desktop.

Select an option

Save titancode/1417651 to your computer and use it in GitHub Desktop.
An AppleScript for automatically switching your iTunes Store accounts between countries. (for people who use Chinese ver. of Mac OS X 10.7)
tell application "System Events"
tell process "iTunes"
set frontmost to true
try
click menu item "登出" of menu "帳號" of menu bar item "帳號" of menu bar 1
end try
delay 1
click menu item "登入⋯" of menu "帳號" of menu bar item "帳號e" of menu bar 1
delay 1
keystroke "帳號的第一個字母"
keystroke "帳號的其他部分"
keystroke tab
keystroke "密碼"
keystroke return
delay 4
keystroke return
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment