Jump to content

Recommended Posts

  • Administrators

Jon: >...1 and 2 are COMPLETELY wrong...

What do you mean? Because of the loop or because of $msg = GuiMsg(0)

It is wrong because you each time you run GuiMsg you get a new event from the queue (if one is there) and that code basically pauses until there is an event ( GuiMsg() ) and then tries to read another event with GuiMsg(0). Best not to mix the types and remember everytime you call a GuiMsg function you get another event.

The GUI keeps track of what was clicked and stores it up (to a point) so when you call a GuiMsg function it simply checks the queue and returns each event. The difference (now) between GuiMsg() and GuiMsg(0) is that if there are no events waiting then GuiMsg() waits UNTIL something happens whereas GuiMsg(0) returns instantly with 0 so that you can do some other processing (adlib/hotkeys) in the meantime.

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

    No registered users viewing this page.

×
×
  • Create New...