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

ControlSend when the ID keeps changing

$
0
0
Hi Everyone,

I'm having problems getting my AutoIt script to interact with an application's control when I attempt to use ControlSend.

As far as I can tell using the Window Info tool, the ID of the control keeps changing to a unique number every time the program is launched.  This makes coding the ID number seem like an impossible task or perhaps I don't know what I'm doing.

I've tried the usual Google search, Help File search, Forum search, playing around with different code options like changing function inputs and even using Send (which doesn't work).

Can anyone please shed some light on how I'm using ControlSend because I'm sure I'm missing something but I don't know what I'm doing wrong.

[ autoit ]    ( Popup )
$i_PID_SQLite_Expert = Run("C:\Program Files (x86)\SQLite Expert Professional v3.1.6\SQLite Expert Professional.exe", "", @SW_MAXIMIZE) ConsoleWrite("$i_PID_SQLite_Expert = " & $i_PID_SQLite_Expert & @CRLF) $h_SQLite_Expert = WinWaitActive("SQLite Expert Professional 3.1.6.2082") If $h_SQLite_Expert <> 0 Then ConsoleWrite("WinWaitActive found title: SQLite Expert Professional 3.1.6.2082" & @CRLF) ControlSend("[CLASS:TdxBarControl]", "", "2034104", "!f") ;Previous values for ID according to Window Info include 2034104, 2426674, 2164300 If @error <> 0 Then ConsoleWrite("ControlSend !f success" & @CRLF) Else ConsoleWrite("ControlSend !f failure" & @CRLF) EndIf ControlSend("[CLASS:TdxBarControl]", "", "2426674", "n") $h_Database_Creation = WinWaitActive("Database Creation Properties") $s_Database_File = @ScriptDir & "\securities.db3" ControlSend("[CLASS:TcxCustomInnerTextEdit]", "", "460682", $s_Database_File) ControlSend("[CLASS:TcxComboBoxEx]", "", "658120", "32768{ENTER}{ENTER}") ProcessClose($i_PID_SQLite_Expert) Exit

Console:
[ code='text' ]    ( Popup )
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\icu\Desktop\Options Expres\Stock_Scanner\Database creation script.au3" /autoit3dir "C:\Program Files (x86)\AutoIt3" /UserParams +>23:57:45 Starting AutoIt3Wrapper v.2.0.1.24 Environment(Language:0409 Keyboard:00000809 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.19.0) from:C:\Program Files (x86)\AutoIt3 +>23:57:45 AU3Check ended.rc:0 >Running:(3.3.6.1):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\icu\Desktop\Options Expres\Stock_Scanner\Database creation script.au3" $i_PID_SQLite_Expert = 8076 WinWaitActive found title: SQLite Expert Professional 3.1.6.2082 ControlSend !f failure

Screenshot of AutoIt Window Info:
WindowInfo.png

Thank you for any help.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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