Jump to content
Sign in to follow this  
technopagan

Very basic keypress help

Recommended Posts

technopagan

Hello all,

I'm completely new to AutoIT, not new to the world of scripting in general, but I'm not familiar with what I might be doing wrong.

I'm trying to setup a very basic keypress, to where if I press ";" it keypresses "q" and if I press "," it keypresses "w". The reason for this is I mouse left handed, and a game I'm playing doesn't accept entry of the ";" or "," keys as valid keys, which I use in my standard setup.

Here's my code, but if I try to run it with AutoIt, I just get a flashing screen and the app seems to close, with no effect on my desired keys. If anyone could point me in the right direction on what I might be missing in my script setup, it would be greatly appreciated.

HotKeySet(";", "pressedSemi")
HotKeySet(",", "pressedComma")

Func pressedSemi()
    Send("q")
EndFunc

Func pressedComma()
    Send("w")
EndFunc

Share this post


Link to post
Share on other sites
technopagan

My problem now is that my hotkey, when I do a press, is acting as if it's only occasionally tapping the key (the char moves very slowly in game),

It should feel like it's being "held down" since AutoIt is supposed to capture the key completely?

Here's what I have if anyone has any advice, thanks for any input,

Opt("TrayIconHide", 0)
HotKeySet(";", "pressedSemi")

While 1
    Sleep(100)
WEnd

Func pressedSemi()
    Send("q")
EndFunc

Share this post


Link to post
Share on other sites
seandisanti

can't discuss game bots here. look up the send keys list in the help file to get your answer, it is there


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.