topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • November 15, 2019, 06:29 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - verszipo [ switch to compact view ]

Pages: [1]
1
FARR Plugins and Aliases / FarSubScript : Pixsy
« on: January 15, 2014, 10:23 AM »
I played a little with Pixsy.Net and the Chrome browser addon and i thought it would be interesting to add the functionality to FARR.

Pixsy has a strange way of working, when you search for something it doesn't directly redirect the browser, it returns a string containing instructions on what should be done (I suspect it's in JSON format, but i'm not certain).
Usage :
pix <command><space>
or
pix <command><enter>

For example : pix .g wolf will search for "wolf" using "google.com" while pix .y wolf will search for "wolf" using "yahoo.com", look at Pixsy's Syntax for more info.

There are still some bugs in it, the most notable ones are :
- after pressing Enter at the end of the search string FARR looses focus and the editbox from Pixsy page gets the focus

Note : this script requires FarSubScript, make sure you have it installed and working in FARR.

Install :
extract the content of the archive into a subfolder under the Scripts folder of FARR (for example : plugins\Pixsy) and either write "goreload" in FARR (this will reload all plugins) or restart FARR.

If anybody wants to improve the script feel free to do so.

Note : I didn't include the source in this post (you'll have to download the attached ZIP file) because it's quite long.

2
Living Room / Looking for the title of an Anime
« on: December 27, 2013, 04:27 PM »
Hy.

When i was young, i used to watch an anime series on TV, sadly i don't remember much about it (specially not the title)
Here's what i do remember :
- there where some kids that had a big red car that could transform in all kind of things (i think i remember it transforming into a boat, a plane and things like that)
- they where on an island that later turned out to be a huge ship covered by vegetation
- they had to fight with some "grown ups", i think they where pirates but i might be wrong.

I used to watch it on the german television (Pro7 or Sat1) and I don't speak german, so most of what i understood from it was the action :p
I think the animation style was similar to that of Naruto, but since it was over 15 years ago i might remember it wrong.

So, does anybody have any idea what's the title of the anime ?
Anybody got any idea ?

Thanks in advance.

P.S.
i really hope i'm not mixing up the memories from 2 or more animes into one :)

3
FARR Plugins and Aliases / FarSubScript : GoogleSearch
« on: May 27, 2013, 08:22 AM »
I needed a way to do money/unit conversions in FARR and since I usually use Google Search for that i thought I'd make a script to call GoogleSearch inside FARR.

