Send text to script

Ask for help about FlashGot, no registration needed to post
Post Reply
londy
Posts: 2
Joined: Tue Jul 13, 2010 10:07 am

Send text to script

Post by londy »

I want to highlight a word and send that word in plain text to a script. Can I do that with Flashgot? I can do it with the clipboard but I'd rather do it with the Firefox context menu. Thanks.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.6) Gecko/20100626 SUSE/3.6.6-1.2 Firefox/3.6.6
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Send text to script

Post by therube »

Unrelated to FlashGot but would something like this work for you?

Code: Select all

javascript:Qr=document.getSelection();if(!Qr){void(Qr=prompt('Registry entry to find:',''))}if(Qr)location.href='reg:'+(Qr)
Don't know about anything of JavaScript, but appears it's the document.getSelection() that will "capture" the highlighted text. (I then perform a <Windows> REGEDIT search on the selected text <which is presumably a registry key name, in my case>.)

Or are you speaking of a FlashGot Build Gallery JavaScript function?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6
londy
Posts: 2
Joined: Tue Jul 13, 2010 10:07 am

Re: Send text to script

Post by londy »

Sorry, I should've been more clear.

I'm using Linux openSuse 11.2 with KDE4.

I don't know anything about javascript. Currently, I can highlight a bunch of links in Firefox and then send them to my bash script via Flashgot. I'm trying to do the same thing except I want to just send plain text on any website. I can do it now from the KDE clipboard by pressing alt+x but I wanted the option to do it from right-click in FF.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.6) Gecko/20100626 SUSE/3.6.6-1.2 Firefox/3.6.6
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Send text to script

Post by Giorgio Maone »

londy wrote: I want to just send plain text on any website.
No, FlashGot can't be used for that because it parses links only.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Post Reply