Sign in to follow this  
Followers 0
MePHiTiC

WinActivate won't activate a window

5 posts in this topic

I have an installer that goes well until a configuration screen pops up behind the main install window. No matter what I try, I can't get the config screen to activate. Below is the Window info from AutoIt. Any ideas?

>>>> Window <<<<
Title:  Table Manager Configuration
Class:  WindowsForms10.window.8.app.0.33c0d9d
Position:   468, 207
Size:   504, 426
Style:  0x16CB0000
ExStyle:    0x00050180
Handle: 0x00330504

>>>> Control <<<<
Class:  
Instance:   
ClassnameNN:    
Advanced (Class):   
ID: 
Text:   
Position:   
Size:   
ControlClick Coords:    
Style:  
ExStyle:    
Handle: 0x00190518

>>>> Mouse <<<<
Position:   930, 220
Cursor ID:  2
Color:  0xD1D3DD

>>>> StatusBar <<<<

>>>> Visible Text <<<<
Connection Status:
Test Connection
OK
Please provide configuration information
Trusted Connection
User ID:
Database:
Password:
Server:


>>>> Hidden Text <<<<

I've tried window title and handle without luck. Can anyone help?

MePH

Share this post


Link to post
Share on other sites



post your code

Share this post


Link to post
Share on other sites

Here is my code:

$SERVER = "192.168.1.1"
$DB = "database"
$USER = "username"
$PASSWORD = "password"

Opt("WinTitleMatchMode", 2)
ShellExecute("TableTouch Setup.msi")

If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","Welcome to the Table Manager Setup Wizard")
Send("!n")
If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","Please select applications to be installed.")
Send("!n")
If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","The installer will install Table Manager to the following folder.")
Send("!n")
If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","Confirm Installation")
Send("!n")


;This is the window that will not activate!
If Not WinActive("Table Manager Configuration","") Then WinActivate("Table Manager Configuration","")
$handle = WinGetHandle("Table Manager Configuration")
WinWaitActive($handle)
ControlClick("Table Manager Configuration","",1312620)
Send($SERVER & "{TAB}" & $DB & "{TAB}" & $USER & "{TAB}" & $PASSWORD & "{TAB}{TAB}{TAB}{ENTER}")



If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","Table Manager has been successfully installed.")
ControlClick("Table Manager","",5567)

Share this post


Link to post
Share on other sites

try to use:

WinActivate('[Class:WindowsForms10.window.8.app.0.33c0d9d]', '')

Share this post


Link to post
Share on other sites

This is what I have that will not activate the window that popups behind the main window:

Opt("WinTitleMatchMode", 2)
ShellExecute("TableTouch Setup.msi")

If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","Welcome to the Table Manager Setup Wizard")
Send("!n")
If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","Please select applications to be installed.")
Send("!n")
If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","The installer will install Table Manager to the following folder.")
Send("!n")
If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","Confirm Installation")
Send("!n")


;This is the window that will not activate!
If Not WinActive('[Class:WindowsForms10.window.8.app.0.33c0d9d]', '') Then WinActivate('[Class:WindowsForms10.window.8.app.0.33c0d9d]', '')
WinWaitActive('[Class:WindowsForms10.window.8.app.0.33c0d9d]', '')
ControlClick('[Class:WindowsForms10.window.8.app.0.33c0d9d]', '',1312620)
Send($SERVER & "{TAB}" & $DB & "{TAB}" & $USER & "{TAB}" & $PASSWORD & "{TAB}{TAB}{TAB}{ENTER}")



If Not WinActive("Table Manager","") Then WinActivate("Table Manager","")
WinWaitActive("Table Manager","Table Manager has been successfully installed.")
ControlClick("Table Manager","",5567)

Share this post


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
Sign in to follow this  
Followers 0