Special/Virtual Launch Strings/Commands

Top  Previous  Next

Normally in an alias you specify the name of a file to launch/open (or url), but you can also use a few virtual launch strings instead:

paste STRING_TO_PASTE - copies text into clipboard and then into last running app
sendkeys SPECIAL_STRING_TO_PASTE_SIMULATE - simulates keypresses (alternative to paste); for syntax see here.
copyclip STRING_TO_COPY - copies text into clipboard
restartsearch STRING_TO_SEARCH_FOR - restarts a new search by replacing editbox text (use \s at end of line to add a space after the new search string).  Use \n at the end to simulate the pressing of Enter after the search is conducted (useful especially for plugins triggers).
dosearch STRING TO SEARCH FOR - doesnt change the editbox but causes FARR to display results as if user had typed the string.  very useful in conjunction with regular expression patterns.
dosearchontrigger STRING TO SEARCH FOR - doesnt change the editbox but causes FARR to display results as if user had typed the string.  very useful in conjunction with regular expression patterns.  like dosearch but only happens when user hits Enter.
dolaunch STRING TO LAUNCH - like dosearch except it triggers an immediate launch of the specified line as soon as a match is made with search string (i.e. user does not have to hit enter or otherwise trigger result).  Note: you can use restartsearch as the string after dolaunch.
showmemo TEXT WITH \n AS NEWLINES - lets you specify some text to display in results area in Memo mode.
showfile FILENAME - to display in results (you can use virtual folder names). Use showfilertf and showfilehtml to force filetype.
showhtml HTMLCONTENT - displays html content in html view mode
(in HTMLCONTENT you can use href links of the form "farr://launchstring" where launchstring is anything that would be in an alias result line).
showhtmlraw HTMLCONTENT - same as showhtml but doesn't perform % variable replacement.
htmlviewurl URL - grabs a web page url and displays content in html view mode (this can be http://.. or file://)
showfilehtml FILENAME - show a file in html mode
setfocus searchedit | mainpanel - sets focus to either the search edit box or whatever output mode (results, memo, html) is currently showing (result list, htmlview, richedit view). Example: If you wanted to load a web page and then change focus to the html view (since by default it stays in the edit box now), you could make your alias result like this: htmlviewurl www.google.com ;;; setfocus mainpanel
setviewmode list | memo | html | user | spreadsheet - sets main panel view mode. setviewmode would be used by a plugin that wants to keep the display in html mode for example without having to reload a webpage again and again.  it would be called by plugin like: farr->set_strvalue("launch","setviewmode html").  It's hard to think of a case where anything but a plugin would call this.
pcommand EXTRA_TEXT - sends a command to the current plugin and then to all other plugins if the current one doesn't handle it; sent via a plugin->set_strvalue("pcommand",EXTRA_TEXT) call -- so plugins need to return FALSE from this if they do not handle it.  An ERROR will be announced to the user if no installed plugin accepts the command.  This can be a useful way for plugins to talk to one another, so you should use EXTRA_TEXT strings that are uniquely identifiable.
pscommand plugindllname EXTRA_TEXT - sends a command to the specified plugin; sent via a plugin->set_strvalue("pscommand",EXTRA_TEXT) call -- so plugins need to return FALSE from this if they do not handle it.  Note specify the dll name but omit path and file extension.
setsize MINWIDTH,MINHEIGHT,MAXWIDTH,MAXHEIGHT - forces size of window to be within the specified range; you can use -1 or * for values to ignore.  So for example to force farr window to an exact height you could do: setsize 640,480,640,480 or to make sure its at LEAST 640x480 you could do: setsize 640,480,*,* or to make sure it is no larger than 640x480 you could do: setsize *,*,640,480 or to make sure its at least 640 pixels wide: setize 640,*,*,*
sethtmlsafe 0|1 - tells farr that the contents of the html view are safe for triggering farr:// links.  This can be used to override the default assumptions that pages loaded locally or set with showhtml are safe, and those from the internet are not.  Set this after you have requested that the page be loaded or after you have modified a page downloaded from the internet.
showpleasewait [MESSAGETEXT] - shows a please wait message in the main panel (can be blank), hiding the html and memo contents; especially useful if a plugin wants to download a page, modify it, and only then show it.
hidepleasewait - removes the please wait message and shows underlying mode.
alert MESSAGETEXT - show a simple messagebox with text, useful for debugging.
balloon MESSAGETEXT - show a simple balloon tray message with text, useful for telling the user something.
sleep MILLISECONDS - sleeps for a while before continuing to the next launch command, useful when multiple launch commands are specified, separated by ;;;
waitforhtml - returns after html browser contents are fully loaded
appcap FILEPATH - runs an app and waits for it to finish, redirecting stdio capturing any commandline output in %lastappcap% (normal commandline window is hidden and not shown).
appnowait FILEPATH - runs an app and captures output but doesn't wait for it to complete before continuing launch string execution.
appcapappendmemo FILEPATH - runs an app and shows output in memo mode as it is outputted by the console program.  If you want to show some custom intro text, call showmemo first before calling this.
appcapappendmemons FILEPATH - runs an app and shows output in memo mode as it is outputted by the console program.  If you want to show some custom intro text, call showmemo first before calling this; does not auto scroll to bottom.
appcapresults FILEPATH - runs an app and parses the output as a list of results.  Uses same result syntax as aliases, so you can set custom labels and icons, etc.
fileresults FILEPATH - parses the contents of a text file as a list of results.  Uses same result syntax as aliases, so you can set custom labels and icons, etc.  Very similar to the #filecontents (see below) directive that can be used in an alias, but can be chained with other virtual launch strings.
setuservar USERVARNAME=VALUE - sets the value of a user variable (e.g. setuservar twitter.username=donationcoder)
tempmemofont PARAMETER - sets the memo font to something else temporarily (until next search). PARAMETER can be: fixed | custom.  fixed sets a fixed font and is useful for console output sometimes.  custom uses the custom configured font in the options.
print TEXT - prints some text on the default printer.
addlaunchhistory fname - adds the specified file or folder name to launch history
addsearchhistory string - adds the specified string to the search history
gomemobottom - goes to bottom of memo results
recachedirpaths - re-evaluate any directory paths they may have environment strings or user variables that may have changed

 

#filecontents FILEPATH (can use %ALIASDIR%), to have the contents of the file dumped into the alias results when searching. -- note this can currently only be used an alias group results (not callable by plugin). You can now use this recursively.  (see also fileresults command above).
 
shellexec STRING - launches string as if it had been typed on the command line; this can be useful as the default action to perform if no search results are found, as it allows you to type anything you would type in the windows "RUN" box, and in particular will launch files on the system path, with arguments.

 

Note:

You can run multiple launch commands at one time by separating them with ;;;