SearchTheWeb

Discuss and share scripts and script files...
serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

SearchTheWeb

Post by serendipity »

With "SearchTheWeb" script using which one can search the web for:
XYwiki, XY forum, Google, Wikipedia, IMDB, US weather, World weather from within XY.

How it works: Simply unzip the zipfile into scriptsfolder and load from catalog or addressbar using ::load SearchTheWeb;

Download SearchTheWeb.zip:
SearchTheWeb.zip
(1.03 KiB) Downloaded 198 times
Updated 19th Nov:
+Changed the script name to a more appropriate SearchTheWeb.xys (SearchSuit was wrong anyway it should have been SearchSuite [Thanks JC!!]).
+ Checks if version is 7.80.0008 or higher
+ Changed minor misquotes as suggested by Don.
Also, If you need any special search to be included let me know. :)


For those who want to see the code before downloading:

Code: Select all

//SearchTheWeb v1

"Search The Web"
   load *;
-
"&1) XYWiki : xywiki"
   sub _assert;
   input $wiki, "Search XYWiki", "udc";
   $wiki=urlencode($wiki,1);
   open "http://88.191.26.34/XYwiki/index.php/Special:Search?search=$wiki&go=Go"

"&2) XY Forum : xyforum"
   sub _assert;
   input $forum, "Search XY Forums", "dual pane";
   $forum=urlencode($forum,1);
   open "http://www.xyplorer.com/xyfc/search.php?keywords=$forum&terms=all&author=&sc=1&sf=all&sk=t&sd=d&sr=posts&st=0&ch=300&t=0&submit=Search"
   
-
"&3) Google : google"
   sub _assert;
   input $google, "Search Google", "XYplorer";
   $google=urlencode($google,1);
   open "http://www.google.com/search?hl=en&q=$google&btnG=Google+Search&aq=f&oq="


"&4) Wikipedia : wikipedia"
   sub _assert;
   input $wikipedia, "Search Wikipedia", "XYplorer";
   $wikipedia=urlencode($wikipedia,1);
   open "http://en.wikipedia.org/wiki/Special:Search?search=$wikipedia&go=Go"

-
"&5) IMDB : imdb"
   sub _assert;
   input $imdb, "Search IMDB", "Quantum of Solace";
   $imdb=urlencode($imdb,1);
   open "http://www.imdb.com/find?s=all&q=$imdb&x=0&y=0"

-
"&6) US Weather : usweather"
   sub _assert;
   input $usweather, "Enter location (Zipcode or City, State)", "10032";
   replace $usweather, $usweather, " ", ",";
   replace $usweather, $usweather, ",,", ",";
   $usweather=urlencode($usweather,1);
   open "http://www.accuweather.com/us-city-list.asp?zipcode=$usweather&submit=GO&u=1&partner=touchthesky"

"&7) World weather : world"
   sub _assert;
   input $weather, "Enter location (City, Country)", "Berlin, Germany";
   replace $weather, $weather, " ", ",";
   replace $weather, $weather, ",,", ",";
   $weather=urlencode($weather,1);
   open "http://www.accuweather.com/world-city-list.asp?loccode=$weather&Submit1=GO%21"

//Assert script: Thanks to Jacky!!
"_assert : _assert"
  $minimum = "7.80.0008"; $compatible = (compare(<xyver>, $minimum, v) == -1) ? 0 : 1; assert ($compatible), "XY too old! Continue at your own risk", 1; status "Something that could fail with versions older than $minimum...";

- 
"Edit script : edit"
   self $ScriptFile, file;
   Open $ScriptFile,w;   
-
"Cancel"
PS: I used Opera's edit search feature (which is most underrated IMO) to get those search codes. :)
Last edited by serendipity on 19 Nov 2008 21:23, edited 4 times in total.

eurytos
Posts: 200
Joined: 29 Jan 2008 15:53

Re: Search suit

Post by eurytos »

Wow!!

Very nice Serendipity!


It works great, thanks so much for posting this.


-Steve

graham
Posts: 457
Joined: 24 Aug 2007 22:08
Location: Isle of Man

Re: Search suit

Post by graham »

Brilliant - a simple application only possible with XY

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: SearchTheWeb

Post by serendipity »

Thanks!! Glad you like it.
PS: Updated few things.

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SearchTheWeb

Post by admin »

