Jump to content

Recommended Posts

Posted (edited)

Nope, I believe it's because GUIGetMsg() is reset when polled the first time (though I'm not a Dev so it's just a guess.) >>

Global $hGUI, $iButton, $iMsg

$hGUI = GUICreate("No AutoIt Bug")
$iButton = GUICtrlCreateButton("Exit", 10, 10, 100, 40)
GUISetState(@SW_SHOW, $hGUI)

Do
    $iMsg = GUIGetMsg()
Until $iMsg = -3 Or $iMsg = $iButton
Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

  On 8/5/2011 at 10:44 PM, 'guinness said:

Nope, I believe it's because GUIGetMsg() is reset when polled the first time (though I'm not a Dev so it's just a guess.) >>

Global $hGUI, $iButton, $iMsg

$hGUI = GUICreate("No AutoIt Bug")
$iButton = GUICtrlCreateButton("Exit", 10, 10, 100, 40)
GUISetState(@SW_SHOW, $hGUI)

Do
    $iMsg = GUIGetMsg()
Until $iMsg = -3 Or $iMsg = $iButton

That is all i need to know.
Posted

You're welcome. I would also like to know if my interpretation of how GUIGetMsg() works was correct as the Help file didn't really say much on the subject.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

  On 8/5/2011 at 10:50 PM, 'guinness said:

You're welcome. I would also like to know if my interpretation of how GUIGetMsg() works was correct as the Help file didn't really say much on the subject.

That will be a good correction for the help file.
Posted

  On 8/5/2011 at 10:53 PM, 'monoscout999 said:

That will be a good correction for the help file.

Maybe something like this?

All GUI-events are stored in a queue. GUIGetMsg reads and removes the least recent event. (FIFO)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

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
  • Recently Browsing   0 members

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