Jump to content

Sending same command as Hotkey


complex
 Share

Recommended Posts

Is there a way to send multiples of a key from the same key? I would like to press z on my keyboard, and have it send the actual letter z to the screen 3 times.

Like below (though that code does not work due to a loop issue)

HotKeySet("{z}","cast")
HotKeySet("{F10}","end")

While 1
    Sleep(100) ;
WEnd


Func cast()
    Send("z")
    Send("z")
    Send("z")
    
EndFunc
Link to comment
Share on other sites

Hello complex,

you were close.

Try this:

HotKeySet("z","cast")
HotKeySet("{F10}","end")

While 1
    Sleep(100) ;
WEnd


Func cast()
    Send("zzz")
EndFunc

Realm

Edit: Note that anytime that z is pressed, you will get 3 z's, if you want to do it on a more optional rate than try a combo of keys to get it like this example:

HotKeySet("+!z","cast") ;Shift-Alt-z
Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

Thanks for the quick response that worked.

My Pleasure, I had the time ;)

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...