Closed nmschulte closed 5 years ago
I can't understand your request, can you please make an usage example?
I think what they're getting at is something along the lines of the behavior of WinWaitActive
from AutoIt/AutoHotkey. i.e.
Pauses execution of the script until the requested window is active.
See AutoHotkey docs or AutoIt docs
I can't understand your request, can you please make an usage example?
I use KeePassX to authenticate to web services. Some of these services don't allow inputting all of the credentials in a single step, and sometimes the delay between steps takes a long time. What this leads to is an entry with a custom auto-type sequence with a long delay, like the following:
{USERNAME}{ENTER}{DELAY 10000}{PASSWORD}{ENTER}
The core idea here is to add an auto-type token that instructs KeePassX to wait for a change in window title before proceeding, much like {delay n}
delays for n
milliseconds before proceeding. This instruction could be as simple as "wait for any change" (which would probably not actually work for my use-case: details here), or my preference: to wait for a change matching a pattern (by regular expression).
This idea can be expanded to make it more useful:
Three step authentication process example.
Service delays between steps depend on multiple factors, including device bandwidth, geolocation, number of tangentially incident gravitational waves, etc.
The auto-type sequence, using the ideas here, might look like this:
{USERNAME}{ENTER}{WAIT_TITLE /step 2.*password/}{PASSWORD}{ENTER}{WAIT_TITLE /step 3.*verification/}I love lamp.{ENTER}
Like you said, many applications/pages don't change their titles between steps. The solution when the "delay" is too much or it's not usable is to use 2 different autotype sequence and manually trigger the first one and then the second one.
Also the WAIT_TITLE solution you proposed can be dangerous if the user don't set a proper filter and personally I would like to avoid it if possible
Using
{delay n}
works decently well, but suffers requiring a generous timeout to compensate for different connections and service latencies. It seems detecting a specific window title change or even a change/count at all would be useful to mitigate this. An auto-type instruction of{change_title /regexp/}
or similar should work, possibly with a configurable watchdog/timeout and relaxed/no pattern matching if that's too complex.