I’m trying to make a macro, but with button pressed ups and downs and i can’t get it to work

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
99muppets
Posts: 83
Joined: 08 Mar 2017, 19:45

I’m trying to make a macro, but with button pressed ups and downs and i can’t get it to work

22 Oct 2018, 05:45

I’ll write what i’m trying to do here:

when m key pressed down, press the f key fully (so down and up a normal click) a single timeand after a slight delay, holy down mouse1. Hold down mouse 1 until mkey is released. As m key is released, lift up mouse one again and at the same time, press the f key again (a normal click. Thanks!!!

My code is just spamming the f key and clicking, please help, thanks!!!
User avatar
Scr1pter
Posts: 1272
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: I’m trying to make a macro, but with button pressed ups and downs and i can’t get it to work

22 Oct 2018, 06:49

Post your code, please.

Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
99muppets
Posts: 83
Joined: 08 Mar 2017, 19:45

Re: I’m trying to make a macro, but with button pressed ups and downs and i can’t get it to work

22 Oct 2018, 15:59

The code goes like this:

m::
send f
delay 100
send {lbutton down}
return

m up::
send {lbutton up}
send f
return
99muppets
Posts: 83
Joined: 08 Mar 2017, 19:45

Re: I’m trying to make a macro, but with button pressed ups and downs and i can’t get it to work

22 Oct 2018, 22:48

Scr1pter wrote:
22 Oct 2018, 06:49
Post your code, please.

Regards
Also, not only does it not work, if i hold down the button, after a few seconds it just spams f and click crazy fast, thanks!!
KiritoSanPlays
Posts: 28
Joined: 13 Jun 2018, 16:24

Re: I’m trying to make a macro, but with button pressed ups and downs and i can’t get it to work

23 Oct 2018, 04:57

first of all i would change your code to this



This is your code

Code: Select all

m::
send f
delay 100
send {lbutton down}
return

m up::
send {lbutton up}
send f
return


change it to this:

Code: Select all

m::
While GetKeyState(m, "p")
send {f down}{lbutton down}
    Sleep 10
send {f up}{lbutton up}
Return

i just typed a couple of words in google and i instantly found what you needed, maybe google before asking since a lot of people already asked what you want

https://autohotkey.com/board/topic/1261 ... ntry701173

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: DataLife, pgeugene, Rohwedder and 99 guests