bob3d
Full Member
Posts: 26
|
Post by bob3d on Apr 24, 2021 21:15:33 GMT
I have one simple action I want MMM to do. Left Click a button on a specific part of my display just once, then exit.
What happens is the mouse pointer moves to the exact spot I want and then does NOT click at all. The code for doing this is extraordinarily simple, yet it does not work. The code I am using is:
1 | 925 | 290 | 500 | Left Click
That's the only line of code in the whole script. It couldn't be any simpler. Yet the mouse moves to the position I want it to be in and then the mouse does not perform the left click.
Any ideas why it wouldn't work? I am running this on a Windows 10 Pro machine running .NET version 4.8.
- bob
|
|
|
Post by Steve on Apr 25, 2021 1:29:46 GMT
Hi bob3dWhat are you clicking into? I say that because you are right, it should work and the syntax is fine. I think the issue might be whatever you are clicking into is not allowing MMM to hook into it. This might be because the MMM is running under a user context that is not permitted to perform this hook. Try running MMM as administrator. If this doesn’t work I’d suggest the issue is in the application MMM is clicking into. Let me know how you go. Cheers, Steve.
|
|
bob3d
Full Member
Posts: 26
|
Post by bob3d on Apr 25, 2021 8:19:20 GMT
Hi Steve!
Good to hear from you after all these years.
I am clicking a Minimize button on an application that comes up when I start my laptop, because that program doesn't have an option to start itself minimized. So I thought ahh; this is a job for MMM; to click the minimize button at startup. Very simple command line as I have stated in an earlier post. Except it just doesn't work. I tried running MMM as administrator as you suggested, but no luck. It just doesn't perform the click. EDIT 1: It does perform at least the left click down since I tried it on an icon that is on my desktop and it grabs the icon. On a window, it just refuses to select the minimize button. EDIT 3: It does in fact perform the left click down. What it is not doing is performing a left click up or left click release.
I have one more question: how do you have a MMM script self terminate and close its own window. I assume it would be an easy command like "exit", but I haven't yet experimented with it. EDIT 2: Nevermind on that question. I used the /e switch while running the script and it now self-terminates.
- bob
|
|
|
Post by philranger on Apr 25, 2021 13:40:36 GMT
Hello,
A few ideas:
1-
You can split your action in 2, like
1 | 925 | 290 | 500 | Left Click Down
2 | 925 | 290 | 50 | Left Click Release
Which may need a longer 2nd delay
2-
Try a keyboard shortcut such as:
1 | X | X | 200 | Keypress lwin+ | d (show desktop by minimizing all windows)
or
1 | X | X | 200 | Keypress lwin+ | down (minimizing active window)
I guess closing the window with ctrl+F4 or alt+F4 isn't an option?
Good luck and let us know!
|
|
|
Post by philranger on Apr 25, 2021 14:02:13 GMT
To get out of MMM, the following works too.
1 | RUN ACTION | EXIT
|
|
bob3d
Full Member
Posts: 26
|
Post by bob3d on Apr 25, 2021 16:08:13 GMT
1 | x | x | 200 | Keypress lwin+ | M
works well and will do for what I am after.
Thanks for the advice!
- bob
|
|
bob3d
Full Member
Posts: 26
|
Post by bob3d on Apr 25, 2021 19:35:59 GMT
You know I thought it was working, but now it is not working at all.
I am using this simple command to display the Desktop:
1 | 100 | 100 | 200 | Keypress lwin+ | D
Is this the correct syntax for pressing the Windows Key and the letter D?
- bob
|
|
|
Post by philranger on Apr 26, 2021 11:03:10 GMT
For an unknown reason your code doesn't work on my machine either but this work:
1 | 128 | 165 | 100 | Keypress lwin+ | d
as well as
1 | X | X | 100 | Keypress lwin+ | d
I guess it's the lowercase instead of uppercase?
|
|
bob3d
Full Member
Posts: 26
|
Post by bob3d on Apr 28, 2021 17:04:31 GMT
I tried a competing product, AutoHotKey, and have the same result. That is the window will not minimize. Therefore, the problem lies with the application itself and not with the key-press software or syntax.
I've moved on to other tweaks I'd like to make. Thank you for your ideas and suggestions.
- bob
|
|