TL;DR: I don't know the answer, but this is how I would go about trying to
solve it.
Before getting into the fairly gruesome details below, a couple of quick
questions:
What happens now if you just press Enter?
What happens if you press Ctrl+Enter instead of a plain Enter?
That solves a lot of problems I have using yad (a fork of Zenity. AutoKey
uses Zenity) in other non-AutoKey use cases.
If it works, it takes getting used to, but it's a lot simpler than the
alternatives - at least the ones I can think of.
I glanced at the API code and it's just a setup and call to Zenity. That
means that you could also write a tiny standalone test script in bash that
just calls Zenity the same as AutoKey would and experiment on that to see
if there's any way to get it to behave as desired.
Without AutoKey on top of it, there are a great many more people in places
like stackexchange who might be able to assist you.
If you can get it to work right the first time, then you won't need the
rest of the suggested tomfoolery below.
----
I'd have to study the script because this sounds tricky. The main problem
is that what you want sounds like the way it ought to work to start with.
I don't generally use the AutoKey API to display dialogs. I prefer to call
out to yad (mainly because I know it because I use it for a lot for other
things, but also because it has a lot more options.)
Just off the top of my head, I might try something crazy like calling the
first dialog in the background (which I don't think the API can do) and
then calling the API to do tabbing/cursor positioning onto the button in
the dialog.
Since yad (or your favorite GUI dialog utility) is called externally, you
can tell Python not to wait for it to complete before returning from the
call.
With an approach like this, I would try to get it to work in straight
Python (outside of AutoKey) first because it's a lot easier to try things
out without the extra complexity of AutoKey on top of them and because you
can see error messages and add debugging output that would be much harder
to see from within AutoKey.
I did a quick search and found that calling things in the background in
Python is possible, but is definitely beyond my (very limited) Python Fu
level. The issue is that if you don't do "something" special, you lose the
output of the first command - which was the whole point of the exercise.
(I can think of a way around that too, but it gets even more convoluted.)
So, if you don't have that "Fu" level or don't get a better answer than
this one in a short while here, I would re-ask this question on Gitter
where the experts hang out.
https://gitter.im/autokey/autokey
Joe
> --
> 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.
> For more options, visit
https://groups.google.com/d/optout.
>