Jump to content

Recommended Posts

Posted

 

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)

 

image.thumb.png.0e0471e35ce73df9c36dce2b3040d133.png

Posted

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.

Posted
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 :) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting  image.gif.922e3a93535f431de08b31ee669cc446.gif
autoit_scripter_blue_userbar.png

Posted

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)

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...