AppleScript / System Events keystroke command incorrectly uppercasing output characters 10.12.2 and 10.12.3 Beta 2

Hi There,


I haven't seen this discussed on the forums, but there are now at least two bug reports so I thought I'd mention it here for anybody else and see if I could glean some news about any fix. The gist of the problem from the first bug report I came across rdar://29182929 - http://www.openradar.me/29182929


Basically, if you run this AppleScript:


tell application "Terminal"
  activate
  tell application "System Events" to keystroke "mmalibu@zetetic.net"
end tell


Instead of a lower cased email address you'll see output like:


mmalibu@Zetetic.net

mmalibu@ZEtetic.net
mmalibu@ZETETIc.net

mmalibu@ZETetic.net


Every ten or so it seems to get it right, but otherwise it's unreliable.


This started beginning with Sierra 10.12.2 and is observable on 10.12.3 Developer Beta 2.


There is a work-around that I posted in my "me, too" bug report rdar://29825727 - http://www.openradar.me/29825727


tell application "Terminal"
  activate
  tell application "System Events"
       set outputString to "mmalibu@zetetic.net"
       set len to length of outputString
       repeat with i from 1 to len
            set x to character i of outputString
            keystroke x
            key up {shift}
       end repeat
  end tell
end tell


Anybody else know anything about the bug?


Cheers!

I got the same issue afer upgrade to 10.12.2.

Same here.


I collect a variable then pass it to the following. I know the variable is correct as I also use it to print the Title bar in Terminal. But, when I pass it to this sub and enter it in a keystroke, it transposes "AA7MainCM" to "AA7MAINCM" or "AA7MAinCM", etc.


on execCmd(cmd, wait)

tell application "System Events"

tell application process "Terminal"

set frontmost to true

keystroke cmd

keystroke return

end tell

end tell

delay wait

end execCmd


Interestingly, I tried your workaround which works if I run it from Automator, but fails if I run the .app direct from the script folder.

Thanks for confirming @arob216 and @AllenC.


Bug is still present on macOS 10.12.3 developer beta 4 (16D30A).

Woot! This is fixed in 10.12.4 Beta 1 ^_^

AppleScript / System Events keystroke command incorrectly uppercasing output characters 10.12.2 and 10.12.3 Beta 2
 
 
Q