ControlClick is moving the mouse in the screen

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

ControlClick is moving the mouse in the screen

25 Aug 2016, 13:58

Hey all

I have this script :

Code: Select all

SetControlDelay, -1
WinGet, Program, List, Program

Pause::
Loop 
{
If var1 = 22
{
	ControlSend,, {F1}, % "ahk_id " Program1
	Sleep 600
}
else If var1 = 23
{
	ControlSend,, {F2}, % "ahk_id " Program1
	Sleep 600
}
else If var1 = 24
{	
	ControlSend,, {F3}, % "ahk_id " Program1
	ControlClick, x949 y1034, % "ahk_id " Program1,,right
	Sleep 600
}
The script is working good, it's clicking on the program, which is in background behind all windows, but wherever my mouse is, it moves to that position when the ControlClick is performed :/ there is any way to prevent this? Tried with Set timer instead of loop and left,2 instead of right, NA and none working .

PD: Sorry for the double post but I wanted to edit the other and marked it as solved by mistake, and can't delete it now.

Thanks
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: ControlClick is moving the mouse in the screen

26 Aug 2016, 09:29

Try adding the NA option onto your ControlClick command.
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

Re: ControlClick is moving the mouse in the screen

26 Aug 2016, 10:27

Code: Select all

ControlClick, x949 y1034, % "ahk_id " Program1,,right,, NA
isn't working neither :(
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: ControlClick is moving the mouse in the screen

26 Aug 2016, 10:44

I am afraid I do not know what else to suggest. Hopefully someone else will have some ideas for you.
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

Re: ControlClick is moving the mouse in the screen

27 Aug 2016, 15:47

Thanks for trying!

Anyone else have a possible fix for this?
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: ControlClick is moving the mouse in the screen

27 Aug 2016, 17:11

alesyt0h wrote:Hey all
I have this script :
Hey, just to rule out possible errors, is this the whole script? That is, SetControlDelay,-1 really is in the autoexecute-section, if not, it doesn't apply to the ControlClick in the hotkey. You have at least omitted the last } of the loop block.
alesyt0h
Posts: 214
Joined: 28 Jan 2015, 20:37

Re: ControlClick is moving the mouse in the screen

27 Aug 2016, 17:56

Ty for answer ! .. It is the full script but seems i've failed to copy/paste a } and the return lol ... and SetControlDelay, -1 is on the autoexecute section
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: ControlClick is moving the mouse in the screen

27 Aug 2016, 19:47

what Program are you trying to send the ControlClick to? sometimes different programs respond differently to ControlClicks. can you try in another software and see if it works correctly? if so, it may just be a limitation of that program


Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Rohwedder and 251 guests