Selecting all the text by sending {CRTL}a doesn't work?

Here you are welcome to discuss items of general interest related to Push2Run
Post Reply
Rish_k
Posts: 2
Joined: Tue Nov 30, 2021 3:35 am

Selecting all the text by sending {CRTL}a doesn't work?

Post by Rish_k »

Hello, fellow automation geeks! I am very impressed by this tool and use it daily. I also use WOX launcher with everything indexing software to bring Apple's Spotlight like search to windows. Today I thought why not combine these two to open ANY program I want without me having to set up a special script in push2run for it.

How I use wox:
Press ALT + SPACE, a (CLEAN) search bar shows up. Type what I want, for example discord, search results show up and the top result is the discord app. Press enter to open. Next time I press ALT + SPACE, a clean search bar shows up again.

My plan:
open Wox.exe using push2run and then in the keys to send box, use ${WAIT500}{ENTER} to open whatever app I say to google.

The problem:
When I launch Wox by clicking on Wox.exe, or setting push2run to open Wox.exe, the last query is still there. So we understand that wox clears the query box when I press ALT+SPACE. Not when I open it using Wox.exe. When I use google home to open an app for the second time, the new string is concatenated with the old query string instead of replacing it.

My half solution:
I thought I'd send {CRTL}a{WAIT500}${WAIT500}{ENTER}. It says on the help page "KEYS TO SEND" section that {CRTL} key is
The keys that are broken into an pressed down and released up are:
{RIGHTALT} {LEFTALT} {ALT}
{RIGHTCTRL} {LEFTCTRL} {CTRL}
{RIGHTSHIFT} {LEFTSHIFT} {SHIFT}
{RIGHTWIN} {LEFTWIN} {WIN}
So this should work but it doesn't. {CRTL}A, {CRTL}{A} and {CRTL}{a} type "A" or "a" before the query. {CRTL}a doesn't type "a" but it doesn't select the already present text either.

Heres a picture of the wox search bar after my second query:
Search box after second query
Search box after second query
search.PNG (53.88 KiB) Viewed 971 times
And here is the card I have setup:
my push2run card
my push2run card
card.PNG (16.22 KiB) Viewed 971 times

Any help with this would be much appreciated.
RobLatour
Site Admin
Posts: 1016
Joined: Mon Feb 19, 2018 11:43 am

Re: Selecting all the text by sending {CRTL}a doesn't work?

Post by RobLatour »

try

{CTRL}{A}{RELEASE}{WAIT500}${WAIT500}{ENTER}

and let me know if that helps
Rish_k
Posts: 2
Joined: Tue Nov 30, 2021 3:35 am

Re: Selecting all the text by sending {CRTL}a doesn't work?

Post by Rish_k »

This did work! Thank you very much!!
RobLatour
Site Admin
Posts: 1016
Joined: Mon Feb 19, 2018 11:43 am

Re: Selecting all the text by sending {CRTL}a doesn't work?

Post by RobLatour »

Thanks for the update.

While the {RELEASE} should not be required, I've found the keys to send function is sometimes a little finicky depending on the target Push2Run is keying into.

One other thing that I've found helpful is starting the keys to send command off with a typing delay command (you can check the help for more information) but, as an example:

{TYPINGDELAY100}

which will slow the typing speed down and give the target more time to react.

Accordingly, if you later run into issues with what you have, perhaps you can try:
{TYPINGDELAY100}{CTRL}a{WAIT500}${WAIT500}{ENTER}

Also, based on your post, I've also now updated the online help for the current release of the program to cover the TypingDelay option a little more deeply. If you're looking at it again, you may need to refresh your browser (F5 usually) to see the updated help.

In any case, glad it's working for you, hope this helps, and hope you enjoy the program!
Post Reply