serendipity wrote:Thanks!! Glad you like it.
PS: Updated few things.
Yes, I like it too.

However, you need to polish your syntax (the quoting) a bit. :P

Before:

Code: Select all

"&1) XYWiki : xywiki"
   sub _assert;
   input $wiki, "Search XYWiki", udc;
   $wiki=urlencode("$wiki",1);
   open "http://88.191.26.34/XYwiki/index.php/Special:Search?search="."$wiki"."&go=Go"
After:

Code: Select all

"&1) XYWiki : xywiki"
   sub _assert;
   input $wiki, "Search XYWiki", "udc";
   $wiki=urlencode($wiki,1);
   open "http://88.191.26.34/XYwiki/index.php/Special:Search?search=$wiki&go=Go"

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: SearchTheWeb

Post by serendipity »

SearchTheWeb_v2:
Same searches as before, but this one remembers your last entry. So there will be a .ini file created in the XY's script folder.
SearchTheWeb_v2.zip
(1.45 KiB) Downloaded 168 times

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SearchTheWeb

Post by admin »

serendipity wrote:SearchTheWeb_v2:
Same searches as before, but this one remembers your last entry. So there will be a .ini file created in the XY's script folder.
SearchTheWeb_v2.zip
Great stuff! :D

Little syntax remark (quoting again):
This:
status "SearchTheWeb: Search "$wiki" in XYWiki", 006400;
should be this:
status "SearchTheWeb: Search ""$wiki"" in XYWiki", 006400;
or this:
status "SearchTheWeb: Search '$wiki' in XYWiki", 006400;
or this:
status "SearchTheWeb: Search " . quote($wiki) . " in XYWiki", 006400;

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: SearchTheWeb

Post by serendipity »

admin wrote:
serendipity wrote:SearchTheWeb_v2:
Same searches as before, but this one remembers your last entry. So there will be a .ini file created in the XY's script folder.
The attachment SearchTheWeb_v2.zip is no longer available
Great stuff! :D

Little syntax remark (quoting again):
This:
status "SearchTheWeb: Search "$wiki" in XYWiki", 006400;
should be this:
status "SearchTheWeb: Search ""$wiki"" in XYWiki", 006400;
or this:
status "SearchTheWeb: Search '$wiki' in XYWiki", 006400;
or this:
status "SearchTheWeb: Search " . quote($wiki) . " in XYWiki", 006400;
Yep, thanks. Changed it.
SearchTheWeb_v2.xys
(5.95 KiB) Downloaded 192 times

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: SearchTheWeb

Post by serendipity »

Added dictionary and google map.
SearchTheWeb_v2.xys
(7.48 KiB) Downloaded 214 times

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SearchTheWeb

Post by admin »

serendipity wrote:Added dictionary and google map.
SearchTheWeb_v2.xys
Man, this thing is getting interesting...! :D

ramza__x
Posts: 84
Joined: 06 Oct 2007 02:21
Location: Australia

Re: SearchTheWeb

Post by ramza__x »

i login, just to say... cool stuff!!

thanks serendipity!

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: SearchTheWeb

Post by serendipity »

ramza__x wrote:i login, just to say... cool stuff!!

thanks serendipity!
Glad you like it. :)

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: SearchTheWeb

Post by serendipity »

Here is SearchTheWeb v3, it works the same way as before, but is made in html now and requires v7.90.0029.

Download:
SearchTheWeb_v3.xys
(6.99 KiB) Downloaded 195 times

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: SearchTheWeb

Post by admin »

serendipity wrote:Here is SearchTheWeb v3, it works the same way as before, but is made in html now and requires v7.90.0029.

Download:
SearchTheWeb_v3.xys
Wow, cool!

And it reminds me that I have to add a UFT8decode function... I entered "Köln" in the wheather field... :roll:

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: SearchTheWeb

Post by serendipity »

admin wrote:
serendipity wrote:Here is SearchTheWeb v3, it works the same way as before, but is made in html now and requires v7.90.0029.

Download:
The attachment SearchTheWeb_v3.xys is no longer available
Wow, cool!

And it reminds me that I have to add a UFT8decode function... I entered "Köln" in the wheather field... :roll:
Thanks for adding UT8decode. Try the newer version now:
SearchTheWeb_v3.xys
(7.03 KiB) Downloaded 215 times
PS: requires 7.90.0075.

Post Reply