You can do that, but it has to be coded differently.
You have to write a standalone Python3 script and
import scripting
or something like that. I haven't played with it in quite awhile and
never got too far.
I would recommend becoming a bit more fluent in Python and in simpler
AutoKey scripts before attempting this.
We don't have any examples of these in our wiki.
Also, running GUI things at startup (if they're not GUI, you don't need
AutoKey) is pretty tricky. The GUI takes awhile to get everything going
and the thing you think you're talking to may not be there yet or may
not be ready to listen to you. Even AutoKey might not be running yet.
I have had a running battle with KDE for years about restoring my
session exactly the way I want it when I log in. Under 18.04, it is back
to doing most things correctly like it did in 12.04, but there are still
things it doesn't do.
I have a somewhat elaborate bash script (that I was still working on
last night!) that arranges everything. I think it finally works. It
doesn't use AutoKey at all. It does everything with normal bash which
talks to the GUI using xdotool. The script is in
$HOME/.config/autostart-scripts/ . KDE runs everything in that directory
when it starts up. Gnome has a similar setup, but I haven't worked with it.
xdotool is very powerful, but comes with a learning curve. You have to
understand a little about how desktop windows work and I've just
scratched the surface on that.
As an example, many apps startup with more than one window and some of
those are virtual windows that don't even show up on the desktop. I have
no idea what that's about yet, but it means that you have to make sure
you're talking to the right one before you tell it to do anything.
Joe
On 09/09/2018 03:15 PM, mystic7muse wrote:
> How to execute a hot key script at startup of computer?
> --
> You received this message because you are subscribed to the Google
> Groups "autokey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
autokey-user...@googlegroups.com
> <mailto:
autokey-user...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.