Jump to content

Unable to SW_SHOW the Window after Hiding it...


Recommended Posts

Hey, I'm creating a automated installer that goes through and sets up the setup for the user automatically. I wanted to hide the setup installation program from the user, and let autoit do everything in the background.....

But the thing is... I can't unhide it..

WinSetState("DevKitC Setup", "Welcome to DevKitC Setup Wizard", @SW_HIDE)
;;;CODE HERE THAT SELECTS BUTTON
WinSetState("DevKitC Setup", "Welcome to DevKitC Setup Wizard", @SW_SHOW)

It just doesn't show... I try almost every command there is.. maximize, show, enable, restore.... it just doesn't show up.

I have to manually exit from task manager.

Thanks.

Link to comment
Share on other sites

  • Moderators

Try using the Window Handle without the text parameter.

Edit:

Example:

$hWnd = WinGetHandle("DevKitC Setup", "Welcome to DevKitC Setup Wizard")
WinSetState($hWnd, @SW_HIDE)
;;;CODE HERE THAT SELECTS BUTTON
WinSetState($hWnd, @SW_SHOW)
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

thx! that worked. But I had to use

WinSetState($hWnd,"",@SW_HIDE)
etc... in order to get it to work.
Ha... yeah that makes sense considering I missed the text parameter :"> .... glad it worked though.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...