Sign in to follow this  
Followers 0
burton

@sw_maximize (maximize Windows)

4 posts in this topic

I have my script working, but the last step fails. There is no error message, so it should be working. Maybe the problem is, that my WINDOW_NAME's title is the same as the previosly opened window, and I am not sure whether it tries to maximize the already maximized, previous window.

I dont think it is the case though, because the window I want maximized is activated once the script has finished. Does the fact that the window is over-sized and off the screen cause a problem?

Here my script:

WinSetState("WINDOW_NAME", "", @SW_MAXIMIZE)

Is there a different command for opening a window in windows explorer, or how do I use the AutoIt Window Spy?

Thanks for any help....

Share this post


Link to post
Share on other sites



Try

WinSetState("WINDOW_NAME", "", @SW_RESTORE)

WinSetState("WINDOW_NAME", "", @SW_MAXIMIZE)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I did actually think of that, but didnt get round to doing it. Shouldnt it have been able to maximize directly, even when partly off the screen? Thanks anyway, it has done it like that...

Edited by burton

Share this post


Link to post
Share on other sites

It seems that sometime Windows (or maybe Autoit) think that the window is already Maximized so it ignores your command. Restore it solves this glitch....

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