Applescript and "keystroke"

Discussion in 'Mac Programming' started by Phurious, Jun 29, 2008.

  1. Phurious macrumors newbie

    Jan 16, 2008
    I am brand new to Macs and have run into a wall. You see, I am TRYING to send keystrokes to the active window. Under Windows XP, it was a VERY simple process using VBScript:

    Dim oShell
    Set oShell = WScript.CreateObject("WScript.Shell")
    [INDENT]oShell.SendKeys "Enter some text here"
    oShell.SendKeys "{ENTER}"
    WScript.Sleep 850000[/INDENT]
    This would, regardless of the application, send the keystrokes to the active window. I am having a hell of a time trying to duplicate this simple process with Applescript. I have Googled until blue in the face, and have not found anything like what I was doing with VBScript.

    Can anyone point me in the right direction?
  2. Sayer macrumors 6502a


    Jan 4, 2002
    Austin, TX

Share This Page