ExEd!

Examples


Example 1 (writes "Hello world!" in a clean window, afterwards it gives a beep and asks for a keyboard hit).

Example 2 (Open a file, validate it, modifie it, close it and say bye).

Example 3 (Check the filesize, verifies some data, change some attributes and patch the file)

Example 4 (Create a file using variables)

Example 5 (Building some loops)

Example 6 (Case structure)

Well, in the above example the user sees the following screen:

PCOM will use the 1, 2 and 3 as input keys. If you use an A remeber that an a and an A have different values. You can use a $cap:off first. By pressing a '1' the users gets the message 'Option 1 choosen.' and after a keypress the program will quit using ERRORLEVEL 1. If you are not using the $exit command, like option 3, the program will continue after the case. So if the user presses a '3' there will be a 'Option three choosen.' message and a 'Thanks for using this program!' message. If any other key is pressed there will be a 'Thanks for using this program!' message. If you like the user to use the input keys only you can create something like the following:

The program sends a message after an incorrect key is pressed. The $case command can not be nested, but there can be more then one $case commands in a single source.

Example 7 (How to use the arguments).

Example 8 (How to use the errorhandler routine).

The routine will be called when one of the following commands get's an error: You can use the $err:OFF command to disable the usage of the routine and use $err:ON to enable it. When the $on_err routine is defined, the default mode is $err:ON. The routine cannot be called before it is defined.

Example 9 (How to use $run with variables).

The above example simulates the following commandline: $RUN: NOTEPAD.EXE %Variable%.


 
Back home. . .