You can automate many tasks that you do need to do "every day".
A "real life" example is "Junking E-Mails". In my Outlook 2016 i will need to press for each "Junk-Mail 3 times and drive with the mouse around to add the sender to the list of blocked senders.
So how can it be done?
The MPR enables you to make a small "Button-Bar" at the side of any Application.
If you click these buttons, the Robot will do the "recorded or scripted actions".
I just did a did a small script that will do it for me. "Junk an e-Mail" an it can Junk multiple E-Mails.
And i will take that Script as an Sample to show "How you can speed up Mouse Clicks".
Originally the MLC\ Command was used for the Mouse-Click. This command will just do what a human user does.
It will drive the mouse to the target and click. Using it every day i wanted to speed this up.
See here how it works:
How does it internally work?
What does it do?
Note that such Macro-AddOns can be done for any Application and any User Defined Macro.
The faster way would be to just "Jump there" with the mouse and click. For this the MLC\-command can simply be replaced with the MLI\-Command. In most Applications.
Just in Office and in Outlook this is not going to work, because the Application will not react to "Only Mouse clicks" - it wants a small mousemove in the target area! Don't ask me why.
So i replaced the MLC\ with a GSB\Move and used the Features of MMV\ to position the mouse relativ to its current location.
This will satisfy Outlook and is perfectly fast. Now there was one thing to watch out for.
There is one thing that is also important. Originally i did not do the TDL\5 (Pause 5 ms) after each "relative Mouse-move".
Then the acript will work fine when started from the Editor because the Editor makes around ~100 ms Pause after each line.
But when compiled as Executable the Script will not work. This is because the script will execute too fast and Outlook will not recognize the Mousemoves. So the TDL\5 are important.
So here is the code for the complete "JunkIt.rem" Subprogram. I will also attach it as a ZIP-File.
Code: Select all
' +++ JunkIt.rem +++
' Zweck:
' erstellt am: 11.04.2018
' von: Theo Gottwald
'========================
' Junk E-Mail
VAR\$$MBO=$v1$
IVV\$$MBO=r
GOTO out
EVV\
GSB\Safe
STW\rctrl_renwnd32\outlook|w31
SPC\outlookgrid\tabellenansicht|w31
HTV\$$WIN
MIW\
VAR\$$XPO=$v1$
VAR\$$YPO=$v2$
:retry
GCT\
SPC\outlookgrid\tabellenansicht|w31
MPO\o\$$XPO,$$YPO
MRC\
IWF\1
GTW\net ui tool window\*
ECH\
ELSE
GSB\Safe
GOTO retry
EWF\
WII\5
AGR\0|12\Junk-E-Mail\\\\:retry
GSB\Move
WII\5
TDL\100
' Nächstes Menü
GTW\net ui tool window\*|x
WII\5
AGR\0|12\Absender sperren\\\\:retry
GSB\Move
MLI\
ECH\0
SCW\$$WIN
MPO\o\$$XPO,$$YPO
:out
@
' Safety: Shift-Key will end the Plugin!
:Safe
IKD\20
SKA\20
END\
EKD\
RET\
' This will do the trick
:Move
MPO\
TDL\20
MMV\U3
TDL\5
MMV\R5
TDL\5
MMV\D4
TDL\5
MMV\L5
TDL\5
RET\