SendMode Input issues

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
lunacy471
Posts: 55
Joined: 04 Nov 2022, 19:52

SendMode Input issues

Post by lunacy471 » 03 Dec 2022, 00:17

So when you create a new script this is added in by default
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
and my script works fine, but it seems to ignore my mousemoves movement speed and just makes it move instantly to the coordinates. now i dont mind this for every other click command but is there a way to make it not affect the one single mousemove i have?
is there a way to temporarily change the sendmode to default (whatever it is without the sendmode input added in the first place), cuz it works perfectly without the sendmode input code but it makes everything else incredibly slow which I dont want.

Code: Select all

		Click,  527, 220 Down
		MouseMove, 1, 134, 30
		Click, Up
all I want is this code to work so that it can drag a window to the corner which doesn't work if the mouse cursor just teleports to the destination too fast.

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: SendMode Input issues

Post by Rohwedder » 03 Dec 2022, 02:10

Hallo,
try:

Code: Select all

SendEvent, {Blind}{Click 527 220 Down}
MouseMove, 1, 134, 30
Click, Up

lunacy471
Posts: 55
Joined: 04 Nov 2022, 19:52

Re: SendMode Input issues

Post by lunacy471 » 03 Dec 2022, 03:56

unfortunately still didn't work, it goes to the click position of the first click but still just teleports to the corner. the mouse move part that I need to be slow.
I tried doing

Code: Select all

SendEvent, {Blind}{MouseMove 1 134}
but it still just moves to coords instantly

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: SendMode Input issues

Post by Rohwedder » 03 Dec 2022, 05:05

Then perhaps:

Code: Select all

MouseClickDrag, Left, 527, 220, 1, 134, 30

lunacy471
Posts: 55
Joined: 04 Nov 2022, 19:52

Re: SendMode Input issues

Post by lunacy471 » 03 Dec 2022, 05:13

Rohwedder wrote: Then perhaps:

Code: Select all

MouseClickDrag, Left, 527, 220, 1, 134, 30
still being overwritten by the sendMode input and teleports to coords

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: SendMode Input issues

Post by Rohwedder » 03 Dec 2022, 05:21

Code: Select all

MouseClickDrag, Left, 527, 220, 1, 134, 30
replaces:

Code: Select all

Click,  527, 220 Down
MouseMove, 1, 134, 30
Click, Up

lunacy471
Posts: 55
Joined: 04 Nov 2022, 19:52

Re: SendMode Input issues

Post by lunacy471 » 04 Dec 2022, 02:59

Rohwedder wrote:

Code: Select all

MouseClickDrag, Left, 527, 220, 1, 134, 30
replaces:

Code: Select all

Click,  527, 220 Down
MouseMove, 1, 134, 30
Click, Up
yeah, I used it alone of course. it just ignores speed all the same

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: SendMode Input issues

Post by Rohwedder » 04 Dec 2022, 03:57

I try:

Code: Select all

SendMode Input
q::MouseClickDrag, Left, 527, 220, 1, 134, 30
and it's slow.
To see the state of LButton, run my KeyStateTimer as a second script:

Code: Select all

#Persistent
;KeyStateTimer shows the logical State of Keys
SetTimer,State,% (50,Keys:="LButton")
State: ;Keys separated with space or tab
For all,Key in StrSplit(Keys,[A_Space,A_Tab])
	Text.=Trim(Key)>""?"`n" Key "`t" (GetKeyState(Key)?"down":"up"):
MouseGetPos, MX, MY ;separated from another ToolTip
ToolTip,% SubStr(Text,2),MX+16,MY+32,4,Text:=""
Return

lunacy471
Posts: 55
Joined: 04 Nov 2022, 19:52

Re: SendMode Input issues

Post by lunacy471 » 04 Dec 2022, 04:46

Rohwedder wrote: I try:

Code: Select all

SendMode Input
q::MouseClickDrag, Left, 527, 220, 1, 134, 30
and it's slow.
yeah I isolated the code onto a new ahk script but its still moves instantly, I am using the latest ahk as well. I don't know what else could be causing the difference for yours vs mine since its literally the same code. the only way i can get it to be slow is by removing the sendmode input.. i dont know what else could be wrong

Post Reply

Return to “Ask for Help (v1)”