Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

xmacro issues on Debian Stretch

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
wartisoc
Posts: 48
Joined: 2016-06-28 18:17

xmacro issues on Debian Stretch

#1 Post by wartisoc »

I have a rather simple macro file that looks like this:

Code: Select all

KeyStrPress Menu
KeyStrRelease Menu
KeyStrPress Up
KeyStrRelease Up
KeyStrPress Up
KeyStrRelease Up
KeyStrPress Up
KeyStrRelease Up
KeyStrPress Return
KeyStrRelease Return
Then I added a keyboard shorcut to execute the macro with:

Code: Select all

xmacroplay "$DISPLAY" < "/home/wartisoc/macros/my-macro.xmacro"
I use this to perform some repetitive tasks on my PC and, in Debian Jessie, the macro executed almost instantaneously; however, since I upgraded to Debian Stretch, the macro sometimes 'lags', it takes several seconds to complete. The lag by itself wouldn't be much of a problem but sometimes the macro performs the wrong action; the macro above opens the context menu, moves up three times and then presses Enter, however the macro sometimes moves up one more time than expected, selecting the wrong option in the context menu. Needless to say, this can lead to disaster; selecting the wrong option in the context menu could potentially delete files, modify data, etc..

Any idea why is this happening or how to solve it?.

Thanks.

wartisoc
Posts: 48
Joined: 2016-06-28 18:17

Re: xmacro issues on Debian Stretch

#2 Post by wartisoc »

Sorry for bumping this thread but since my last post I had to reinstall Debian due to a HDD crash and the issue is still present in a clean installation of Debian Stretch :(. Can someone at least confirm if xmacro works at all in Debian Stretch?.

Code: Select all

         _,met$$$$$gg.           wartisoc@debian
      ,g$$$$$$$$$$$$$$$P.        OS: Debian 9.2 stretch
    ,g$$P""       """Y$$.".      Kernel: x86_64 Linux 4.9.0-4-amd64
   ,$$P'              `$$$.      Uptime: 3h 36m
  ',$$P       ,ggs.     `$$b:    Packages: 1585
  `d$$'     ,$P"'   .    $$$     Shell: bash 4.4.12
   $$P      d$'     ,    $$P     Resolution: 1366x768
   $$:      $$.   -    ,d$$'     DE: LXDE
   $$\;      Y$b._   _,d$P'      WM: OpenBox
   Y$$.    `.`"Y$$$$P"'          WM Theme: Onyx
   `$$b      "-.__               GTK Theme: Clearlooks [GTK2]
    `Y$$                         Icon Theme: nuoveXT2
     `Y$$.                       Font: Sans 10
       `$$b.                     CPU: Intel Core i3 CPU 550 @ 3.2GHz
         `Y$$b.                  GPU: Gallium 0.4 on AMD CEDAR (DRM 2.49.0 / 4.9.0-4-amd64, LLVM 3.9.1)
            `"Y$b._              RAM: 1060MiB / 3882MiB
                `""""           

I made the following macro for testing purposes:

Code: Select all

Delay 5
KeyStr a
KeyStr b
KeyStr a
KeyStr b
KeyStr a
KeyStr b
KeyStr a
KeyStr b
KeyStr a
KeyStr b
KeyStr z
KeyStr a
KeyStr b
KeyStr a
KeyStr b
KeyStr a
KeyStr b
KeyStr a
KeyStr b
KeyStr a
KeyStr b
It's meant to print ab 5 times, followed by a z and then ab 5 more times. I used the following script to test it:

Code: Select all

#!/bin/bash
for i in `seq 1 10`;
do
  xmacroplay $DISPLAY < "test.xmacro"
done
An average result looks like this on my PC :(:

Code: Select all

abaababbabaabzabbabaabaabaab
abbabbabbababzzabbabaabaabaab

ababababbabzzabbabbabaabaab

ababbabbabbabzzabbabbababaab

abababbabbabzabbabbabaabaab

abaabaabaababbzaabaabababbabb
ababbabbababzzabbabbababaabb

ababaabaabaabzzabaabaabababb
ababababaabzzabaabaabaababb
abaababaabaabzzabababbabbab
It's obviously sending repeated keystrokes, nothing like what I expect to get :(.

Post Reply