Commandline Addons

Top  Previous  Next

Multi Photo Quotes is now capable of using external commandline tools to generate quotes and images dynamically (for example by fetching them from the web).

 

To use such a tool, you make a .txt quote file in a MpsMedia/Books, for example MpsMedia/Books/DynamicWikiQuotes/DyanmicWikiQuotes.txt

 

Normally a quote file is filled with quotes, one per line.

But in this case you will use a special meta command line in the quotes file, for example:

 

DcQuoteFile|Dynamically fetched quotes from the website quotesdaddy.com|quotesdaddy homepage|http://www.quotesdaddy.com

$$$appcap %quotedir%\quotesdaddyfetch.exe;;;%lastappcap%;;;$$$setimagedir %configdir%TestPics

 

The first line is the normal information line, the second is the special meta command.

 

The special meta command line is really a sequence of instructions, separatd by ;;;

 

The instructions can be of the following format:

$$$appcap COMMANDLINE WITH ARGS - runs an executable, waits for output, and captures output in %lastappcap%

$$$setimagedir FULL PATH TO IMAGE DIRECTORY TO USE - sets the image directory to use for this quote

$$$grabfile FULL PATH TO FILE TO GRAB OUTPUT FROM - grabs a quote from the specified file into %lastappcap%

$$$noquote - says that no quote cell/panel should be displayed

%lastappcap% - set the (current) quotestring to the output from the last application or file grab (do this before calling other string processing below)

$$$html2ascii - converts some html to ascii (should come after you do %lastappcap%)

$$$replace("FINDSTR","REPSTR") - replaces all occurences of FINDSTR with REPSTR (should come after you do %lastappcap%)

 

Replacements made in the commandline string:

%appdir% - the directory where the screensaver application launched from (i.e. C:\Program Files\ even on Windows Vista)

%configdir% - the WRITABLE configuration file directory (i.e. C:\Documents and Settings\something..)

%imagedir% - the default directory where image files for this quote file will be read from (same as quotedir)

%quotefile% - the .txt quote file where the commandline was read from

%quotedir% - the directory where the quote file was read from

%monitorwidth% - the width in pixels of the monitor OR THE SMALL TILED WINDOW chosen for disaply (images will be scaled to this)

%monitorheight% - the height in pixels of the monitor OR THE SMALL TILED WINDOW chosen for disaply (images will be scaled to this)

 

NOTES:

 

You can have multiple such lines in a quotes file, one will be chosen at random.

If you don't specify %lastappcap% in the command somewhere, or any other string for the quote, a quote will not be shown.