Need Help with creating a Google:Define feature

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

Need Help with creating a Google:Define feature

Postby zridling » Wed Feb 16, 2005 2:51 am

I've tried, but have been unsuccessful so far. I want to create a tool(?) or external link with a toolbar button that will allow me to define the word at the insertion point/cursor using Google's Define feature. EmEditor has this ability by defining the Command Line to an External Tool as:
http://www.google.com/search?hl=en&q=define%3A$(CurText)&btnG=Google+Search
Is there a way to do this in UltraEdit?

Image

I've been approaching this the wrong way and can't figure my way through it. Help is appreciated.
User avatar
zridling
Basic User
Basic User
 
Posts: 19
Joined: Sun Nov 07, 2004 12:00 am
Location: Chicago, US

Re: Need Help with creating a Google:Define feature

Postby Manni » Wed Feb 16, 2005 6:10 am

The exact same thing doesn't seem to be possible. But instead of using the url directly, can't you simply start your browser as the tool and pass the url as a command line argument. I tried that with Opera and a regular google search and it seems to work.

Btw: Since when does it take the tool configuration dialog 5-10 seconds to close?


Manni
User avatar
Manni
Advanced User
Advanced User
 
Posts: 58
Joined: Thu Jul 15, 2004 11:00 pm
Location: Europe

Re: Need Help with creating a Google:Define feature

Postby zridling » Wed Feb 16, 2005 2:25 pm

I tried that and it just chokes, mainly on the (CurText) part. I'm sure someone can figure it out, maybe post a sample Tool Configuration dialog. Either way, this would be a handy tool for writers who use UltraEdit to have.
User avatar
zridling
Basic User
Basic User
 
Posts: 19
Joined: Sun Nov 07, 2004 12:00 am
Location: Chicago, US

Re: Need Help with creating a Google:Define feature

Postby zridling » Wed Feb 16, 2005 4:49 pm

Not quite, but closer. Okay, if I go to the Advanced menu, Run Windows program and type
C:\Program Files\NetCaptor\NetCaptor.exe http://www.google.com/search?q=define:
at least I can get halfway there, getting UltraEdit to open the Google Define page in my browser. (Substitute Firefox.exe or iexplore.exe for netcaptor.exe above.)
User avatar
zridling
Basic User
Basic User
 
Posts: 19
Joined: Sun Nov 07, 2004 12:00 am
Location: Chicago, US

Re: Need Help with creating a Google:Define feature

Postby Manni » Thu Feb 17, 2005 5:40 am

zridling wrote:I tried that and it just chokes, mainly on the (CurText) part.


Oh. That's the problem. UltraEdit has %sel% which gets replaced with the currently selected text. At least in v11.

Manni
User avatar
Manni
Advanced User
Advanced User
 
Posts: 58
Joined: Thu Jul 15, 2004 11:00 pm
Location: Europe

Re: Need Help with creating a Google:Define feature

Postby zridling » Thu Feb 17, 2005 7:31 pm

Ah, so the proper code is:
C:\Program Files\NetCaptor\NetCaptor.exe http://www.google.com/search?hl=en&q=define%3A%sel%&btnG=Google+Search

and the entire word must be highlighted. Now if I could just connect it to a toolbar button... Thanks for the tip, Manni.
User avatar
zridling
Basic User
Basic User
 
Posts: 19
Joined: Sun Nov 07, 2004 12:00 am
Location: Chicago, US

Re: Need Help with creating a Google:Define feature

Postby Manni » Fri Feb 18, 2005 3:30 am

Right-click any toolbar, choose customize, scroll down in the right list all the way and you'll find all the user tools at the bottom of that list (you just have to remember which numer your tool actually is).


Manni
User avatar
Manni
Advanced User
Advanced User
 
Posts: 58
Joined: Thu Jul 15, 2004 11:00 pm
Location: Europe

Re: Need Help with creating a Google:Define feature

Postby zridling » Sun Feb 20, 2005 5:54 am

It puts the Tool icon there, but it still doesn't work. It's not that big a deal. It's just handy as heck in EmEditor and I wanted it in UE. Thanks again Manni.
User avatar
zridling
Basic User
Basic User
 
Posts: 19
Joined: Sun Nov 07, 2004 12:00 am
Location: Chicago, US

Re: Need Help with creating a Google:Define feature

Postby illico » Mon Feb 21, 2005 6:59 am

See my Google search tool using Internet Explorer as browser:

Command line :
"C:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://www.google.fr/search?hl=fr&q=%sel%"
Working Directory : empty
Menu Item Name : Google Search
Check "ouput to list box"
Check "Capture output"
And used an icon image

That works fine
User avatar
illico
Basic User
Basic User
 
Posts: 12
Joined: Thu Oct 14, 2004 11:00 pm
Location: FRANCE

Re: Need Help with creating a Google:Define feature

Postby zridling » Wed Feb 23, 2005 12:01 am

Followed your exact instructions and it only produces an output error. Am I missing something? Error message reads:
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
User avatar
zridling
Basic User
Basic User
 
Posts: 19
Joined: Sun Nov 07, 2004 12:00 am
Location: Chicago, US

Re: Need Help with creating a Google:Define feature

Postby palou » Wed Feb 23, 2005 2:53 am

You miss the quotes, they are needed because of the long
file name (with space).

Regards from Geneva.
User avatar
palou
Basic User
Basic User
 
Posts: 46
Joined: Fri Dec 17, 2004 12:00 am
Location: Geneva / Switzerland

Re: Need Help with creating a Google:Define feature

Postby zridling » Thu Feb 24, 2005 12:16 am

This fool finally got it, thanks Palou and everyone. I'm grateful! Just for reiteration, here's how mine looks:

"C:\Program Files\NetCaptor\NetCaptor.exe" "http://www.google.com/search?num=100&hl=en&lr=&newwindow=1&q=define%3A%sel%&btnG=Search"

MENU ITEM NAME: Google Define
SAVE ACTIVE FILE: Checked
OUTPUT TO LIST BOX: SELECTED
CAPTURE OUTPUT: Checked

Finally, don't forget that the entire word must be highlighted.
User avatar
zridling
Basic User
Basic User
 
Posts: 19
Joined: Sun Nov 07, 2004 12:00 am
Location: Chicago, US


Return to Custom User Tools/Tool Configuration