Speed up the Mouse-Clicks in Office Applications

Moderator: MVogt

Antworten
Benutzeravatar
Theo_Gottwald
Beiträge: 309
Registriert: 03. Okt 2009, 08:57
Wohnort: Herrenstr.11 * 76706 Dettenheim
Kontaktdaten:

Speed up the Mouse-Clicks in Office Applications

Beitrag von Theo_Gottwald » 14. Aug 2018, 11:04

The Matrix42 pacakge Robot has many features that go far beyond "automation of Setup".
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: Alles auswählen

' +++ 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\
NOTE: The Script was made with a german Outlook 2016 so you may need to change the Menu and windows-Texts to your language to use the Script. Also this is only a Subprogramm, the other parts are inside the attachement.
Dateianhänge
Outlook 2016.zip
Outlook 2016 Sample "Junk-It" Button Bar using the MPR.
(3.62 KiB) 94-mal heruntergeladen

Antworten

Zurück zu „Package Robot“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast