autoit - ControlID changes each time a window is launched -


consider autoit code:

winactivate("test window")  sleep(5000)  controlclick("test window", "", 197128) 

there button in window testing. have written simple script click on button using controlclick. use controlid identify , click on button (i use autoit window info controlid). script works. problem control id changes each time test window launched. result, script not simulate button click each time new instance of window launched. how can make controlclick work expected every time?

for controls have dynamic control ids, best use advanced detection.

as can seen in file:

a special description can used controlid parameter used in of control...() functions. description can used identify control following properties:

for example,

controlsend("untitled - notepad", "", "[class:edit; instance:1]", "this text") 

or

controlclick("my window", "", "[class:button; text:finish; instance:2]") 

don't forget set:

opt("wintitlematchmode", 4) ;1=start, 2=substr, 3=exact, 4=advanced, -1 -4=nocase 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

debian - 500 Error upon login into Plesk Admin - auth.php3? -