need a simple script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
cycool
Posts: 4
Joined: 23 Jul 2021, 01:23

need a simple script

23 Jul 2021, 01:31

hi i am new here, can anyone help me on how to hold control key, mouse right click and Q key at the same time? also using f12 key to start and stop the said key. thanks in advance. :ugeek:
Last edited by gregster on 23 Jul 2021, 02:06, edited 1 time in total.
Reason: Topic moved from 'Tutorials'.
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: need a simple script

23 Jul 2021, 03:56

Hallo,
try:

Code: Select all

F12 Up::Send, {LCtrl Down}{RButton Down}{q Down}
^F12 Up::Send, {LCtrl Up}{RButton Up}{q Up}
cycool
Posts: 4
Joined: 23 Jul 2021, 01:23

Re: need a simple script

23 Jul 2021, 07:10

Rohwedder wrote:
23 Jul 2021, 03:56
Hallo,
try:

Code: Select all

F12 Up::Send, {LCtrl Down}{RButton Down}{q Down}
^F12 Up::Send, {LCtrl Up}{RButton Up}{q Up}
Thank you for the help it works perfectly, I would like to ask one more thing. What if I am going to separate the q key and would like it to be pressed every 1 sec?
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: need a simple script

23 Jul 2021, 09:05

Then,
try:

Code: Select all

F12 Up::
Send, {LCtrl Down}{RButton Down}{q}
SetTimer, Tq, 1000
Return
^F12 Up::
SetTimer, Tq, Off
Send, {LCtrl Up}{RButton Up}
Return
Tq:
Send, {Blind}{q}
Return
cycool
Posts: 4
Joined: 23 Jul 2021, 01:23

Re: need a simple script

23 Jul 2021, 09:26

Rohwedder wrote:
23 Jul 2021, 09:05
Then,
try:

Code: Select all

F12 Up::
Send, {LCtrl Down}{RButton Down}{q}
SetTimer, Tq, 1000
Return
^F12 Up::
SetTimer, Tq, Off
Send, {LCtrl Up}{RButton Up}
Return
Tq:
Send, {Blind}{q}
Return
tried it but the q is not working but control right click working fine
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: need a simple script

23 Jul 2021, 11:31

Maybe you need this Timer?

Code: Select all

Tq:
Send, {LCtrl Up}{q}{LCtrl Down}
Return
It sends the Q key without pressed control modifier.
cycool
Posts: 4
Joined: 23 Jul 2021, 01:23

Re: need a simple script

23 Jul 2021, 19:51

Rohwedder wrote:
23 Jul 2021, 11:31
Maybe you need this Timer?

Code: Select all

Tq:
Send, {LCtrl Up}{q}{LCtrl Down}
Return
It sends the Q key without pressed control modifier.
it seems like i can't get it to work, it still only works on control right click

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: CrowexBR, demon740 and 270 guests