Thank you very much for starting reading my question. I don’t have a background of “scripting”, but I have learned how-to recently. Hope everyone can give me a hand .
Because sometimes I have to use Chinese, I have two languages (English is primary/system-wide, Chinese is secondary). I believe there is a bug in Traditional Chinese; everything I choose to “Delete Hanzi”, it changes back to “Reduce PinYin” after restart/logout (“Delete Hanzi” & “Reduce PinYi” are in the same drop menu under Delete).
I attach a screenshot for better understanding: [b]http://i4.photobucket.com/albums/y111/wec12/Picture1-1.png[/b]
So, I was working on the script which can run on the start to “refesh” to “Delete Hanzi” and then change back to English as primary before the script finishes. Well, no luck for several hours… I have following but it stuck .
activate application "SystemUIServer" tell application "System Events" tell process "SystemUIServer" set v to value of attribute "AXDescription" of menu bar items of menu bar 1 repeat with i from (count v) to 1 by -1 if item i of v is "text input menu extra" then exit repeat end repeat tell menu bar item i of menu bar 1 click delay 0.1 click menu item "Hanin" of menu 1 tell menu bar item i of menu bar 1 click delay 0.5 click menu item "Preferences" of menu 1 end tell end tell end tell end tell
Browser: Firefox 126.96.36.199
Operating System: Mac OS X (10.4)