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

New FARR plugin : FSubScript enable loading of multiple javascript plugins

<< < (6/12) > >>

mouser:
by the way -- this fsubscript thing is SOOO clearly a huge step forward for FARR plugins.. i mean just look at the sample color script: it's 30 short simple lines long, and it's just a .js file and an icon, as simple as can be.  really really going to make plugin writing accessible to a whole new group of people  :up: :up: :up:

mouser:
FSubScript deserves a web page of its own.

ewemoa:
For your question in the plugin about the settings : One way to create options is to send a autohotkey executable, however you can do it the way you like. You need to send a message WM_USER+1 to the window name FScript/FSubScript. Autohotkey program can do this. However an IE with a registered custom protocol could do it to. UI in javascript is a bit tricky. I think I like the autohotkey solution the more.
-ecaradec (November 16, 2008, 12:31 PM)
--- End quote ---

Wow, thanks for responding to a question I put in the plugin's source!

At the moment, it seems enough to just use FARR's User Variable support for configuring Akete, but perhaps as time goes on I'll change my mind about this :)

ewemoa:
I improved the now renamed FSubScript.
-ecaradec (November 15, 2008, 06:31 PM)
--- End quote ---

As an exercise in reviewing plugin functionality, understanding FSubScript a bit better, and becoming more comfortable w/ gvim, I filled in more of the skeleton functions in fscript.js:

a piece of FSubScript/fscript.jsfunction setStatusBar(txt) { FARR.setStrValue("statusbar", txt); }
function setSearch(txt) { FARR.setStrValue("setsearch", txt); }
function setSearchNoGo() { FARR.setStrValue("setsearchnogo", txt); }
function stopSearch() { FARR.setStrValue("stopsearch"); }
function hideWindow() { FARR.setStrValue("window.hide"); }
function showWindow() { FARR.setStrValue("window.show"); }
function toggleWindow() { FARR.setStrValue("window.toggle"); }
function setRichEditMode(txt) { FARR.setStrValue("window.richeditmode", txt); }
function setRichEditHeight(height) { FARR.setStrValue("window.richeditheight", height); }
function setRichEditWidth(width) { FARR.setStrValue("window.richeditwidth", width); }
function setShowAllMode() { FARR.setStrValue("setshowallmode"); }
function exit() { FARR.setStrValue("exit"); }
function reportError(txt) { FARR.setStrValue("reporterror", txt); }
function setCliboard() { FARR.setStrValue("clipboard"); }
function pasteClipboardToLastActiveWindow(txt) { FARR.setStrValue("PasteClipboardToLastActiveWindow", txt) }
function displayAlertMessage(txt) { FARR.setStrValue("DisplayAlertMessage", txt); }
function displayAlertMessageNoTimeout(txt) { FARR.setStrValue("DisplayAlertMessageNoTimeout", txt); }
function displayBalloonMessage(txt) { FARR.setStrValue("DisplayBalloonMessage", txt); }
function execWebbrowserEmbededJavascript(txt) { FARR.setStrValue("EmbeddedWb.ExecJavascript", txt); }

function paste(txt) { FARR.setStrValue("launch", "paste " + txt); }
function copyClip(txt) { FARR.setStrValue("launch", "copyclip " + txt); }
function restartSearch(txt) { FARR.setStrValue("launch", "restartsearch " + txt); }
function doSearch(txt) { FARR.setStrValue("launch", "dosearch " + txt); }
function doSearchOnTrigger(txt) { FARR.setStrValue("launch", "dosearchontrigger " + txt); }
// txt: text with \n as newlines
function showMemo(txt) { FARR.setStrValue("launch", "showmemo " + txt); }
function showFile(filename) { FARR.setStrValue("launch", "showfile " + filename); }
function showFileRTF(filename) { FARR.setStrValue("launch", "showfilertf " + filename); }
function showFileHTML(filename) { FARR.setStrValue("launch", "showfilehtml " + filename); }
function showHTML(txt) { FARR.setStrValue("launch", "showhtml " + txt); }
// txt: url
function htmlViewURL(txt) { FARR.setStrValue("launch", "htmlviewurl " + txt); }
// txt: searchedit, mainpanel
function setFocus(txt) { FARR.setStrValue("launch", "setfocus " + txt); }
// txt: list, memo, html, user, spreadsheet
function setViewMode(txt) { FARR.setStrValue("launch", "setviewmode " + txt); }
function pcommand(txt) { FARR.setStrValue("launch", "pcommand " + txt); }
function setSize(minwidth, minheight, maxwidth, maxheight) {
  FARR.setStrValue("launch", "setsize " +
                   minwidth + ", " + minheight + ", " +
                   maxwidth + ", " + maxheight);
}
// XXX: bool: 0 or 1?
function setHTMLSafe(bool) { FARR.setStrValue("launch", "sethtmlsafe " + bool); }
function showPleaseWait(txt) { FARR.setStrValue("launch", "showpleasewait " + txt); }
function hidePleaseWait() { FARR.setStrValue("launch", "hidepleasewait"); }
//function alert(txt) { FARR.setStrValue("launch", "alert " + txt); }
function sleep(ms) { FARR.setStrValue("launch", "sleep " + ms); }


Don't know if they work, but perhaps it will save ecaradec some drudgery  ;)

ewemoa:
There might be bugs. There are centainly bugs.
-ecaradec (November 15, 2008, 06:31 PM)
--- End quote ---

onSearchBegin() in FSubScript/fscript.jsPerhaps the following line:

  plugins.search(querykey, isExplicit, queryraw, modifier, triggermethod);

should be something like:

  plugins.search(querykey, isExplicit, queryraw, querynokeyword, modifier, triggermethod);


Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version