Applescript and "keystroke"

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

  1. macrumors newbie

    Joined:
    Jan 16, 2008
    #1
    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:

    Code:
    Dim oShell
    Set oShell = WScript.CreateObject("WScript.Shell")
    
    Do
    [INDENT]oShell.SendKeys "Enter some text here"
    oShell.SendKeys "{ENTER}"
    WScript.Sleep 850000[/INDENT]
    Loop
    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. macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX

Share This Page