Here's the script
Spoiler
Code: Javascript [Select]
  1. plugins["GoogleSearch"] =
  2. {
  3.         version: "1.0",
  4.         lastChange: new Date(fso.GetFile(currentDirectory+"\\fsubscript.js").DateLastModified).toDateString(),
  5.         displayName: "GoogleSearch",
  6.         directory: currentDirectory,
  7.         icon: currentDirectory + "\\favicon.ico",
  8.         aliasstr: "gs",
  9.         description: "Search using Google (usefull for online conversions)"
  10. };
  11.  
  12. (function ()
  13. {
  14.         var js = plugins["GoogleSearch"];
  15.         var loaded = false;
  16.         var match = false;
  17.         var match2 = false;
  18.         var loadurl = "";
  19.         js.search = function search(querykey, explicit, queryraw, querynokeyword,modifierstring,triggermethod)
  20.         {
  21.                 if(!explicit) return;
  22.  
  23.                 idletime = 0;
  24.                 // first : match when a space is at the end of the string
  25.                 match = queryraw.match(new RegExp("^"+js.aliasstr+" (.+)  $"));
  26.                 // second : match when the user presses enter
  27.                 match2= queryraw.match(new RegExp("^"+js.aliasstr+" (.+)$"));
  28.  
  29.                 if((match && match[1])||
  30.                   (triggermethod && match2 && match2[1]))
  31.                 {
  32.                         loaded = true;
  33.                         // formated HTML must be like this :
  34.                         // http://www.google.ro/search?q=query string
  35.                         // Example : http://www.google.ro/search?q=10$ in euro
  36.                         if (match)
  37.                                 loadurl = "http://www.google.ro/search?q="+match[1];
  38.                         else if (match2)
  39.                                 loadurl = "http://www.google.ro/search?q="+match2[1];
  40.                         else
  41.                                 loadurl = "";
  42.                         htmlViewURL(loadurl);
  43.                         showPleaseWait("Loading..");
  44.                 }
  45.                 else
  46.                 {
  47.                         showHTML("<b>GoogleSearch</b>\
  48.                                 <br>Search using the power of the Google Search service\
  49.                                 <br><br>\
  50.                                 <br>Syntax : <b>"+js.aliasstr+" search string</b>\
  51.                                 <br>(either press ENTER or twice SPACE at the end of the search string)\
  52.                                 <br><br>You can use the special search options of google\
  53.                                 <br><br>Example: <b><br>"+js.aliasstr+" 10$ in euro</b>\
  54.                                 <br>this will show you how much 10$ are in euros\
  55.                                 <br><br>\
  56.                                 <br>For a complete set of supported values look at\
  57.                                 <br><a href=http://www.google.com/insidesearch/tipstricks/all.html>http://www.google.com/insidesearch/tipstricks/all.html</a>\
  58.                         ");
  59.                 }
  60.         };
  61.         js.setStrValue = function onSetStrValue(varname,value)
  62.         {
  63.                 if(varname == "EmbeddedWb.DocumentComplete")
  64.                 {
  65.                         var pl = pluginInCharge();
  66.                         if(pl == "GoogleSearch" && loaded)
  67.                         {
  68.                                 loaded = false;
  69.                                 // hide the "Chrome browser" advertisment
  70.                                 execSafeJS("\
  71. //                                      document.getElementById('gt-bbar').style.display='none';\n\
  72.                                 ");
  73.                                 hidePleaseWait();
  74.                         }
  75.                 }
  76.         }
  77. }());


Usage :
gs search string<space><space>
or
gs search string<enter>

Note : since i usually search for things that contains spaces i made the script to autosearch only when i enter 2 consecutive spaces (otherwise when entering "10$ in euro" it would autosearch after the 10$ and also after in)

There are still some bugs in it, the most notable ones are :
- cannot open the search results in the browser that you set in FARR (the alternate browser setting), the workaround is to copy the link's address and paste it in FARR and press enter (that will open the browser)

Note : this script requires FarSubScript, make sure you have it installed and working in FARR.

Install :
extract the content of the archive into a subfolder under the Scripts folder of FARR (for example : plugins\GoogleSearch) and either write "goreload" in FARR (this will reload all plugins) or restart FARR.

If anybody wants to improve the script feel free to do so.

4
FARR Plugins and Aliases / FarSubScript : Google Translate.
« on: May 27, 2013, 05:55 AM »
Since CZB's Google Translate script doesn't work anymore (because of the Google Api changes) I thought I'd make a script that loads the GoogleTranslate page in FARR with a given word.

