1 post in this topic
Im new when it comes to scripting and i follow some videos on how to make clicks and such. So i will say i know the basics alrady.
However, im having a really big problem
When i run the script is works fine with the clicks and all. But if i run it one or two more times it just moves to very inaccurate positions. YES, i have tried mulitple times to change positions and such but no luck. My script is working its just so inaccurate that im unable to use it. Are there any solution for this?
I have also set the camera to a specific position. I have also tried other camera angles, no luck there either. Making more smoother macro movements does not seem to work aswell.
I have also tried to have clicks away from the minimap, since i know some youtuber had problem with inaccuracy because of this.
I came here because i was googling and did not see anyone else having this problem, or mentioning it. So if someone have a solution, i would be happy!! All i have seen are people trying to change the resolution. But it has nothing to do with that. I heard someone mention controlmouseclick. However are there any differences? I have also A window selection in my script so it changes to the window the macro will be running in. Resolution is not changing or anything. I have also tried other macros and same problem there.
Also does anyone know or can teach me how pixel search works? I want the macro to be able to click at the correct character instead of waiting for the character to get in the position its searching for.
I'm trying to make a program in VB.NET that click inside a picturebox of an app without moving the mouse (using ControlClick).
My code is this:
1) ControlClick("Form1", "", "[CLASS:PictureBox; INSTANCE:12]", "left", 1, 5, 5) 2) ControlClick("Form1", "", "[CLASS:PictureBox; INSTANCE:1]", "left", 1, 5, 5) The code is correct but the problem is that 1) works perfectly and 2) doesn't work.
Here I leave you the summary of each picturebox:
>>>> Window <<<<
Position: 168, 0
Size: 1030, 780
>>>> Control <<<< PICTUREBOX 12
Advanced (Class): [CLASS:PictureBox; INSTANCE:12]
Position: 305, 721
Size: 40, 40
>>>> Control <<<< PICTUREBOX 1
Advanced (Class): [CLASS:PictureBox; INSTANCE:1]
Position: 4, 176
Size: 700, 533
Thank you for you help!!!
I'm currently wondering if there is somehow to actually make autoit click inside a minimized program? & sent keystrokes ?
2nd question, how can i make it do a mouse click at e.g. x200,y200 while the are at like x354,y313 (This is purely an example.) would love to be able to do other shizz on my pc while the script is running if possible.
If this ISNT possible can u recommend a language / other scripting program which are able to do this ? willing to start over learning a new coding/scripting language.
I've encountered a small issue i just cant seem to program my way out of...
What im doing is: ;or rather, what im trying to do is
Pixelsearch for a color, within a part of my screen,
If color is present, i will rightclick it, for a menu to appear,
in which i want to Leftclick an option. Simplicity itself.
The issue is that because this menu appears in different parts of my screen, its complicated to select the option i want to click.
There is no special color to it, and i cannot define the area in which to click, because the menu appears different places.
The only thing that is in common for the menu is that the Leftclick needs to be (lets say) 30pixels below the rightclick
What can be done, but seemingly not by me, is to get the coordinates of the rightclick, and use them as the "starting point" from where the coordinates for the leftclick will be.
(Not sure if that makes sence, but maybe the code below will help you understand)
You guys like example codes, so therefore i will give it my best shot, and hope it proves usefull
$pos = Pixelsearch(200, 400, 200, 400, 0xFFFFFF) ;This color is what i need to rightclick to bring up the menu
If not @Error then ;If the color is present
(Mouseclick("Right", $pos, $pos, 1, 1) ;Rightclick it, to bring up menu
;Here comes the part i cannot get to work
$x = MousegetPos(X) ;To get the Coordinate "X", so we can calculated with it for the position of the leftclick
$y = MousegetPos(Y) ; To get the Coordinate "Y", so that can be calculated with for the position of the leftclick
MouseClick("Left", $x, $y-30, 1, 1) ;This was supposed to give me a leftclick that is 30pixels below the rightclick.
(The MouseGetPos(X), may seem as a waste of space in this example, but in my script i will need both.
Im only using one in the example, mainly so that i wont confuse myself, but also to make it easier to digest for you guys)
I have not been able to find any topic that covers this, but my apologies if such a topic already exist in the forums.
Maybe while im at it, can i ask, what good does the  and  do, when using a "$variable" as coordinate?
Thanks in advance
I’m trying to click the “assign a playlist” url in this application (see info.png)
I don’t know if it is flash or not.
The control ID changes on every launch.
I can’t use mouseclick because it needs to be scheduled at night on a server.
So just ControlClick is left as an option.
I can find the handle to the window but not to the control, be it through text or classname, clas or advanced mode.
The mouse cursor doesn't even move after these commands.
$handle = WinGetHandle("[ACTIVE]")
ControlClick($handle, "", "[CLASS:TFlickerFreePaintBox.UnicodeClass; INSTANCE:1]",'left', 1, 54, 138)
ControlFocus("Q-MATIC Monitor™ 3", "", "[TFlickerFreePaintBox.UnicodeClass1]")
Controlclick("Q-MATIC Monitor™ 3", "",", "primary", 1, 54, 55)
ControlClick($handle, "", "", "Left", 1, 54, 55)
ControlClick("Q-MATIC Monitor™ 3", "", "[TEXT:Assign to playlist]")
ControlFocus ( "Q-MATIC Monitor™ 3", "", "TFlickerFreePaintBox.UnicodeClass")
What other parameters are possible for this?