Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Help with ControlID using the "X \ Y \ W \ H" Properties

$
0
0

Hello,

 

I am having some trouble with ControlID when I use the "X \ Y \ W \ H" properties. The reason I am trying to use the "X \ Y \ W \ H" properties instead of "[CLASS:Edit; INSTANCE:1]" is because the instance number changes as my script is ran, so if I refer to it as instance 1 at the end of the script, it is not pointing to the correct text box.

 

I'm not sure if using X and Y is a good idea though, since the X and Y can change if the size of the window is changed. Is it possible to just use W and H?

 

I have also though about using ControlGetHandle, but that brings another set of problems with it. When I looked in the help file under controls (http://www.autoitscript.com/autoit3/docs/intro/controls.htm) there were no examples using the "X \ Y \ W \ H" properties.

 

(Apologizes if this has already been discussed in the forums...I searched and could not find anything)

 

When i use the code below, the text does not get set:

 

Code:

ControlSetText($_currentWindowHWND, "", "[X:1081; Y:9; W:188; H:15]", $_orderNumber)

AutoIt v3 Window Info (Coord mode = "Window"):

Plain Text         
>>>> Window <<<< Title:    Title System Main Class:    WindowsForms10.Window.8.app.0.360e033_r15_ad1 Position:    366, 59 Size:    1328, 900 Style:    0x16CF0000 ExStyle:    0x00050100 Handle:    0x00040584 >>>> Control <<<< Class:    Edit Instance:    1 ClassnameNN:    Edit1 Name:     Advanced (Class):    [CLASS:Edit; INSTANCE:1] ID:    1001 Text:     Position:    1078, 9 Size:    188, 15 ControlClick Coords:    29, 7 Style:    0x50000380 ExStyle:    0x00000000 Handle:    0x00040712 >>>> Mouse <<<< Position:    1111, 58 Cursor ID:    0 Color:    0xEEE8AA

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>