Basically I am trying to make an auto healer in a game. It requires to click on multiple health bars but the game requires holding down right click to move. What ends up happening is everything is good when standing still, but once I hold right click to move, the camera starts to jiggle. I tried postmessage and had no luck.
Anyone know anything about this?
Thanks so much!
[Mod action: Moved topic to the “Gaming” section.]
Clicking a position without releasing rightclick
Re: Clicking a position without releasing rightclick
Hallo,
instead of using PostMessage, I would have tried clicking with ControlClick first!
instead of using PostMessage, I would have tried clicking with ControlClick first!
Re: Clicking a position without releasing rightclick
This is the original script
I tries to use controlclick, but it does not work, any ideas?
Code: Select all
$XButton1::
{
While GetKeyState("XButton1", "P")
{
MouseGetPos &xpos, &ypos
If PixelSearch(&Px, &Py, 1370, 1069, 2080, 1390, 0xff00af, 3)
MouseClick "Middle", Px+5, Py+5, 1, 0
Sleep 100
}
}
Code: Select all
$XButton1::
{
While GetKeyState("XButton1", "P")
{
MouseGetPos &xpos, &ypos
If PixelSearch(&Px, &Py, 1370, 1069, 2080, 1390, 0xff00af, 3)
ControlClick "Px+5 Py+5", "World of Warcraft", "Middle", 1
Sleep 100
}
}
Re: Clicking a position without releasing rightclick
You haven’t used the correct syntax. You just put a string of text with no values of your variables where it’s expecting x and a number followed by y and a number (with a space between them). That is accomplished by concatenating the literal string parts and your variables (with 5 added to each).
You also didn’t put the parameters in the right place, failing to leave a spot for the WinText parameter.
Whether the approach works or not is a separate issue, but you have to have the syntax right in order to give it a chance.
You also didn’t put the parameters in the right place, failing to leave a spot for the WinText parameter.
Code: Select all
ControlClick "x" Px+5 " y" Py+5, "World of Warcraft",, "Middle", 1
Whether the approach works or not is a separate issue, but you have to have the syntax right in order to give it a chance.
Re: Clicking a position without releasing rightclick
Thanks a lot! I am such a noob, but is willing to learn and do whatever it takes.boiler wrote: ↑10 May 2024, 03:58You haven’t used the correct syntax. You just put a string of text with no values of your variables where it’s expecting x and a number followed by y and a number (with a space between them). That is accomplished by concatenating the literal string parts and your variables (with 5 added to each).
You also didn’t put the parameters in the right place, failing to leave a spot for the WinText parameter.
Code: Select all
ControlClick "x" Px+5 " y" Py+5, "World of Warcraft",, "Middle", 1
Whether the approach works or not is a separate issue, but you have to have the syntax right in order to give it a chance.
Re: Clicking a position without releasing rightclick
Unfortunately the controlclick method does not work for this situation.
The script works, but it still stops camara movement for a split second, which send your character camera into chaos.
I will keep trying other method, or just use in 25 in game macros to target instead of using mouse at all.
The script works, but it still stops camara movement for a split second, which send your character camera into chaos.
I will keep trying other method, or just use in 25 in game macros to target instead of using mouse at all.
Who is online
Users browsing this forum: No registered users and 8 guests