home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 135 / af135a.adf / AmiCheck.lzx / AmiCheck / Documents / Arexx.readme < prev    next >
Text File  |  2012-06-15  |  7KB  |  242 lines

  1. The following document each ARexx function.  I recommend that you look
  2. over each command as I comment throughout the document how certain
  3. commands are related to others (especially the "user session commands"!!).
  4.  
  5.  
  6.  
  7. Generic commands
  8. ----------------------
  9.  
  10. GET COMMANDLIST,AUTHOR,COPYRIGHT,VERSION,LASTERROR
  11.     "GET" provides some program information depending
  12.     on the parameter you provide.
  13.  
  14.     COMMANDLIST     returns all commands (with their
  15.             templates) for your review.
  16.     COPYRIGHT     displays the amicheck copyright
  17.     AUTHOR         displays my name :)
  18.     VERSION     displays the version you are using
  19.     LASTERROR     displays a description of the last error
  20.  
  21.  
  22.  
  23. File/Project commands
  24. ----------------------
  25.  
  26. OPEN FILENAME/A/F
  27.  
  28.     Open an account.
  29.  
  30.     FILENAME    The name of the account to open
  31.  
  32.  
  33. SAVE FILENAME/F
  34.     
  35.     Save (or "save as") an account.  With no parameter, the application is
  36.     saved.
  37.     
  38.     FILENAME    Use if you wish to do a "save as" using the FILENAME you
  39.             provide.
  40.  
  41. QUIT FORCE/S
  42.  
  43.     Quit amiCheck. If no parameter, you will be prompted if the database
  44.     has been modified with a "are you sure" requester.
  45.  
  46.     FORCE        Use this parameter if you wish to ignore the requester.
  47.  
  48.  
  49.  
  50. Project Specific Account Info
  51. -----------------------------
  52.  
  53. AC_GETINFO    ENTRIES/S,CURRBAL/S,STATEBAL/S,FILTBAL/S,FILENAME/S,HOLDER/S,
  54.         ACCOUNT/S,BANK/S,OPENDATE/S,CLOSED/S,CLOSEDATE/S,STARTDEPOSIT/S
  55.  
  56.     Read information on the account. Read one field at a time.
  57.     
  58.     ENTRIES        Number of entries in the FILTER
  59.     CURRBAL        Current balance
  60.     STATEBAL    Statement balance
  61.     FILTBAL        Filter balance
  62.     FILENAME    The account filename
  63.     HOLDER        The account holder
  64.     ACCOUNT        Account number
  65.     BANK        The institution the account belongs too
  66.     OPENDATE    Date of the account opening
  67.     CLOSED        >0 if closed, 0 otherwise    
  68.     CLOSEDATE    Date of closing
  69.     STARTDEPOSIT    Initial deposit
  70.  
  71.  
  72. AC_SETINFO    HOLDER/F,ACCOUNT/F,BANK/F,OPENDATE/F,CLOSED/F,CLOSEDATE/F,
  73.         STARTDEPOSIT/F
  74.     
  75.     Set the account information via arexx. Set one field at a time.
  76.  
  77.     HOLDER        Account holder
  78.     ACCOUNT        Account number
  79.     BANK        The institution the account belongs too
  80.     OPENDATE    Date of the account opening
  81.     CLOSED        >0 to close account, 0 to not close it.
  82.     CLOSEDATE    Date of closing
  83.     STARTDEPOSIT    Initial deposit
  84.  
  85.  
  86.  
  87. User Session Commands
  88. ---------------------
  89.  
  90. AC_USERSEL    SETENTRY/N,GETENTRY/S
  91.  
  92.     Read or set the visually selected item (ie: the item the
  93.     user has clicked on).
  94.  
  95.     SETENTRY    Specify the entry to show selected (1 = first).
  96.     GETENTRY    Read the current selected entry (0 = none).
  97.  
  98.  
  99. AC_LOCK
  100.  
  101.     Lock the database from the user (he/she will receive a 
  102.     "busy" mouse pointer).  It is very wise to use this when
  103.     reading or updating the database if the user can ruin
  104.     everything by using the application during this time.
  105.     
  106. AC_UNLOCK
  107.  
  108.     Remove a lock on amicheck (user gets use of the mouse back :)
  109.  
  110.  
  111. AC_REBUILD
  112.  
  113.     You MUST MUST MUST do this whenever you modify the database
  114.     (you don't need to if you only read items).  If you don't, 
  115.     amiCheck may zonk out big time.  Note that I did this for speed
  116.     reasons. Your arexx macro can zip along and then update the
  117.     user's window when you are done.
  118.  
  119.     To say that again more clearly, your script may make many
  120.     modifications.  Then when it is done, or if it needs to pause
  121.     for user input, do AC_REBUILD.  This call will update the user
  122.     register window.  The catch is you cannot allow the user to 
  123.     interact with the program while modifying the database behind
  124.     the scenes, so to speak.  For added safety, consider the
  125.     lock and unlock calls. Otherwise you should do AC_REBUILD
  126.     after every modification (ie: AC_PUTRECORD).
  127.  
  128.  
  129.  
  130. Database Query Commands
  131. ------------------------
  132.  
  133. AC_GETRECORD     ENTRY/A/N,TYPE/S,NAME/S,MEMO/S,DATE/S,AMOUNT/S,CLEARED/S,
  134.              PRINTED/S,VOIDED/S,TAX/S,CHECKNUMBER/S
  135.  
  136.     Extract information on a given record.  Request only ONE of the fields
  137.     at a time (I can only return one thing at once).
  138.  
  139.     ENTRY        Required.  The number of the transaction to be read (1 = first 
  140.             record).
  141.     TYPE        Returns 0=check, 1=withdrawal, 2=deposit.
  142.     NAME        Returns the Name field.
  143.     MEMO        Returns the Memo field.
  144.     DATE        Returns the Date as per the date preference of amiCheck.
  145.     AMOUNT        Returns the amount
  146.     CLEARED        Returns >0 if cleared, 0 if not.
  147.     PRINTED        Returns >0 if printed, 0 if not.
  148.     VOIDED        Returns )0 if voided, 0 if not.
  149.     TAX        Returns >0 if deductible, 0 if not.
  150.     CHECKNUMBER    Returns the check number (0 if not check).
  151.     CATEGORIES    Returns the number of categories this transaction.
  152.  
  153.  
  154.  
  155. AC_EDITRECORD    ENTRY/A/N,NAME/F,MEMO/F,DATE/F,AMOUNT/F,CLEARED/N,PRINTED/N,
  156.         VOIDED/N,TAX/N,CHECKNUMBER/N
  157.  
  158.     Edit an existing record.  Edit one field at a time.
  159.  
  160.     ENTRY        The transaction to edit (1 = first).
  161.     NAME        The new name field.
  162.     MEMO        The new memo field.
  163.     DATE        The new date field (as per amiCheck date preferences).
  164.     AMOUNT        The new amount field.
  165.     CLEARED        >0 = clear transaction. 0 = unclear (ha, unclear, get it? ha ha. erg)
  166.     PRINTED        >0 = printed,  0 = not.
  167.     VOIDED        >0 = voided, 0 = not
  168.     TAX        >0 = deductible, 0 = not.
  169.     CHECKNUMBER    The new check number.
  170.  
  171.  
  172. AC_GETBUDGET     ENTRY/A/N,CATNUM/A/N,CATNAME/S,CATBUDGET/S
  173.  
  174.     Read information on a transaction's budget (ask for only one
  175.     field at a time).
  176.  
  177.     ENTRY        The transaction to read (1 = first)
  178.     CATNUM        Number of category to read (ignored currently)
  179.     CATNAME        Returns the category name
  180.     CATBUDGET    Returns amount budgeted to category
  181.  
  182.  
  183. AC_ADDBUDGET     ENTRY/A/N,CATEGORY/A,BUDGETED/A
  184.     
  185.     Add a budget to the transaction. Currently this just replaces
  186.     the category.
  187.  
  188.     ENTRY        Transaction to modify (1 = first)
  189.     CATEGORY    Category to modify (currently, you must use 1)
  190.     BUDGETED    Amount to budget (currently ignored)
  191.  
  192.  
  193. AC_DELBUDGET     ENTRY/A/N,CATNUM/A/N
  194.     
  195.     Remove a category from a transaction. Currently    this just applies
  196.     the default category "None".
  197.  
  198.     ENTRY        Transaction to modify (1 = first)
  199.     CATNUM        Category to modify (currently you must use 1)
  200.  
  201.  
  202. AC_DELRECORD     ENTRY/A/N
  203.     
  204.     Delete a record from the database.
  205.  
  206.     ENTRY        The transaction to remove (1 = first).
  207.  
  208.  
  209. New Transaction Entry
  210. ---------------------------
  211.  
  212. AC_BUILDRECORD    TYPE/N,NAME/F,MEMO/F,DATE/F,AMOUNT/F,CLEARED/N,PRINTED/N,
  213.         VOIDED/N,TAX/N,CHECKNUMBER/N
  214.         
  215.     Construct a new entry for the database (set one field at a time). The entry
  216.     will not be inserted into the database until you issue AC_PUTRECORD.
  217.     
  218.     TYPE        Set the transaction type: 0=check,1=withdrawal,2=deposit
  219.     NAME        Set the Name field
  220.     MEMO        Set the Memo field
  221.     DATE        Set the date field (as per the amiCheck date preference)
  222.     AMOUNT        Set the amount field
  223.     CLEARED        >0 = mark cleared, 0 = don't
  224.     PRINTED        >0 = printed, 0 = not
  225.     VOIDED        >0 = voided, 0 = not
  226.     TAX        >0 = deductible, 0 = not
  227.     CHECKNUMBER    set the check number
  228.  
  229.     
  230. AC_BUILDBUDGET    CATNAME/A,CATBUDGET/A
  231.  
  232.     Add a category to the transaction.
  233.  
  234.     CATNAME        The category name
  235.     CATBUDGET    The amount to budget. Currently, use 0.00
  236.  
  237.  
  238. AC_PUTRECORD
  239.  
  240.     Inserts the record you have built into the database.
  241.  
  242.