Sign in to follow this  
Followers 0
CrewXp

Unable to SW_SHOW the Window after Hiding it...

4 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

thx! that worked. But I had to use

WinSetState($hWnd,"",@SW_HIDE)
etc... in order to get it to work.

Share this post


Link to post
Share on other sites

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.

[center]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.[/center]

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