|
Post by Steve on Jan 22, 2020 2:30:53 GMT
I have a simple macro. Just ten simple mouse-clicks. That’s all. It works fine when run from MMM. It used to work fine when kicked off from an Excel button. The macro began working incorrectly from the Excel button after I reinstalled Excel. It still works great when executed directly from MMM so I don’t think there is anything wrong with the macro.
The Macro’s first step is to move from the Excel button and click on a taskbar icon. This pops up a new window. The rest of the macro steps are supposed to click on items on the new window.
This is what happens: I click the Excel button. I see the mouse pointer move to the taskbar icon. The icon is clicked and the new window pops up. After that the macro seems to continue to do its thing but it seems to be doing it “underneath” the new window. The macro doesn’t recognize the new window. The macro runs to completion without errors but nothing on the new window is clicked. The macro never changes focus to the new window.
How do I get the macro to recognize the new window after clicking on the taskbar icon?
Thanks for your help,
Steve
|
|
|
Post by Steve on Jan 23, 2020 1:37:17 GMT
Hi Steve, Must be something with the re installation. Did it change the version of excel? There are some things you can try, mostly they involve using different ways to bring the excel window into focus. Check out www.turnssoft.com/conditions.html in particular the SELECT WINDOW BY NAME and KEYPRESS actions. The SELECT WINDOW BY NAME action when run will find a window title and bring that into focus. The KEYPRESS action or Keypress generally when run can present an option to switch to the correct window. Something like this for keypress to change focus: 1 | X | X | 1 | Keypress Alt+ | tab 2 | X | X | 500 | Keypress tab
Or something like this to select window title for focus: IF | WINDOW TITLE | myexcel window title.xls | EXIST | SELECT WINDOW BY NAME | myexcel window title.xls
|
|
|
Post by Steve on Feb 4, 2020 16:42:36 GMT
I finally figured it out.
The secret is to run MiniMouseMacro.exe as Administrator.
On Windows 10: Right Click MiniMouseMacro.exe >> Properties >> Compatibility >> check the box: "Run this program as an Administrator"
I have Malwarebytes and Norton Firewall/Antivirus. Maybe one of them was preventing the auto-key-click in the taskbar until MiniMouseMacro.exe was given sufficient privileges. Not sure.
|
|