Change ControlClick coordinates - While loop
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By AntS
Help! The mouse clicks I'm sending to a control on a dialog box produce no response.
The dialog box in question handles advanced display properties. The tab page my script interacts with is created by Trident Microsystems. It allows the user to enhance or attenuate the screen's RGB values. (See image.) My script automates the process of changing these in order to adjust the screen's hue or, when the red, green and blue values are all the same, the brightness.
Producing a script to change the brightness has been quite straightforward. I use ControlClick() to send a mouse click to one of the trackbars on the right of the tab page. By default, they're linked and so move as one. The difficulty I'm having however is in automating the process when the desired red, green and blue values aren't the same as each other.
Ordinarily, there are three ways of doing this:
(1) clear the Link check box to unlink the three trackbars then either click on each trackbar or drag their sliders,
(2) clear the Link tick-box then for each colour, click on the corresponding trackbar slider (to select it) then click on a point on the graph, and
(3) click on the Load button to open an Open dialog box and load a preset (stored as a .gam file).
However, when ControlClick() is used to clear the Link check box or to push the Load button, nothing happens. Making the dialog box the active window makes no difference.
The AutoIt Window Info tool indicates that the Reload a Bitmap, Save, Load and Reset buttons, the Link check box and the graph are all the same control. (See other images.) In fact, it there are only four controls on the page: the tab page, which is an instance of a SysTabControl32 class, and the three trackbars, each of which is an instance of the TridentTrackBar class. (Am unsure whether the SysTabControl32 class is a Windows or third-party control.)
What's the solution?
Note that the MouseClick() function—as opposed to ControlClick()—does work, but having AutoIt commandeer the screen pointer isn't an acceptable solution.
For the sake of completeness, here's the relevant code fragment for the Link check box.
;unlink trackbars WinActivate("(Multiple Monitors)") ControlClick("(Multiple Monitors)", "", 12320, "left", 1, 211, 252)
-
By Garrik
Hi guys!
I need some help here, is there a way to use Random with While?
I need this script to run in between 1 and 4 times but I dont know how to do it, can you please help me?
dim $i=1
While $i<=4
Sleep(3000)
Send("{LWINDOWN}r{LWINUP}")
Sleep(3000)
Send("C:\Users\123\Catalogos\tags.txt{ENTER}")
Sleep(3000)
WinActivate("tags: Bloc de notas","")
Sleep(3000)
Send("{SHIFTDOWN}{END}{SHIFTUP}{CTRLDOWN}c{CTRLUP}{DEL}{DEL}")
Sleep(3000)
Send("{CTRLDOWN}g{CTRLUP}{ALTDOWN}{F4}{ALTUP}")
Sleep(3000)
Send("{CTRLDOWN}v{CTRLUP}{SPACE}")
$i=$i+1
WEnd
-
By basictheprogram
#include <Constants.au3> Func Install() ConsoleWrite("Install EasyLog" & @LF) Local $handle = WinWaitActive("EasyLog USB Device Driver Installer") ConsoleWrite("Install EasyLog2 " & $handle & @LF) Local $blah = ControlClick($handle, "", "[CLASS:Button; INSTANCE:1]", "Left", 1) ConsoleWrite("Install EasyLog3 " & $blah & @LF) WinClose($handle) EndFunc Install() ConsoleWrite("End of Install!" & @LF) Trying to get AutoIt to click "Install" on the EasyLogUSB Device Driver Installer window.
Console displays:
Install EasyLog
Install EasyLog2 0x001B041E
Install EasyLog3 1
End of Install!
Windows Info confirms the Handle is 0x001B041E
Window Info for the Control
For the life of me I cannot figure out why the script is not working.
Even $blah says the ControlClick succeeded.
I've tried Send("{ENTER}") and MouseClick() those didn't work either.
Any help would be appreciated.
Thanks.
-
By TheDcoder
Hello, it has been a long time since I have posted here
I am working on an AutoIt project where I need to enable to user to interactively choose any point or coordinate on the screen... something like a big overlay where the user can click anywhere on the screen to select that point. @UEZ's screenshot tool may have something similar to what I need:
I just checked the source code for the tool and I see that the Mark_Area function has a part in selecting the area to screenshot, I tried to figure out how it works but it is simply too complex and long...
So I was wondering if there were any examples of interactively selecting points on a screen? Maybe an UDF that I can just use in my script to make the whole thing a matter of adding few lines
Thank you for the replies in advance!
-
By AutoPM
#RequireAdmin AutoItSetOption('MouseCoordMode', 0) If WinExists("newtitle") Then ControlClick('newtitle', '', 'Button1') EndIf a Simple script to click Button on GUI with title "newtitle". this script is working fine on my laptop on [windows 10, windows 7]
but on a different laptop. script is not clicking this button, is there any alternative to control click then please tell. don't want to use mouseclick
Thank you
-
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now