Jump to content

Recommended Posts

Posted

I am making a script for automation. The button to be pressed has a weird Class: ATL: 08293658. This Class is dynamically numbered. I can not click on the button by ID. Can I Combat Dynamis Class Class ALT?
ID and Text are static. The program has several Class ALT buttons with the text Image. What can I do?

Class: ATL: 08293658
Instance: 2
ClassnameNN: ATL: 082936582
Name:
Advanced (Class): [CLASS: ATL: 08293658; INSTANCE: 2]
ID: 12
Text: Image

Posted
50 minutes ago, Ipopraw said:

I am making a script for automation. The button to be pressed has a weird Class: ATL: 08293658. This Class is dynamically numbered. I can not click on the button by ID. Can I Combat Dynamis Class Class ALT?
ID and Text are static. The program has several Class ALT buttons with the text Image. What can I do?

Class: ATL: 08293658
Instance: 2
ClassnameNN: ATL: 082936582
Name:
Advanced (Class): [CLASS: ATL: 08293658; INSTANCE: 2]
ID: 12
Text: Image

This button looks like a arrow picture. Instance static too.

Can you get a sample?

 

Posted

@Ipopraw
There are a bunch of functions which all start with Control* which can help you with your script.

Global $hWnd = "Handle/Title of your Window", _
       $hControlID

hControlID = ControlGetHandle($hWnd, "", 12) ; 12 is the ID of the control you are trying to automate
ConsoleWrite("ControlID = " & $hControlID & @CRLF)

Open the Help file, try them, and see what happens :)

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Posted
19 hours ago, FrancescoDiMuro said:

@Ipopraw
There are a bunch of functions which all start with Control* which can help you with your script.

Global $hWnd = "Handle/Title of your Window", _
       $hControlID

hControlID = ControlGetHandle($hWnd, "", 12) ; 12 is the ID of the control you are trying to automate
ConsoleWrite("ControlID = " & $hControlID & @CRLF)

Open the Help file, try them, and see what happens :)

This script does not compile.

Posted
16 hours ago, Nine said:

If the ID changes also, you could use RegExp like this

Global $hWnd = WinGetHandle ("Title of your Window")
Global $hControlID = ControlGetHandle($hWnd, "", "[REGEXPCLASS:(ALT.*)]") ; class that starts with ALT
ConsoleWrite("ControlID = " & $hControlID & @CRLF)

 

Thank You! This is work and bast way for me.

$hWnd = WinWait("My title")
$sButton = "[REGEXPCLASS:ATL:....3658; INSTANCE:2]"
ControlClick($hWnd, "", $sButton)

 

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...