Page 1 of 1

left ctrl not working

Posted: 30 Jul 2021, 20:27
by Mido
As you can see I found this but left ctrl isn't working, any help please? all of it is working perfectly except that

Code: Select all

^a::Goto, Start ;This makes CTRL+A go to the Start block... 

Start: 
Loop, 
{ 
MouseClick, left
Sleep, 200

Send {L Ctrl}
Sleep, 250 ;This means the script will wait 1 secs 

MouseClick, right 
Sleep, 200 ;This means the script will wait 1 secs 
} 

^x::Pause ;This makes CTRL+X pause the program.
ctags

Re: As you can see I found this but left ctrl isn't working, any help please? all of it is working perfectly except that

Posted: 30 Jul 2021, 20:44
by mikeyww
Remove the space before Ctrl.

Explained: List of keys

Re: As you can see I found this but left ctrl isn't working, any help please? all of it is working perfectly except that

Posted: 30 Jul 2021, 20:59
by Mido
mikeyww wrote:
30 Jul 2021, 20:44
Remove the space before Ctrl.

Explained: List of keys
I tried but didn't work

Re: As you can see I found this but left ctrl isn't working, any help please? all of it is working perfectly except that

Posted: 30 Jul 2021, 21:12
by mikeyww
What is the target program? What happens when you run the script? What should happen instead? Which window is active when the Send command executes?

Re: As you can see I found this but left ctrl isn't working, any help please? all of it is working perfectly except that

Posted: 30 Jul 2021, 23:57
by Mido
mikeyww wrote:
30 Jul 2021, 21:12
What is the target program? What happens when you run the script? What should happen instead? Which window is active when the Send command executes?
I use it in conquer, this button [l ctrl] + left mouse click makes you jump. What happens is the everything in this script works except sending Left ctrl.

Re: left ctrl not working

Posted: 31 Jul 2021, 07:26
by mikeyww
When you send {LCtrl} by itself, the button goes down and then up. To keep it down with a click instead, use one of the following.

Code: Select all

Send ^{LButton}
Send ^{RButton}
Another method:

Code: Select all

Send {LCtrl down}{LButton}{LCtrl up}