Jump to content

GUISetOnEvent or GUIGetMsg


Recommended Posts

Normally I use GUIGetMsg in my scripts, but I have just played around with GUISetOnEven. Both are working fine, but is one better than the other and why?

Whats the best one to use or does it depend on what I'm making or is there any performance difference?

I made an excample where I read something from Commandline and the script with GUISetOnEvent could be closed at once, where the other one would need a little extra time, I guess thats one of the differences?

Can someone please explain to me whats best and why.

Thanks in advance

Edited by Hest
Software:Model Train Calculator (Screen)Autoit3 beginner!
Link to comment
Share on other sites

Normally I use GUIGetMsg in my scripts, but I have just played around with GUISetOnEven. Both are working fine, but is one better than the other and why?

Whats the best one to use or does it depend on whay I'm making?

I made an excample where I read something from Commandline and the script with GUISetOnEvent could be closed at once, where the other one would need a little extra time, I guess thats one of the differences?

Can someone please explain to me whats best and why.

Thanks in advance

It's a trade off between simplicity (GuiGetMsg), and capability (GuiOnEventMode).

If your script doesn't have much work to do while waiting for GUI inputs, and you don't need to handle additional GUI inputs while the earlier is handled, then the message loop is quick and easy to code.

However, if your script is very busy, and you want to get other things done during the time you are not handling new GUI inputs, and if you need one GUI action to interrupt the processing of another, then you need event mode.

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...