Help converting AHK to AppleScript

Discussion in 'Mac Programming' started by Zomaji, Feb 12, 2017.

  1. Zomaji macrumors newbie

    Zomaji

    Joined:
    Feb 12, 2017
    #1
    can someone help me convert this AHK to AppleScript

    $2::
    While GetKeyState("2","p"){
    Send,,2
    sleep 80ms
    }
    return



    Thanks
     
  2. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #2
    Hi

    Well, I'm afraid I don't know anything at all about AHK. Can you explain in words (rather than code) what you want an AppleScript to do, and I'll sure someone (maybe even me...) will be able to offer some advice.
     
  3. Zomaji thread starter macrumors newbie

    Zomaji

    Joined:
    Feb 12, 2017
    #4
    I am looking for a script that when I push number 2 it will repeat it every 80ms in World of Warcraft and then when I let go of the key it stops
     
  4. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #5
    Ah, I understand.

    I don't think that AppleScript is really the right thing to use. It's mostly used for automating things in other applications, rather than listening for key strokes.

    Having said that, you might find this discussion interesting:

    http://macscripter.net/viewtopic.php?id=32830
     
  5. Zomaji thread starter macrumors newbie

    Zomaji

    Joined:
    Feb 12, 2017

Share This Page