Problem with command send using a string Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Guill
Posts: 139
Joined: 09 Jun 2016, 22:00

Problem with command send using a string

29 Jan 2020, 21:29

I need to automate this:

Send this text

"MouseGetPos X, Y


Mousemove, %X%, %Y%"

And after that, press "Up 3 times"


I've tried this, but it doesn't work:

Code: Select all

Send, {Text}
(
MouseGetPos X, Y


Mousemove, %X%, %Y%
)
Send {Up 3}
Warning windows:
"This variable has not been assigned a value

--- > Send, {Text} Mousegetpos X, Y

For more details, read the documentation for #Warm."



What could be happening?
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Problem with command send using a string  Topic is solved

30 Jan 2020, 00:14

MouseMove parameters can be expressions so you do not need the %'s

Code: Select all

#Warn

Send, {Text}
(
MouseGetPos X, Y


Mousemove, X, Y
)
Send {Up 3}
If you still wanted the %'s you would escape the %'s with `

Code: Select all

#Warn

Send, {Text}
(
MouseGetPos X, Y


Mousemove, `%X`%, `%Y`%
)
Send {Up 3}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Stinkfoot9 and 133 guests