ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > N.A.N.Y. Challenge 2007

SelectoSurf v1.1.0 - Jan 25,2008 - AutoHotkey script to open plaintext URLs

<< < (6/7) > >>


I try "this word". Wonderful !!!!

@mouser: I had seen neither this discussion thread nor this NANY AHK app before, so I downloaded the app and cribbed the AHK code, inserting it into my main AHK file (maintaining references to the source).
I made a change to the code because my default search engine is DuckDuckGo, so, where the code had:

--- Code: Autohotkey ---theurl =`%22%theurl%`%22 - I put:

--- Code: Autohotkey ---;theurl =`%22%theurl%`%22theurl =`%22%theurl%`%22(i.e., commenting out the Google search.)

Also, where you had written in the code comments:

--- Code: Autohotkey ---; otherwise a google (or other) search will be confucted with the phrase.- by "confucted"did you mean "conflated"?    :tellme:

I have for a long time now been wanting to automate this URL/search string process, as it is something that I frequently need to do and it is tedious (manually repetitive) and inefficient.
Using the code you provide could potentially save me accumulated hundreds of hours in the future, so thankyou very much.

By the way, whilst I was playing about with the code, I compared using the code to search for a string with Google and then with DuckGo, there was an interesting difference (see below). The text I selected for the search was "SelectoSurf":

Google gave 4 results:

DuckGo gave 1 summary result:

I'd say the DuckGo output was the more efficiently organised.


Since Skwire made the wonderful ControTextTool I use duckduck for reasonable reasons !!!!!!!
I specially like the only page browsing method to select all about the string searched.
Sometimes I don't feel confortable because of the reasons given by IainB, but at the present time I am 75% DDG and 25% Google or other search engines.

A few days ago I found Yandex that seems to be in the backyard of DDG. And the Yandex browser seem very familiar with Google Chrome....

Since last year I was trying to download the Oscar Ceremony Awards 2012 from everywhere : emule, torrents, etc. with no success until finally i get a copy in russian.
Here in Spain is very difficult to obtain a copy of those events. Even two or more years ago. Now seems easy with torrents. I am not talking about see that ceremony a month after the celebration. I am talking about see the ceremony of the oscars 2012 now, and the oscars 2013 next year.....

Even I obtain my first yandex account. Just because more and more russians come to canary islands and is interesant to learn russian or at least have an account from russian specially now they translate to english everything.

In my opinion there is a total globalization with impredictible results. Not obviously in the knowledge of people or feel more near. I refer to this race where seems only a winner must stay.

And the winner seems to be google......


@Contro: Ah, I begin to see why you would be interested in searches.
I am not sure whether you know it, but there are also some rather good search aids in @mouser's FARR - the built-in search aliases:

The default is the first one - Google. If you wanted to change the order and make another one the default, you could do that, but you'd presumably need to ask @mouser to change it as those aliases are apparently locked (read-only). Similarly, if you wanted to add a new search engine - e.g., (say) Yandex - then you'd need to ask @mouser to make a change for that too.
(I suppose it might be better if the FARR search alases were preset as now, but editable, with a "Restore to default" button for if the user had made a mess of things or just wanted to get whatever were the current FARR version's search alias defaults/presets.)

Posted at: Re: hotkey to launch google search in a new firefox tab
@mouser provided a rather nifty bit of code for AutoHotKey use (called Selectosurf) to do what you seem to want. You just select the text or URL that you want to search for, press the hotkeys Ctrl+Space (this can be changed), and the search engine of your choice (see lines 88, 89 in the code window below), and your browser opens a search result panel/window.
If you search on the DC Forum for Selectosurf, you will come up with these discussion threads:

* SelectoSurf v1.1.0 - Jan 25,2008 - AutoHotkey script to open plaintext URLs
* Launch a web from plain text expressing the url from that site
* fast map
I use it as per below, to invoke a duckduckgo search. It's rather fast. It puts the search string as a specific literal inside double quotes though, which you might want to change or vary.

--- Code: Autohotkey ---SelectoSurf:    ;Sends selected plaintext url or other string and opens it in a browser or search.;  Based on SelectoSurf by [email protected];  see; v 1.1.0, Jan 25, 2008 - improved browser option, added split-line reconstruction, added about box; v 1.0.2, Nov 10, 2006 - initial release;; Select plaintext in any program and hit the hotkey (ctrl+space); If the text looks like a url or website name (like, it will be opened;  otherwise a google (or other) search will be confucted with the phrase.;------------------------------------------------------------------; ATTN, OPTIONAL: configure a specific browser overide, to bypass using default;browserexe = iexplore.exe;browserexe = C:\Program Files\Mozilla Firefox\firefox.exe;------------------------------------------------------------------temp = %clipboard%      ; grab old clipboardSend, ^c                ; send ctrl+C to copy new text to clipboardSleep 100               ; sleep a tiny bit to give a chance for clipboard to propagetheurl = %clipboard%    ; *potential* url;; merge split linesStringReplace, theurl, theurl, `r`n,, AllStringReplace, theurl, theurl, `r,, AllStringReplace, theurl, theurl, `n,, All;; clean spacesStringReplace, theurl, theurl, %A_Space%,`%20, All;; Lets do some other common replacementsStringReplace, theurl, theurl, hxxp:,http:, AllStringReplace, theurl, theurl, hxxps:,http:, AllStringReplace, theurl, theurl, h??p:,http:, AllStringReplace, theurl, theurl, h??ps:,http:, All;; remove any leading or trailing () [] . " 'theurl := RegExReplace(theurl, "^[\.\(\)\'\[\]""]+")theurl := RegExReplace(theurl, "[\.\(\)\'\[\]""]+$");--------------------------; is it a full urlisaurl = 0IfInString, theurl, http:{        isaurl = 1}else IfInString, theurl, https:{        isaurl = 1}else IfInString, theurl, mailto{        isaurl = 1}else IfInString, theurl, ftp:{        isaurl = 1}else IfInString, theurl, www.{        isaurl = 1}else IfInString, theurl, .com{        isaurl = 1        theurl = www.%theurl%}else IfInString, theurl, .net{        isaurl = 1        theurl = www.%theurl%}else IfInString, theurl, .org{        isaurl = 1        theurl = www.%theurl%}else{        ; @sign with no spaces is an email        ; ATTN: toddo        if (0==1)                {                ; add a mailto                theurl = mailto:%theurl%                isaurl = 1                }        else                {                ; search for the string - note this makes isaurl true always, which is what we want.                ;theurl =`%22%theurl%`%22                theurl =`%22%theurl%`%22                isaurl = 1                }};--------------------------; launch it?if (isaurl = 1){        ; beep?        ; SoundBeep                ; launch explorer with url        if (browserexe != "")                {                Run, %browserexe% %theurl%                }        else                {                Run %theurl%                }};--------------------------; restore clipboardclipboard = %temp% ;--------------------------; all donereturn;---------------------------IainB (July 24, 2014, 09:38 AM)
--- End quote ---


[0] Message Index

[#] Next page

[*] Previous page

Go to full version