Using applescript to send key strokes to guest OS

Discussion in 'Windows Virtual Machine' started by ls8gza, Jul 29, 2011.

  1. ls8gza

    ls8gza Bit poster

    Messages:
    2
    I'm trying to use applescript to send keystrokes to a windows app within parallels 5.

    It works except for when I want a SHIFT modifier.

    e.g.

    activate application "Parallels Desktop"
    tell application "System Events"
    keystroke "4"
    end tell


    and

    activate application "Parallels Desktop"
    tell application "System Events"
    keystroke "g" using {control down}
    keystroke return
    end tell


    both work as expected

    but

    activate application "Parallels Desktop"
    tell application "System Events"
    keystroke "4" using shift
    end tell


    fails - it outputs "4" instead of "$". The same script works as expected into other OSX applications.

    Any idea on how I can make this work ???

    (The scripts are being linked to Dragon Dictate and are needed to drive a windows only software development environment - btw: Dragon has a way of getting these characters output, but it's very long winded, so I know it must be possible somehow ! - I've also tried the direct key mapping in Dragon, with the same results)
     

Share This Page