Jump to content
Sign in to follow this  
Hest

GUISetOnEvent or GUIGetMsg

Recommended Posts

Hest

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!

Share this post


Link to post
Share on other sites
PsaltyDS

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

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  

×