PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: OS/2's OS2SETUP.CMD[Next]: Bugs, Problems or Suggestions
\ -> Introduction -> FAQ

PPWIZARD FAQ

The following (currently short list) of questions are answered:

  1. Can ppwizard accept options from a configuration file? Currently I have some very long command lines and its hard to swap between frequently used configurations.
  2. I have a perfectly working series of lines that I wish to place into a macro. The macro takes one or more parameters so that I can generate many versions of the output. I use the example tags, #AsIs" or #AutoTag" commands but these don't seem to be working correctly. What am I doing wrong?

[Top]

Can ppwizard accept options from a configuration file? Currently I have some very long command lines and its hard to swap between frequently used configurations.

You can use the /List switch to load files containing command line switches. This method allows you to comment switches. You can include other list files however no checking for infinite loops is performed.

PPWIZARD can also accept switches from environment variables. In most operating systems you can either put your options in "config.sys" or in a batch file (such as "autoexec.bat") that you run for your project.

You can create a whole range of different common options and select from them as you wish, hopefully the following example demonstates the method:

@echo off

REM *** YOU MIGHT WISH TO SET THIS IN "AUTOEXEC.BAT" ETC *******
SET PPWIZARD_OPTIONS=/beep /color:n



REM *** NOW SET SOME OTHER STUFF ****
SET PPWDEBUG=/debug /option:DebugLevel{x3D}"-ALL"
SET   STUPID=/DependsOn:out\*.*.DEP
SET   OTHERS=/GetEnv:Stupid

REM *** START PPWIZARD ***
if     "%1" == "" ppwizard *.IT  /GetEnv:OTHERS
if not "%1" == "" ppwizard %1.IT /GetEnv:OTHERS

REM *** IF I'd wanted debug ***
goto Endbatch
if     "%1" == "" ppwizard *.IT  /GetEnv:PPWDEBUG /GetEnv:OTHERS
if not "%1" == "" ppwizard %1.IT /GetEnv:PPWDEBUG /GetEnv:OTHERS
:Endbatch

[Top]

I have a perfectly working series of lines that I wish to place into a macro. The macro takes one or more parameters so that I can generate many versions of the output. I use the example tags, #AsIs" or #AutoTag" commands but these don't seem to be working correctly. What am I doing wrong?

The #AsIs and #AutoTag commands only work on data read directly from the a file. This means that you may need to use a bit of trial and error (maybe swearing a bit) and you can get it to work.

What is probably easier is rather than creating a macro, put the information into its own header file, then instead of macro parameters you simply #define+ each "parameter" prior to each #include command.


email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: OS/2's OS2SETUP.CMD[Next]: Bugs, Problems or Suggestions


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Saturday November 11 2017 at 9:58am