ChuckZ Posted September 15 Posted September 15 not having much luck. cant even get this drop down to work. ControlClick("Rental4000 Lease Management (SCL-TSGW01.cube.ad)", "", "[CLASS:RAIL_WINDOW; INSTANCE:2]") Sleep(5000) ControlClick("Rental4000 Lease Management (SCL-TSGW01.cube.ad)","", "", "left", 1, 326, 167) Sleep(5000) ControlClick("Rental4000 Lease Management (SCL-TSGW01.cube.ad)","", "", "left", 1, 891, 202) ;MouseClick("left",726,157) Sleep(5000)
Nine Posted September 15 Posted September 15 First when you post code, please use the method shown in the link. I understand you have zero experience with programming. The one thing you need to assimilate : do not try to make a fully runnable script at the very beginning. Do very simple steps checking every statement for results (including @error). In your case, make sure you got the right handle of your window. Use the au2info tool to confirm while showing the result of your script with ConsoleWrite or MsgBox. One another recommendation, read carefully the help file for each statement you are using. If you do not understand one part, come back here asking clarification. Always provide a simple example of your concern, make it runnable so we do not have to rewrite your partial code. Good luck. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
argumentum Posted September 15 Posted September 15 5 hours ago, ChuckZ said: not having much luck. cant even get this drop down to work. ControlClick("Rental4000 Lease Management (SCL-TSGW01.cube.ad)", "", "[CLASS:RAIL_WINDOW; INSTANCE:2]") Sleep(5000) Maybe Send("!b") will click/select &Billing ?, get what you want to that way ? Also, when I code some ControlClick(), I first MouseMove() to see if the mouse cursor is actually there, because the blur in the picture shows that your monitor is using scaling, and if so, the coordinates are wrong. So..., multiply by the scale ( eg: 150% = * 1.5 ). So @ChuckZ, welcome to the forum, learn to use it ( the forum ), and be patient while you learn how to ...stuff ChuckZ 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting
junkew Posted September 17 Posted September 17 Example script so you can follow where your mouse is going, you could replace the mouseclick with your controlclick if you want to. As it seems you want to use it for testautomation AutoIt can do a lot for you and when it gets difficult there are some advanced libraries for MS IUIAutomation, OCR when the controls are not recognized by Au3Inf (but would not start with that if you are new to AutoIt) ; Set mouse coordinates to be relative to the active window (Client area) ; This visually demonstrates how DPI scaling causes the cursor to miss the target. Opt("MouseCoordMode", 2) Global $sTitle = "Rental4000 Lease Management (SCL-TSGW01.cube.ad)" ; Step 1: Wait for and activate the target window WinWait($sTitle, "", 10) WinActivate($sTitle) WinWaitActive($sTitle, "", 10) ; Step 2: Interact with the RAIL_WINDOW component ControlClick($sTitle, "", "[CLASS:RAIL_WINDOW; INSTANCE:2]") Sleep(2000) ; Paused for 2 seconds so the junior can see each action step-by-step ; Step 3: Move to first location and click (Visualizes the DPI offset error) MouseMove(326, 167, 10) ; Moves smoothly (speed 10) Sleep(1000) MouseClick("left") Sleep(2000) ; Step 4: Move to second location and click (Visualizes the DPI offset error) MouseMove(891, 202, 10) ; Moves smoothly (speed 10) Sleep(1000) MouseClick("left") Sleep(2000) ChuckZ 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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