DonationCoder.com Software > Find And Run Robot
Is FARR right for me? Requesting barebones JScript example
mouser:
alias commands can be called also from javascript so you can use "paste" command there
--- End quote ---
just to reiterate and clarify:
any result command you can issue from an alias, like:
paste, showhtml, etc
you can run from a javascript plugin by calling
FARR->set_strvalue("launch","paste BLAH BLAH");
There was a suggestion that i hope we pursue soon to make a more generic javascript scripting system based on dqsd which would make it a LOT easier for people to make javascript-style mini-plugins/scripts, without having to go through the entire process of having a dll, etc.
czb:
try this:
--- Code: Javascript ---// plugin script :displayname="barebone";versionstring="1.01.01";releasedatestring="23.6.2008";author="Oldrich Svec";updateurl="";homepageurl="";shortdescription="barebone";longdescription="";advconfigstring="barebone";readmestring="barebone";iconfilename="icon.ico"; aliasstr="bb";regexstr="";scriptregex="";regexfilterstr="";keywordstr="";scorestr="300"; // typeUNKNOWN=0; FILE=1; FOLDER=2; ALIAS=3; URL=4; PLUGIN=5; CLIP=5;// PostprocessingIMMEDIATE_DISPLAY=0; ADDSCORE=1; MATCH_AGAINST_SEARCH=2;// search stateSTOPPED=0; SEARCHING=1; function onSearchBegin(querykey, explicit, queryraw, querynokeyword,modifierstring,triggermethod){ skip_value = 0; if(!explicit) { if(aliasstr.indexOf(querynokeyword)!=-1) { FARR.setState(querykey,1); FARR.emitResult(querykey,aliasstr, aliasstr, iconfilename,ALIAS,IMMEDIATE_DISPLAY,300); FARR.setState(querykey,0); } return; } FARR.setState(querykey,SEARCHING); FARR.emitResult(querykey,"Hello World!","1" , iconfilename,UNKNOWN,IMMEDIATE_DISPLAY,1000); FARR.emitResult(querykey,"Bonjour Tout le Monde!","2" , iconfilename,UNKNOWN,IMMEDIATE_DISPLAY,1000); FARR.setState(querykey,STOPPED); } HANDLED=1; CLOSE=2; function onProcessTrigger(path, caption) { switch (path) { case "1": FARR.setStrValue("launch", "paste Hello World!") break; case "2": var shell = new ActiveXObject("WScript.Shell"); shell.Run("C:\\windows\\system32\\mspaint.exe \"C:\\windows\\system32\\ntimage.gif\"",1,true); break; default: break; } return HANDLED;}
dreftymac:
try this:
-czechboy (June 27, 2008, 10:57 AM)
--- End quote ---
SPLENDID!
That is precisely what I was looking for. Thank you very much, sir czechboy. May honor be upon your house for all days.
Thanks,
Navigation
[0] Message Index
[*] Previous page
Go to full version