ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > FARR Plugins and Aliases

FARR Plugin with fscript

(1/1)

jpprater:
I'm working on a farr plugin using the fscript javascript SDK.
There's a website that I use with one of my favorite forums.  I'd like to be able to duplicate that site's functionality with FARR.
The site takes as input a URL and several optional arguments.  It returns the URL as base64-encoded with a warning message of some sort based on the selected options.  It acts as a redirector to the site and displays a warning about content.
For instance, if I feed the site the URL "https://www.donationcoder.com" and ask it to display the warning "lots of cool software"... 8) :-*
What I get back is this URL that can redisplay the warning anytime...
http://uftoolbox.info/indirectotron/indirectotron.php?u=aHR0cDovL3d3dy5kb25hdGlvbmNvZGVyLmNvbQ%3D%3D&hs=0&hv=0&hx=0&hc=0&hn=0&hp=0&ho=1&w=lots+of+cool+software
I can assemble the URL easily enough, and I can get initial URL encoded with a library I found, but how would I accept the other arguments?  There are 9 all total.
If I use an alias like "makeredirect", the regex that I match to might look like this...
^makeredirect .* .* .* .* .* .* .* .* .*
And then the result would have to do something like "makeredirect $$1 $$2 $$3 $$4 $$5 $$6 $$7 $$8 $$9", where $$9 would preferably match to a quoted string of some kind.  How would I construct that in FARR using the Javascript SDK?

mouser:
Congratulations on attempting this jpprater!

Your question is very similar to the one raised by kartal here: https://www.donationcoder.com/forum/index.php?topic=13107.msg110539#msg110539

I think what we need is a nice sample regex which can accept any number of multiple space (or comma) separated arguments.  and if its possible to design a regex where double quotes around an argument allows it to contain spaces?

Im not much of a regex expert but i can try to whip something up if the true regex experts dont chime in.

If we come up with a good general purpose regex for this ill put something in the dialog so users can choose this easily.

jpprater:
Congratulations on attempting this jpprater!

Your question is very similar to the one raised by kartal here: https://www.donationcoder.com/forum/index.php?topic=13107.msg110539#msg110539

I think what we need is a nice sample regex which can accept any number of multiple space (or comma) separated arguments.  and if its possible to design a regex where double quotes around an argument allows it to contain spaces?

Im not much of a regex expert but i can try to whip something up if the true regex experts dont chime in.

If we come up with a good general purpose regex for this ill put something in the dialog so users can choose this easily.
-mouser (April 22, 2008, 04:37 PM)
--- End quote ---
OK, so it is something i'd have to work out in the regex.  What type of regex did you program it to recognize?  Is the syntax similar to what Ruby, Python, and Perl use?  I'm only just beginning to understand regex myself.

Navigation

[0] Message Index

Go to full version