Ignore UserInput until Igor is done running a set of macros/procedures

Hello

Is there a built in way to tell Igor to ignore cursor/mouse movements while it is completing a procedure?

I built a GUI with various buttons which calls multiple windows, and then a special "AutoAnalysis" button that does all the clicks for me... but it will "bug" if i move my cursor during the execution (because in moving my cursor I am messing up with which window is the front window etc)

Any suggestion ?

1. It sounds like you have some 'fragile' code that would be more robust if rewritten to avoid relying on top window, etc. The best solution would likely be to fix the code.

2. If you want to avoid fixing the code, you may get some mileage out of PauseForUser, or maybe even a window hook, though if your automation relies on bringing a sequence of windows to the front that may not work.

Note that windows can be named, and code can always specify a window name rather than relying on a window being on top at the time of execution. I still have code that creates control panels and adds controls without specifying the window name. In normal life this doesn't case a problem, but it's much better to assign a window name as the window is created and then use the appropriate flag to specify window name as each control is added, just in case a user somehow manages to click on another window as the panel is rendered. The same applies in other situations.

> and then a special "AutoAnalysis" button that does all the clicks for me...

Ugh!

Tony is right here. You have some 'fragile' code, to put it politely.

You should have that AutoAnalysis button directly run the functions that are otherwise called by "all the clicks".

In any case, another option might be to have a fidget spinner on hand for when you press that AutoAnalysis button. Put up a dialog box ...

"To continue successfully, pick up a Fidget Spinner in each hand and press Go with your nose."

:-)

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More