[Home Page] [ABI2] [PROBE2] [PNR] [CFG2] [CDU] [TELLTALE]

www.glod.net 1.4.024 of 20020725 @ 173817

The ChAoS Utilities - PNR 2.6.000

PNR is a Windows-based program launcher.

The intention was to write an equivalent of MSdos "batch files". Thus, one could create a link (ie, a "short-cut") to a PNR command-line that would run a user-specified command on files picked from a standard Windows "open file" dialogue box.

The dialogue box, below, shows an example PNR pick box. In this example, PNR has been used to generate a pick box which allows the user to pick one or more files. When they have selected their file(s), then a small menu is displayed from which the user can indicate which action they wish to carry out.

In this instance, the short-cut used to invoke PNR looked like this:

        pnr.exe @website@

The text bracketed by "at" signs makes PNR read a reponse file into the command-line. Here, this file is being used to provide the entire PNR command-line. The WEBSITE.PNR file (the .PNR extension is implicit) contains this text:

        -du -cg -dh


        "-dtEdit Or View Web Site File"

        "-df HTML Files ! *.htm"
        "-df Text Files ! *.txt"
        "-df JPEG Files ! *.jpg"
        "-df All Files  ! *.*"

        -mnNotePad "-mcNOTEPAD %1"
        -mnWordPad "-mcC:\PROGRA~1\ACCESS~1\WORDPAD.EXE %1"
        -mnBrowse  "-mcC:\PROGRA~1\INTERN~2\IEXPLORE.EXE %1"

In this file, the "-dh" stops the PNR help button from appearing on the open file dialogue box. The "-du" allows multiple files to be selected. The "-cg" makes PNR invoke the cited program with all selected files on a single command-line rather than the default action of invoking the cited program once for each selected file.

The "-dm" parameter sets the files that will be "seen" when the pick box starts up. Here, we want .HTM and .TXT files to be displayed - other files can be selected by using the "files of type" drop down box.

The "-dt" option merely sets the title text of the generated pick box. This shows, by the way, that it is possible to invoke PNR from a program via a CREATEPROCESS() function call and have PNR disguise the fact that is a separate program. Note that parameters that contain spaces should be enclosed in quotes.

Each "-df" parameter adds an extra file type extension and descriptive text to one of the drop down text boxes that appear in the pick box. In this case, the catch all entry of "*.*" has been added in case the user wants to select a file of a type different to those named.

Finally, the last three lines are used to build the items of the menu that appears after the files have been picked from the file dialogue. The "-mn" parameter sets the menu item text and the "-mc" specifies the corresponding executable command-line text. Note that if these menu lines are replaced by a simple command ("start %1", for example), then no menu will be displayed and PNR would simply execute the cited command.

So, here is the pick box generated by the above PNR command-line:

Large PNR screen shot

If no menu-building parameters are specified, PNR accrues parameters until it comes across an item that is not preceded by a minus-sign. It generates the appropriate dialogue box and displays it. When the dialogue box is accepted, PNR initiates the remainder of its command-line using the command processor after doing file name replacement. It does this for each file selected by the user.

If menu items are specified, the process is very similar except that PNR waits for the user to pick which command-line should be executed. The name replacement processing and so on is, of course, the same.

At present, PNR does not have separate documentation - when the pick box is displayed, PNR's help is displayed if one clicks the pick box's "help" button. (This can be inhibited, as has already been stated, by using PNR's "-dh" parameter.) Look at the end of the help text for the log of program changes.

This is version 1.4.024 of the web site generated by CFG2 1.2.041 Apr 10 2002 on Thu Jul 25 17:38:17 2002. Problems? Suggestions? Email the webmaster.

[Home Page] [ABI2] [PROBE2] [PNR] [CFG2] [CDU] [TELLTALE]