Hi,
I wrote up my case for AskDifferent here: http://apple.stackexchange.com/questions/81499/troubleshoot-applescripted-typing-missing-shift-key-and-numerics-in-windows-xp-u
I am not sure if it adds insult to injury (of “cross-posting”) or it facilitates the discussion if I repeat here the issue:
I am using a Windows XP VM with Parallels 8 (build 8.0.18354, revision 823166; December 4, 2012) under Mountain Lion. I have a remote desktop connection from XP that does not allow pasting from the clipboard, but typing works, of course. I have an AppleScript simulating as if I typed the clipboard. However, the Shift key is not held down for modified keys, even though all keyboard layouts are in sync otherwise. Also curiously, numeric characters don’t go through while “(” is turned into “9”. See the full example below.
This happens in script-typing into XP desktop apps too, RDC only motivates why I cannot simply paste the clipboard. But this is a problem of scripted keystrokes in Parallels!
This only happens for this script and even only some keys with the script, the shift key is synchronized otherwise.
The remote connection is not super fast, but low speed did not break the use of the script in other cases (when I did not need the XP VM).
What is there to do?
This KB-article is about a similar shift-key issue from previous versions, even RDC-specific but not about scripting, but did not solve my problem:
http://kb.parallels.com/en/9129
I contacted Parallels support, and they have not yet closed my ticket, so it might be a technical issue of theirs. But I still hope that some of you might know (or guess) how to fix this instead of waiting for the software vendor, let alone a software update of theirs.
Here is the script:
on run
repeat with theItem in (the clipboard)
tell application "System Events" to keystroke theItem
delay 0.01
end repeat
end run
This is what I tried to copy and paste (by scripted typing):
This is what I got, see the messed-up order of rows, even, and even the cursor was before the x in last full-length line, not at the end ” somehow it jumped to the beginning of a row before typing more.
Thanks!
Model: MBP (early 2011)
AppleScript: 2.2.3
Browser: Safari 536.26.17
Operating System: Mac OS X (10.8)