Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
minimizing unexpected interference during macro execution
#1
I've created a nice macro system as a shell around QuickBooks to simplify and validate data entry. It seems to function flawlessly, however, the other day, while it was running, The Window's XP Automatic Updates system popped up with the window asking me if I wanted to install the new updates it had downloaded. Without my doing anything, my macro went crazy sending keystrokes everywhere, and ignoring my "rightclick-end macro" efforts on the tray icon. I had to power down to end it.

Is this something I can prevent?

I'd like to distribute this macro to other clients of mine (I'll need to find out the site licensing price, too) but this was unsettling, as I can't possibly test it against the large number of other apps that may pop up unexpectedly.

Craig
#2
Currently, QM cannot automatically prevent this.

Windows does not allow inactive programs to activate windows. But some programs still can activate windows. When QM runs first time, it disables this Windows feature to avoid possible problems when activating windows and running programs. It can be reenabled in QM Options -> Run Time. QM will still work properly.

Macro can test what window is active. Example:

int w1=win("Quick Books")
key abc
ifa-(w1) goto error
key def
ifa-(w1) goto error
...
int w2=win("Another Window")
key ghi
ifa-(w2) goto error
key jkl
ifa-(w2) goto error


Forum Jump:


Users browsing this thread: 1 Guest(s)