Page 1 of 1

How to put periodic <F9> in script?

Posted: Tue Apr 27, 2021 2:07 am
by boof

need to perodically press F9 to operate cache cleaner add-on [in all desktops?]. it's not built in-pity.
tks


Re: periodic <F9> in script?

Posted: Tue Apr 27, 2021 4:04 am
by williams2

If you have xdotool installed:

Code: Select all

#!/bin/sh
while true
do
sleep 10m
xdotool search --name "Firefox" key --clearmodifiers F9
done

This "presses" the F9 key to a window with Firefox in the name of the window, every 10 minutes.


Re: periodic <F9> in script?

Posted: Tue Apr 27, 2021 4:20 am
by boof

Tahr v much


Re: periodic <F9> in script?

Posted: Tue Apr 27, 2021 8:44 am
by ally

I see what you did there....nice

:)


Re: How to put periodic <F9> in script?

Posted: Wed Apr 28, 2021 2:37 am
by boof

this is a good solution to my other problem, X no longer drops out at abt 24hrs. gr8 relief. tks.