Sign in to follow this  
Followers 0
jpm

GuiMsg return values

3 posts in this topic

#1 ·  Posted (edited)

With the June 4th update the return value for GuiMsg() or GuiMsg(timeout) has changed.

It is no more possible to check that the Gui Closed with only one condition because a button close action will return -3 as the cross red button action (in fact not really working to day but that the intention).

The GuiMsg(0) has no change except the bug correction just mentioned.

now to handle action on non closing action inside the loop we have to write

While 1
   $msg = GuiMsg()

   Select
     Case $msg = -3 OR $msg = -1
       ExitLoop
     Case $msg = $ncontrol
       MsgBox(0, "", "control clicked")
     ...
     ...
   EndSelect

Wend

before we can have written

While GuiMsg()>0
  Select
     Case $ncontrol = GuiRead()
       MsgBox(0, "", "Control clicked")
   ...
   ...
   EndSelect
Wend

; post action on the gui Closed

The problem is to decide to change the -4,-5,-6 corresponding to a positive value for the maximized/minimized/restored

I propose to change them to 4 5 6 and to have the first assign control to 7 instead of 2

JUst confirm/object

Edited by jpm

Share this post


Link to post
Share on other sites



Remember to ajust the max index for the number of controls

If we allow a total of 512 controls, the max index would need to be 519.

Maybe we could make the first control 10; I like round numbers and it allows us room to expand again if we need to.


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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