So, here's my first attempt at it, I've used the NinjaWords script as a starting point :
Spoiler
Code: Javascript [Select]
  1. plugins["GoogleTranslate"] =
  2. {
  3.         version: "1.0",
  4.         lastChange: new Date(fso.GetFile(currentDirectory+"\\fsubscript.js").DateLastModified).toDateString(),
  5.         displayName: "GoogleTranslate",
  6.         directory: currentDirectory,
  7.         icon: currentDirectory + "\\favicon.ico",
  8.         aliasstr: "gt",
  9.         description: "Translate the word using Google Translate"
  10. };
  11.  
  12. (function ()
  13. {
  14.         var js = plugins["GoogleTranslate"];
  15.         var loaded = false;
  16.         var match = false;
  17.         var match2 = false;
  18.         var loadurl = "";
  19.         js.search = function search(querykey, explicit, queryraw, querynokeyword,modifierstring,triggermethod)
  20.         {
  21.                 if(!explicit) return;
  22.  
  23.                 idletime = 0;
  24.                 // first : match when a space is at the end of the string
  25.                 match = queryraw.match(new RegExp("^"+js.aliasstr+" ([a-z,A-Z,0-9]+) ([a-z,A-Z,0-9]+) (.+) $"));
  26.                 // second : match when the user presses enter
  27.                 match2= queryraw.match(new RegExp("^"+js.aliasstr+" ([a-z,A-Z,0-9]+) ([a-z,A-Z,0-9]+) (.+)$"));
  28.  
  29.                 if((match && match[1] && match[2] && match[3])||
  30.                   (triggermethod && match2 && match2[1] && match2[2] && match2[3]))
  31.                 {
  32.                         loaded = true;
  33.                         // formated HTML must be like this :
  34.                         // http://translate.google.com/#<srclng>/<destlng>/<word>
  35.                         // you can use "auto" as srclng for autodetection
  36.                         // Example : http://translate.google.com/#auto/en/word
  37.                         if (match)
  38.                                 loadurl = "http://translate.google.com/#"+match[1]+"/"+match[2]+"/"+match[3];
  39.                         else if (match2)
  40.                                 loadurl = "http://translate.google.com/#"+match2[1]+"/"+match2[2]+"/"+match2[3];
  41.                         else
  42.                                 loadurl = "";
  43.                         htmlViewURL(loadurl);
  44.                         showPleaseWait("Loading..");
  45.                 }
  46.                 else
  47.                 {
  48.                         showHTML("<b>GoogleTranslate</b>\
  49.                                 <br>Translate a given text using the Google Translate service\
  50.                                 <br><br>\
  51.                                 <br>Syntax : <b>"+js.aliasstr+" srclng destlng word</b>\
  52.                                 <br><b>srclng</b> is the source language\
  53.                                 <br><b>destlng</b> is the destination language\
  54.                                 <br><b>word</b> is the word we want to translate\
  55.                                 <br><br>Example: <b><br>"+js.aliasstr+" en de computer</b>\
  56.                                 <br> this will translate the 'computer' word from english to german\
  57.                                 <br><br>Note : for source language you can type <b>'auto'</b> and Google will try to detect the language\
  58.                         ");
  59.                 }
  60.         };
  61.         js.setStrValue = function onSetStrValue(varname,value)
  62.         {
  63.                 if(varname == "EmbeddedWb.DocumentComplete")
  64.                 {
  65.                         var pl = pluginInCharge();
  66.                         if(pl == "GoogleTranslate" && loaded)
  67.                         {
  68.                                 loaded = false;
  69.                                 // hide the "Chrome browser" advertisment
  70.                                 // hide the "Search | Images |..." toolbar
  71.                                 execSafeJS(
  72.                                         "document.getElementById('gt-bbar').style.display='none';\n\
  73.                                         document.getElementById('gb').style.display='none';\
  74.                                 ");
  75.                                 hidePleaseWait();
  76.                         }
  77.                 }
  78.         }
  79. }());


Usage :
gt source_language destination_language word <space>
or
gt source_language destination_language word <enter>

source_language can be "auto" and then Google Translate will try to detect what language it is from.

There are still some bugs in it, the most notable ones are :
- you need to press space after the word (pressing Enter doesn't do the translation)
- doesn't support multiple word translation
- sometimes the page loads without the word(s), if you delete the space and add it again then it loads correctly
- after pressing Enter at the end of the search string FARR looses focus and the editbox from GoogleTranslate page gets the focus

Note : this script requires FarSubScript, make sure you have it installed and working in FARR.

Install :
extract the content of the archive into a subfolder under the Scripts folder of FARR (for example : plugins\GoogleTranslate) and either write "goreload" in FARR (this will reload all plugins) or restart FARR.

If anybody wants to improve the script feel free to do so.

Update : now supports multiple texts in one line and you can either press space or enter after the word(s) that you want to translate.

Pages: [1]