Jump to content
Sign in to follow this  
nsvolante

AutoIT can't find Window?

Recommended Posts

nsvolante

Hey guys, im making an auto installer and half way through the installation it just stops the installation even though the name of the window only changes a bit.

WinWait ( "Oracle Universal Installer: Product-Specific Prerequisite Checks")
WinActive ( "Oracle Universal Installer: Product-Specific Prerequisite Checks")
WinActivate ( "Oracle Universal Installer: Product-Specific Prerequisite Checks")
Send("!N")
WinWait ( "Oracle Universal Installer: Summary")
WinActive ( "Oracle Universal Installer: Summary")
WinActivate ( "Oracle Universal Installer: Summary")
Send("!N")

The window it wont "use" is the last one, summary. I change windows many times before that so i dont understand why it doesnt work, ive confirmed the name with the AutoIt info tool and its correct. Ive thought about using mouseclick, but im not sure if i should use that, because i might run this on computers that have different resolutions, which might cause issues?

Im not sure what to do or try.

Share this post


Link to post
Share on other sites
FireFox

Hi,

There might be multiple wnds with that title, you need to find the handle of the active window first, then use it even if the title changes.

Edit : oh and Welcome to the autoit forum !

$hWnd = WinGetHandle("[active]")

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Colyn1337

Try adding at the start of your script...

opt("wintitlematchmode", 2)

And then looking for just "oracle installer" or something like that........ The match mode of 2 tells winwait and winactivate to search for your parameter in the whole string of the title.

So if the title is "this is the greatest program" and you do a winactivate("greatest") it'll catch that title.

Edited by Colyn1337

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  

×