Jump to content
Sign in to follow this  
CheshireSoft

User Interaction While Performing Operations Possible?

Recommended Posts

CheshireSoft

Hi. I have been struggling with this issue for a long time now. I am unable to get my autoit programs to properly respond to user input while my program is performing any sort of operations. For instance, initial/main program loop checks for button presses successfully but after I enter any other loop this does not work properly even if I add $nMsg = GUIGetMsg() and corresponding conditional statements within the nested loops. When I add this sort of code to the nested loops what winds up happening if lets say someone tries to exit the program is that it wont exit until several iterations of the loop later. I don't understand this. How is this done properly?

Share this post


Link to post
Share on other sites
somdcomputerguy

This function, HotKeySet, may help..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
CheshireSoft

This function, HotKeySet, may help..

this isnt what im looking for. buttons need to work when user clicks them even if loops are iterating.

Share this post


Link to post
Share on other sites
Tvern

A few suggestions:

- Use Opt("GUIOnEventMode", 1) instead of messageloop.

- Use smaller functions that return to the main loop more regularly

- Put your GUIGetMsg() in a function which you call in the main loop, but also regularly in your functions. ;I wouldn't reccomend this as it's not commonly done this way. There's progably a reason for that.

- Post your script here so you'll get more response

edit: The suggestions are different ways to fix your problem, they're not meant to all be implemented, but rather you pick the one that best fits your needs and discard the others.

Edited by Tvern

Share this post


Link to post
Share on other sites
GEOSoft

A few suggestions:

- Put your GUIGetMsg() in a function which you call in the main loop, but also regularly in your functions. ;I wouldn't reccomend this as it's not commonly done this way. There's progably a reason for that.

There is a good reason for that.

If the GUIOnEventMode option is set to 1 then the return from GUIGetMsg is always 0 and the @error is set to 1.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.