Now just go to the code of the main script that you are writing and and paste the info that is in the Windows clipboard. Press the pause key to exit the little script above Place your mouse over the coordinates that you wish to click That said, I find it easier to use a little script to help out with such tasks: AutoItSetOption ( "MouseCoordMode", 2 ) AutoItSetOption ( "TrayIconDebug", 1 ) HotKeySet ( "", "Terminate" ) While 1 $pos = MouseGetPos ( ) ToolTip ( "Client X: " & $pos & ", " & "Window Y: " & $pos & " Pause2exit" ) Sleep ( 10 ) WEnd Func Terminate ( ) ClipPut ( 'MouseClick("left",' & $pos & ',' & $pos & ',1,1)' ) Exit EndFunc =>TerminateRun the script aboveĬlick on the window of interest to bring it into focus - if need be use java robot class or autoIT to move mouse. Those can be changed to display coordinates with respect to screen, window or client by using the Options menu. Python answers related to python selenium move cursor to coordinates python. I think that jben should stick with the mouse position coordinates displayed within the AutoIt v3 Window Info tool, on the tab named "Mouse". If I have left out any important information or was unclear anywhere please let me know.If you use the AutoIt v3 Window Info tool, on the Control Tab, it will tell you the Position of the button realative to the GUI.Perhaps we are using different versions of the AutoIt v3 Window Info tool, 'cuz my version only shows ControlClick Coords on the tab named Control and they are not with respect to the Client area of the highlighted window. ![]() So my fundamental question is what code to use to drill into that "Button", find out what the list view looking thing is, and get the info from it, then interact with the map and legend check boxes without referring to pixel location (or at least grammatically get the pixel position). It is based on mouse movement and clicking, so if you would like to use your script with. The window info says that this surrounding boarder area (which seems similar to a panel) has a class of Button. The code generated by the Au3Record isnt always reliable, however. When I use the finder tool I can't get it to highlight the "list box" area, only the surrounding boarder that it and some buttons are in. ![]() for my purpose the Sample column is irrelevant. Name has the name of the layer, Map has a check box to control which layers are displayed, Legend has a check box that controls which layers appear in the legend window, and Sample for some layers has the symbol that will appear in the legend. ![]() The area that I am specifically interested is looks like a large list box (it takes up the vast majority of the window space) and it has 4 columns: Layer Name, Map, Legend, and Sample. The window I am referring to is titled "Map Layers". If someone has a good way to include or point to screen shots let me know but until then I will try to describe everything the best that I can. My problem is that I don't know how to do that. I am currently using code that simply simulates a mouse-click at a particular pixel position and as that of course needs to be set up differently depending on the screen being used at the time, I would like to replace the mouse-click simulation with getting the information from the window, looking for a certain text, then checking or unchecking the "Map" and "Legend" check boxes. I am trying to automate the process of turning display layers on and off in a modeling program using AutoIt.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |