
 WarpNote Command - A Remote Control For WarpNote
 ================================================

 (c) 1997 Uwe Schlenther Software, Bebelstrasse 30, D-70193 Stuttgart, Germany

 -----------------------------------------------------------------------------

 Since I started my WarpNote project, people who use the program came up with
 lots of brilliant ideas. The result of one of these ideas is this tiny pro-
 gram, WarpNote Command. Think of it as a kind of automatic remote control,
 allowing you to change or delete each note, create new notes and so on. You
 can use WarpNote Command in a simple batch file, or write real programs using
 OS/2 Warp's built-in REXX programming language.

 The syntax is the following:

 WNCOMM <Command Name> [Note Number] [Additional Parameters]

 The parameters depend on what you intend to do. The first parameter is always
 a command name that tells WarpNote Command what to do. The second parameter
 is the number of the note you want to manipulate. Some commands will not re-
 quire a note name, some will expect even more parameters. A complete listing
 of all available commands will follow at the end of this document.

 When you tell WarpNote Command to do something, it responds to your request
 by setting the result code to an appropriate value. The result code should
 be examined especially when WarpNote Command is used in REXX scripts. When
 an error occurs during execution, the result code is usually set to 0. Any
 other result code will represent the number of a note. Example: When you
 create a new note via WarpNote Command, the result code represents the num-
 ber of the newly created note window. You will need this number to access
 the note you just created.

 If WarpNote Command itself fails for some reason, a result code of 10000 or
 above will be set. Remember that WarpNote allows no more than 9999 notes, so
 a result code above this number suggests a problem with the WarpNote Command
 program itself.

 There are various tasks one could do with WarpNote Command. These include:

   - A reminder script that is connected with a scheduler program could
     bring up new notes each time there is something important to tell.

   - A simple REXX script could remind you of birthdays in the next few
     days each time you boot your system.

   - You could create a "motto of the day" script that randomly selects
     a quote out of a large collection and displays it after bootup.

 If you created a nice program and you would like to share it with other
 users of WarpNote, send it to me and I will make it available on the Warp-
 Note homepage http://www.geocities.com/rodeodrive/2048/warpnote.html.

 Send program scripts and suggestions to U.Schlenther@TeamOS2.DE.

 -----------------------------------------------------------------------------

 Command Reference
 =================

 Parameters in square brackets "[...]" are optional, parameters in angular
 brackets "<...>" are required.


 CREATE [Note Number]

 Example: WNCOMM CREATE 5

 This command creates a new note with the given number. If no number is given,
 the program automatically selects the first one available. If successful, the
 program returns the number of the note that has been created. Otherwise, the
 result code is 0 (e.g. the note with the given number already exists or the
 maximum number of notes is exceeded). Please note that the note is created
 invisible, thus making it possible to customize (e.g. size) it before it can
 be seen on the screen. To make the note visible, the SHOW command must be
 issued with the same note number as a parameter. If the corresponding file
 named NOTE#### (where #### is the note number) exists before the CREATE
 command is executed, the contents of the NOTE#### file will be displayed in
 the note window.
 A common technique would be creating notes for a special purpose with a
 constant number that lies well above the number of notes you're creating
 manually. Please take care that you don't unnecessarily use large numbers
 such as 1000 or above. This might decrease WarpNote's responsiveness. You
 should rather use numbers around 50 or 100 or so.


 DELETE <Note Number>

 Example: WNCOMM DELETE 5

 This command deletes the note with the given number. If successful, the pro-
 gram returns the note number. Otherwise (e.g. if the note does not exist) the
 result code is 0. Please note that the note will be deleted without any con-
 firmation; so be careful!


 EXIST <Note Number>

 Example: WNCOMM EXIST 5

 The result code of this command will be either 0 if the note with the given
 number does not exist or the note number if the corresponding note does
 exist.


 SHOW <Note Number>                    HIDE <Note Number>

 Example: WNCOMM SHOW 5
          WNCOMM HIDE 5

 These two commands change the visibility state of the given note. If
 successful, the program returns the note number. Otherwise (e.g. if the note
 does not exist) the result code is 0.


 LOAD <Note Number> <File Name>

 Example: WNCOMM LOAD 5 NEWTEXT.TXT

 This command loads the contents of the specified file in the given note. The
 previous contents of the note is discarded.


 CENTER <Note Number>

 Example: WNCOMM CENTER 5

 This command changes the position of the given note so that it appears
 centered on the desktop. This does not change the note's visibility state.
 If successful, the program returns the note number. Otherwise (e.g. if the
 note does not exist) the result code is 0.


 SETSIZEX <Note Number> <New Horizontal Size>
 SETSIZEY <Note Number> <New Vertical Size>
 SETSIZEXY <Note Number> <New Horizontal Size> <New Vertical Size>

 Example: WNCOMM SETSIZEXY 5 300 100

 These commands allow changing the size of a note window in horizontal or
 vertical or both directions. This does not change the note's visibility
 state. If successful, the program returns the note number. Otherwise (e.g.
 if the note does not exist) the result code is 0.


 SETPOSX <Note Number> <New Horizontal Position>
 SETPOSY <Note Number> <New Vertical Position>
 SETPOSXY<Note Number> <New Horizontal Position> <New Vertical Position>

 Example: WNCOMM SETPOSXY 5 400 120

 These commands allow changing the position of a note window in horizontal or
 vertical or both directions. This does not change the note's visibility
 state. If successful, the program returns the note number. Otherwise (e.g.
 if the note does not exist) the result code is 0.


 GETSIZEX <Note Number>
 GETSIZEY <Note Number>

 Example: WNCOMM GETSIZEX 5

 These commands allow you to get the size of a note window in horizontal or
 vertical direction. The result code is the requested size in screen pixels
 or 0 if the note does not exist.


 GETPOSX <Note Number>
 GETPOSY <Note Number>

 Example: WNCOMM GETPOSY 5

 These commands allow you to get the position of a note window in horizontal
 or vertical direction. The result code is the requested size in screen pixels
 or 0 if the note does not exist.


 GETDESKTOPX
 GETDESKTOPY

 Example: WNCOMM GETDESKTOPX

 These commands complete the set of commands that give back window sizes: The
 result code is the horizontal or vertical size of the desktop in screen
 pixels. This allows you to prevent a window from moving out of the visible
 range.


 EXIT

 Example: WNCOMM EXIT

 This command will close the corresponding instance of WarpNote.


 NOOP

 Example: WNCOMM NOOP

 This command does exactly nothing. It might be useful to check if the version
 of WarpNote Command is compatible with the running version of WarpNote or if
 both programs run in the same directory.


 WAIT

 Example: WNCOMM WAIT

 This command causes WarpNote Command to pause until an instance of WarpNote
 is running in the current directory so that commands can be given to that
 instance. WarpNote Command will return immediately if WarpNote is already
 running. The return code is always 0, as WarpNote Command does not return
 in any other event (except you interrupt the program by pressing CRTL-BREAK).

 -----------------------------------------------------------------------------

