keep in mind that these new calls are mainly intended to be used by plugins.
from the help file:
- 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).
- setviewmode list | memo | html - sets main panel view mode.
- 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 identifyable.
- setsize MINWIDTH,MINHEIGHT,MAXWIDTH,MAXHEIGHT - forces size of window to be within the specified range; you can use -1 or * for values to ignore.
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:
;;; setfocus mainpanel
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 is intended to be used to call a function exposed in a plugin. there are no plugins that use this yet, but a perfect example of where this would be useful is in the console
plugin for farr. this is a plugin meant to help out aliases and other plugins by running a command and capturing output for display. right now the way it works is if you want console to run something you actually have to pretend the user has typed some long search string, which affects the display and looks wierd. using the pcommand, an improved console plugin could support a few functions that you could call using the pcommand interface which would make for a much cleaner method of operation. a plugin would call this via farr->set_strvalue("pcommand","string to pass to plugin"). A pcommand will always be sent first to the plugin currently controlling the view, and then to all others if the current plugin doesnt accept it. If no plugins accept the command then farr will report an error, under the assumption that a helper plugin is not installed.
setsize is used to force the farr window within a size range.
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,*,*,*
EXAMPLE: htmlviewurl www.google.com
;;; setsize 640,480,640,480
OR: htmlviewurl $$1 ;;; setsize 640,480,640,480 ;;; setfocus mainpanel