does textpad have a search online feature?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
jazzastronomer
Posts: 34
Joined: Sat Nov 03, 2007 3:04 am

does textpad have a search online feature?

Post 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
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post by ak47wong »

Here's one way to do it:

Step 1: Determine the search URL
  1. Open your preferred search engine and search for the word "TEST".
  2. Note of the URL of the results page. For example, Google returns something like: http://www.google.com/search?q=TEST
  3. 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
  1. In TextPad, click Configure, then Preferences, and then Tools.
  2. Click Add and then click Program.
  3. 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".
  4. Click Apply.
  5. Click the plus sign (+) next to Tools in the left pane of the window.
  6. Click the name of the browser.
  7. In Parameters, enter the URL you determined in Step 1 above.
  8. Click OK.
Step 3: Enjoy!
  1. Select some text in TextPad.
  2. Click Tools, then External Tools, and then the name of your web browser.
Andrew
jazzastronomer
Posts: 34
Joined: Sat Nov 03, 2007 3:04 am

Post 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.
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post 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
jazzastronomer
Posts: 34
Joined: Sat Nov 03, 2007 3:04 am

Post by jazzastronomer »

A.K.

Works great. Thanks very much!
jazzastronomer
Posts: 34
Joined: Sat Nov 03, 2007 3:04 am

updated version of this tool?

Post by jazzastronomer »

My hard drive crashed and my google-it tool no longer works.
Does anybody have an updated version of this tool?
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post 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
  1. Open your preferred search engine and search for the word "TEST".
  2. Note of the URL of the results page. For example, Google returns something like: https://www.google.com/search?q=TEST
  3. 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
  1. In TextPad, click Configure, then Preferences, and then Tools.
  2. Click Add and then click Program.
  3. 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
  4. Click Apply.
  5. Click the > sign next to Tools in the left pane of the window.
  6. Click the name of the browser.
  7. In Parameters, enter the URL from Step 1 in double quotes. For example: "https://www.google.com/search?q=$Sel" (including the quotes).
  8. Click OK.
Step 3: Enjoy!
  1. Select some text in TextPad.
  2. Click Tools and then click the name of your web browser.
jazzastronomer
Posts: 34
Joined: Sat Nov 03, 2007 3:04 am

Post 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?
User avatar
AmigoJack
Posts: 534
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post 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.
jazzastronomer
Posts: 34
Joined: Sat Nov 03, 2007 3:04 am

Post 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
Post Reply