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

DonationCoder.com Software > Find And Run Robot

Tip: Htmlviewurl works for local files too! :)

<< < (5/12) > >>

Nod5:
this gave me another thought..
perhaps one way we could give people to write a different kind of farr "plugin"
is to let an alias load an html/javascript page, and automatically set some javascript variables corresponding to the search string.

this is very similar to the dqsd idea but even simpler. FARR would simply load an html page and preset some variables so the javascript on the page could know what was typed into search string, and proceed to handle it the way it wants.
-mouser (June 13, 2008, 06:27 PM)
--- End quote ---
Isn't it possible to just make an alias that passes the search string as a parameter to the .html file? Without any plugin needed? (but maybe that was just what what you meant when you added quotes around the term plugin?)

mouser:
The basic tiddlywiki.com runs in FARR but I can't save:
--- End quote ---
actually there is a farr-related problem here, im trying to fix it now.  believe it or not it's related to skin system.

Isn't it possible to just make an alias that passes the search string as a parameter to the .html file?
--- End quote ---
well you are quite right that the search string could be passed as a simple html get parameter, without anything being added to the system by me.  clever.

mouser:
i'm going to start a new thread on gtd tiddlwikiplus.

Nod5:
I just tested and it indeed works!
Tip: Htmlviewurl works for local files too! :)
I made an alias "alb" that passes the search string to a the file "album.html" as a parameter. So doing "alb beatl" passes "beatl". Album.html loops over a list of foldernames and displays an image if the foldername matches the passed string. Each displayed image links to a .m3u file that when run plays the tracks on the album.

So the plugin I requested here seems more and more doable: https://www.donationcoder.com/forum/index.php?topic=8071.msg116150#msg116150
A drawback with the current test is that you in advance must index the folders and make the .html. A script can do that if the folders are well structured but it is still not ideal. It's also not as easy select and run a displayed match as in FARR's default mode. It would definitely be better if FARR's default mode could show a list of linked images like that. I think such a feature could be useful for other stuff too, like displaying thumbnails when searching for images. Or searching anything else for which a thumbnail can be useful really.

Here's "album.html" (to be placed in helpers folder):

--- Code: Javascript ---<HTML><HEAD></HEAD><BODY> <FORM NAME="a"><INPUT TYPE="hidden" NAME="b"></FORM> <SCRIPT LANGUAGE="javascript"> var loc = window.locationdocument.a.b.value = loc var text = document.a.b.value function delineate(str){left = str.indexOf("?") + 1;return(str.substring(left));}xx = delineate(text); document.write(xx+"<br><br>"); function albummatch(zz){var pos=zz.indexOf(xx)if (pos>=0) document.write("<a href='" +zz+ "/test.m3u'><img BORDER=0 src='" +zz+ "/folder.jpg' width=200 height=200></a><br>")} xarr = new Array("beatles - yellow submarine", "rolling stones - exile on main street", "beatles - abbey road")  for (var i = 0; i < xarr.length; i++) {albummatch(xarr[i])}</script>And the alias:

--- ---1000>>>album>->test param pass to album search .html | htmlviewurl %FARRDIR%\Helpers\album.html?$$1>+>^alb (.*)$
It also needs some folders and files of course. edit: See the array "xarr" above for details.


Nod5:
Here's an updated version of my test file "album.html" that now also can handle two search phrases (both must match) separated by a space:

--- Code: Javascript ---<HTML><HEAD></HEAD><BODY> <FORM NAME="a"><INPUT TYPE="hidden" NAME="b"></FORM> <SCRIPT LANGUAGE="javascript"> var loc = window.locationdocument.a.b.value = loc var text = document.a.b.value function delineate(str){left = str.indexOf("?") + 1;return(str.substring(left));}xx = delineate(text);xx = xx.toLowerCase() var ww = [];var pos=xx.indexOf(" ")if (pos>=0) var ww = xx.split(" ")else {        pos=xx.indexOf("%20")          //firefox compatibility mode, since javascript debugging is handy in FF if (pos>=0)   var ww = xx.split("%20")} // document.write(xx+ "  " + ww[0] + "  " + ww[1] + "<br><br>"); function albummatch(zz){var zz1 = zz.toLowerCase()var pos=zz1.indexOf(xx)if (pos>=0) document.write("<a href='" +zz+ "/test.m3u'><img BORDER=0 src='" +zz+ "/folder.jpg' width=200 height=200></a>") } function albummatch2(zz){var zz1 = zz.toLowerCase()var pos=zz1.indexOf(ww[0])var pos2=zz1.indexOf(ww[1])if (pos>=0 && pos2>=0) document.write("<a href='" +zz+ "/test.m3u'><img BORDER=0 src='" +zz+ "/folder.jpg' width=200 height=200></a>") } xarr = new Array("beatles - yellow submarine", "rolling stones - exile on main street", "beatles - abbey road")  if (ww[1])for (var i = 0; i < xarr.length; i++) {albummatch2(xarr[i])}elsefor (var i = 0; i < xarr.length; i++) {albummatch(xarr[i])}  </script>
I tried it with a much larger number of folders and it works fine. Promising!

Mouser, is it possible to use a special farr:// link to silently do a command line action? When clicking a specific image I want to send it's related folder to an external audio player through such a link. If possible then that sidesteps the use of .m3u playlist files.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version