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

ClassnameNN vs. Control ID

$
0
0
I am new to AutoIt & am using the tool to create a data entry script a client/server application built in Windows. In order to use ControlSend, I need the Control ID to access the field in question. For example:

ControlSend("Clinical User", "", 6, "{ENTER}")

There are a number of text fields & select list I need to work through in the application. If I simply Tab through the fields, I can output the ClassNameNN instead of the Control ID.


Local $i = 0
Do
   sleep(300)
   $id = ControlGetFocus("[CLASS:ThunderRT6FormDC]", "")
   ConsoleWrite($id & @CRLF)
   send("{TAB}")
   $i = $i + 1
   sleep(300)
Until $i = 26

The script I created runs fine using the ClassnameNN as opposed to the Control ID.

The question that I am trying to resolve - Is this approach valid?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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