Page 1 of 1
does textpad have a search online feature?
Posted: Mon Sep 20, 2010 9:25 pm
by jazzastronomer
I'm not a programmer.
I'd like to select some text in TextPad and have TextPad bring up a web browser and pass the selected text over to a search engine.
I did check the help file and look through the list of add-ons.
thanks
coho
Posted: Tue Sep 21, 2010 3:14 am
by ak47wong
Here's one way to do it:
Step 1: Determine the search URL
- Open your preferred search engine and search for the word "TEST".
- Note of the URL of the results page. For example, Google returns something like: http://www.google.com/search?q=TEST
- In the URL, substitute $Sel for "TEST": http://www.google.com/search?q=$Sel
Step 2: Set up a web browser as an external tool in TextPad
- In TextPad, click Configure, then Preferences, and then Tools.
- Click Add and then click Program.
- Select the file path of your web browser, e.g. "C:\Program Files\Internet Explorer\iexplore.exe" or "C:\Program Files\Mozilla Firefox\firefox.exe".
- Click Apply.
- Click the plus sign (+) next to Tools in the left pane of the window.
- Click the name of the browser.
- In Parameters, enter the URL you determined in Step 1 above.
- Click OK.
Step 3: Enjoy!
- Select some text in TextPad.
- Click Tools, then External Tools, and then the name of your web browser.
Andrew
Posted: Tue Sep 21, 2010 4:47 am
by jazzastronomer
thanks for the prompt reply.
It works for a single word search. If I search for a phrase I get a separate tab with search results for each word.
At least I now know what the tool menu is for!
I'll keep playing maybe I'll get lucky
thanks A.K.
Posted: Tue Sep 21, 2010 6:29 am
by ak47wong
It's your lucky day. Just put double quotes around the URL in the Parameters field in Step 7 above. That should fix it.
Andrew
Posted: Tue Sep 21, 2010 3:06 pm
by jazzastronomer
A.K.
Works great. Thanks very much!
updated version of this tool?
Posted: Fri Dec 30, 2022 7:04 pm
by jazzastronomer
My hard drive crashed and my google-it tool no longer works.
Does anybody have an updated version of this tool?
Posted: Sat Dec 31, 2022 5:31 am
by ak47wong
I just tried the steps I wrote in 2010 and they still work. I've made some minor adjustments here:
Step 1: Determine the search URL
- Open your preferred search engine and search for the word "TEST".
- Note of the URL of the results page. For example, Google returns something like: https://www.google.com/search?q=TEST
- In the URL, substitute $Sel for "TEST": https://www.google.com/search?q=$Sel
Step 2: Set up a web browser as an external tool in TextPad
- In TextPad, click Configure, then Preferences, and then Tools.
- Click Add and then click Program.
- Select the file path of your web browser, e.g. C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe or C:\Program Files\Mozilla Firefox\firefox.exe
- Click Apply.
- Click the > sign next to Tools in the left pane of the window.
- Click the name of the browser.
- In Parameters, enter the URL from Step 1 in double quotes. For example: "https://www.google.com/search?q=$Sel" (including the quotes).
- Click OK.
Step 3: Enjoy!
- Select some text in TextPad.
- Click Tools and then click the name of your web browser.
Posted: Sat Dec 31, 2022 8:19 pm
by jazzastronomer
Thanks A.K.
I got that working no problem.
I now have a Google-it tool as well as a Search-Wikipedia tool!
I want to add a 3rd tool that will open a specific website, wait a couple of seconds and then send the search string.
I'm not sure how to add the delay.
Any suggestions?
Posted: Mon Jan 09, 2023 1:26 am
by AmigoJack
Tools don't open websites, they start programs (in this case: one of your web browsers). Programs might have implemented a mutex, so only 1 instance of them is running, and starting it multiple times just brings the already running instance to the foreground.
Tools don't send strings, they hand over parameters when starting programs (in this case the URI to request). Combined with the only-one-instance behavior from above a web browser mostly just opens a new tab to then request the URI.
Nowhere in this scenario TextPad "magically" controls your web browser - it just starts programs with or without parameters. The running program itself is uncontrollable. Likewise the tool cannot "send" anything, and "waiting" would only make sense to delay starting a program.
No, this would need an own program which provides your wanted features and which is then just started by TextPad.
Posted: Tue Jan 10, 2023 9:39 pm
by jazzastronomer
Thanks for the reply AmigoJack.
your suggestion to use an external program was right on.
I have a work-around that involves the use of a keyboard macro program. I just need to find an old version of that program that my license is still valid for.
The current (trial) version is too costly for me to justify it.
thanks again