Score:1

Kill and restart a program with a single command

pk flag

Autokey-QT sometimes gets stuck. It hasn't crashed, it's still running, but it's done half of a script and then stopped for some reason. I haven't been able to figure out why because I can't duplicate the issue at will. The only way I've found to continue is to kill the program in System Monitor and re-launch.

How could I do that in a bash script? The goal being to create a keyboard shortcut that will do this action.

cn flag
Joe
First, make sure you're using AutoKey 0.96.0. It's better behaved than older versions. Second, make sure you haven't coded any infinite loops in your scripts - especially tight loops. If those don't fix it, then go with @huha 's answer or use `pkill autokey && autokey-qt &`.
Score:1
es flag

Assuming that you have only one instance of it running on your machine:

killall autokey-qt && autokey-qt myarg1 myarg2

The caveat is that, since it's a GUI automation tool, it's probably waiting for some GUI program to get finished with a task, and just killing it will probably leave that GUI program in a very undefined state. That might create more problems than you are trying to solve with that impatient approach. Maybe first find out where it hangs and what the cause of that is.

cn flag
Joe
There can be only one! ;) If you run AutoKey an additional time it tells the first instance to display the main menu and then exits.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.