Jump to content

WinSetState($handle, "", @SW_MAXIMIZE) Problem


oller
 Share

Recommended Posts

Hi there, sorry for bugging you with my lack of knowledge.

I try to maximize a programm (Rhapsody)

I did not get farter than this:

$status = WinGetState("Rhapsody")

WinSetState($handle, "", @SW_MAXIMIZE)

What happens when I run the script is:

- Rhapsody "hangs" does not longer respond to input

- Task Manager shows two instances of Rhapsody.exe. I don't understand why.

I tried to figure out what is going on using this script:

$status = WinGetState("Rhapsody")

MsgBox ( 4096, "title", $status )

That returns:

39 for maximized

7 for what you call it (between maximized and minimized)

5 for minimized

Those codes are not in the manual. What do they mean?

Where is my mistake?

Regards Oller

Link to comment
Share on other sites

  • Developers

That returns:

39 for maximized

7 for what you call it (between maximized and minimized)

5 for minimized

Those codes are not in the manual. What do they mean?

39 = 32 + 4 + 2 + 1 see helpfile for what they mean....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

39 = 32 + 4 + 2 + 1 see helpfile for what they mean....

Thanks. So this is like it should be.

But why is Rhapsody behaving so funny? The same script on other windows works fine.

Edited by oller
Link to comment
Share on other sites

  • Developers

Thanks. So this is like it should be.

But why is Rhapsody behaving so funny? The same script on other windows works fine.

Dunno... don't have Rhapsody ... What is the value of $Handle ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Dunno... don't have Rhapsody ... What is the value of $Handle ?

$handle = WinGetHandle("Rhapsody", "")

MsgBox ( 4096, "title", $handle )

00240236 (maximized and normal)

00160252 (minimized)

Is that normal to get differnt handles?

-Oller

Link to comment
Share on other sites

  • Developers

$handle = WinGetHandle("Rhapsody", "")

MsgBox ( 4096, "title", $handle )

00240236 (maximized and normal)

00160252 (minimized)

Is that normal to get differnt handles?

-Oller

Maybe it has second hidden window....

You also said that the WinGetState() returns a 5 for Minimized which means 4+1 and the 2="Window Is visible" is missing. This would indicate a hidden window.

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Maybe it has second hidden window....

You also said that the WinGetState() returns a 5 for Minimized which means 4+1 and the 2="Window Is visible" is missing. This would indicate a hidden window.

Right!

and after:

WinSetState($handle, "", @SW_MAXIMIZE)

there are two rhapsody.exe in the taskmanager!. I think the second one becomes visible with WinSetState. Well thanks. I keep trying.

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...