Jump to content

Unable to control an application sub-window


Recommended Posts

I have a valid AutoIt support question and kindly provide the details of my system:

AutoIt Version: V3.3.14.5 [X32]
Windows Version: WIN_10/2009 [X64]
Language: English (United States) (0409)

I utilize AutoIT to successfully invoke and control various applications, but am encountering difficulty trying control a sub-window associated with the AQT application.

I can use AutoIT to invoke AQT, feed it the necessary prompts to login to a database and execute a SQL*Plus procedure, but AQT then opens a sub-window to process the SQL*Plus procedure and I have been unable to interact successfully with that sub-window (see screenshot AQT_Windows).  I have attached the AutoIT Window Info for it (see screenshot  AQT_SQLPlus_Info). My objective is to detect the "PL/SQL procedure successfully completed." message so I can then send an Exit command to the SQL*Plus sub-screen without the operator having to do it.

The code I am using from the point where I tell AQT to execute the SQL*Plus option is shown below:

Opt("WinTitleMatchMode", 2) ; anywhere match

; invoke AQT 'Run Using SQL*PLUS' option
Send('+{F6}')

; SQL*Plus screen active
WinWait("c:\Program Files (x86)\Advanced Query Tool","PL/SQL procedure successfully completed.")
WinActivate("c:\Program Files (x86)\Advanced Query Tool","PL/SQL procedure successfully completed.")

; diagnose whether SQL*Plus screen is detected
If WinActive("c:\Program Files (x86)\Advanced Query Tool","PL/SQL procedure successfully completed.") Then
    MsgBox(0,$Toolname,"SQL*Plus active")
Else
    MsgBox(0,$Toolname,"SQL*Plus not active")
EndIf

 

I added the If WinActive command as a diagnostic and I get the "SQL*Plus not active" message.

AQT_Windows.png

AQT_SQLPlus_Info.png

Link to post
Share on other sites

The Autoit script opens an app named Advanced Query Tool (AQT), and supplies information to this app to guide it to accomplish the desired tasks. One of these task is to execute a PL/SQL command using AQT's built-in link to SQL*Plus, which is the sub-window I am having trouble communicating with.

Link to post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...