The following document each ARexx function. I recommend that you look over each command as I comment throughout the document how certain commands are related to others (especially the "user session commands"!!). Generic commands ---------------------- GET COMMANDLIST,AUTHOR,COPYRIGHT,VERSION,LASTERROR "GET" provides some program information depending on the parameter you provide. COMMANDLIST returns all commands (with their templates) for your review. COPYRIGHT displays the amicheck copyright AUTHOR displays my name :) VERSION displays the version you are using LASTERROR displays a description of the last error File/Project commands ---------------------- OPEN FILENAME/A/F Open an account. FILENAME The name of the account to open SAVE FILENAME/F Save (or "save as") an account. With no parameter, the application is saved. FILENAME Use if you wish to do a "save as" using the FILENAME you provide. QUIT FORCE/S Quit amiCheck. If no parameter, you will be prompted if the database has been modified with a "are you sure" requester. FORCE Use this parameter if you wish to ignore the requester. Project Specific Account Info ----------------------------- AC_GETINFO ENTRIES/S,CURRBAL/S,STATEBAL/S,FILTBAL/S,FILENAME/S,HOLDER/S, ACCOUNT/S,BANK/S,OPENDATE/S,CLOSED/S,CLOSEDATE/S,STARTDEPOSIT/S Read information on the account. Read one field at a time. ENTRIES Number of entries in the FILTER CURRBAL Current balance STATEBAL Statement balance FILTBAL Filter balance FILENAME The account filename HOLDER The account holder ACCOUNT Account number BANK The institution the account belongs too OPENDATE Date of the account opening CLOSED >0 if closed, 0 otherwise CLOSEDATE Date of closing STARTDEPOSIT Initial deposit AC_SETINFO HOLDER/F,ACCOUNT/F,BANK/F,OPENDATE/F,CLOSED/F,CLOSEDATE/F, STARTDEPOSIT/F Set the account information via arexx. Set one field at a time. HOLDER Account holder ACCOUNT Account number BANK The institution the account belongs too OPENDATE Date of the account opening CLOSED >0 to close account, 0 to not close it. CLOSEDATE Date of closing STARTDEPOSIT Initial deposit User Session Commands --------------------- AC_USERSEL SETENTRY/N,GETENTRY/S Read or set the visually selected item (ie: the item the user has clicked on). SETENTRY Specify the entry to show selected (1 = first). GETENTRY Read the current selected entry (0 = none). AC_LOCK Lock the database from the user (he/she will receive a "busy" mouse pointer). It is very wise to use this when reading or updating the database if the user can ruin everything by using the application during this time. AC_UNLOCK Remove a lock on amicheck (user gets use of the mouse back :) AC_REBUILD You MUST MUST MUST do this whenever you modify the database (you don't need to if you only read items). If you don't, amiCheck may zonk out big time. Note that I did this for speed reasons. Your arexx macro can zip along and then update the user's window when you are done. To say that again more clearly, your script may make many modifications. Then when it is done, or if it needs to pause for user input, do AC_REBUILD. This call will update the user register window. The catch is you cannot allow the user to interact with the program while modifying the database behind the scenes, so to speak. For added safety, consider the lock and unlock calls. Otherwise you should do AC_REBUILD after every modification (ie: AC_PUTRECORD). Database Query Commands ------------------------ AC_GETRECORD ENTRY/A/N,TYPE/S,NAME/S,MEMO/S,DATE/S,AMOUNT/S,CLEARED/S, PRINTED/S,VOIDED/S,TAX/S,CHECKNUMBER/S Extract information on a given record. Request only ONE of the fields at a time (I can only return one thing at once). ENTRY Required. The number of the transaction to be read (1 = first record). TYPE Returns 0=check, 1=withdrawal, 2=deposit. NAME Returns the Name field. MEMO Returns the Memo field. DATE Returns the Date as per the date preference of amiCheck. AMOUNT Returns the amount CLEARED Returns >0 if cleared, 0 if not. PRINTED Returns >0 if printed, 0 if not. VOIDED Returns )0 if voided, 0 if not. TAX Returns >0 if deductible, 0 if not. CHECKNUMBER Returns the check number (0 if not check). CATEGORIES Returns the number of categories this transaction. AC_EDITRECORD ENTRY/A/N,NAME/F,MEMO/F,DATE/F,AMOUNT/F,CLEARED/N,PRINTED/N, VOIDED/N,TAX/N,CHECKNUMBER/N Edit an existing record. Edit one field at a time. ENTRY The transaction to edit (1 = first). NAME The new name field. MEMO The new memo field. DATE The new date field (as per amiCheck date preferences). AMOUNT The new amount field. CLEARED >0 = clear transaction. 0 = unclear (ha, unclear, get it? ha ha. erg) PRINTED >0 = printed, 0 = not. VOIDED >0 = voided, 0 = not TAX >0 = deductible, 0 = not. CHECKNUMBER The new check number. AC_GETBUDGET ENTRY/A/N,CATNUM/A/N,CATNAME/S,CATBUDGET/S Read information on a transaction's budget (ask for only one field at a time). ENTRY The transaction to read (1 = first) CATNUM Number of category to read (ignored currently) CATNAME Returns the category name CATBUDGET Returns amount budgeted to category AC_ADDBUDGET ENTRY/A/N,CATEGORY/A,BUDGETED/A Add a budget to the transaction. Currently this just replaces the category. ENTRY Transaction to modify (1 = first) CATEGORY Category to modify (currently, you must use 1) BUDGETED Amount to budget (currently ignored) AC_DELBUDGET ENTRY/A/N,CATNUM/A/N Remove a category from a transaction. Currently this just applies the default category "None". ENTRY Transaction to modify (1 = first) CATNUM Category to modify (currently you must use 1) AC_DELRECORD ENTRY/A/N Delete a record from the database. ENTRY The transaction to remove (1 = first). New Transaction Entry --------------------------- AC_BUILDRECORD TYPE/N,NAME/F,MEMO/F,DATE/F,AMOUNT/F,CLEARED/N,PRINTED/N, VOIDED/N,TAX/N,CHECKNUMBER/N Construct a new entry for the database (set one field at a time). The entry will not be inserted into the database until you issue AC_PUTRECORD. TYPE Set the transaction type: 0=check,1=withdrawal,2=deposit NAME Set the Name field MEMO Set the Memo field DATE Set the date field (as per the amiCheck date preference) AMOUNT Set the amount field CLEARED >0 = mark cleared, 0 = don't PRINTED >0 = printed, 0 = not VOIDED >0 = voided, 0 = not TAX >0 = deductible, 0 = not CHECKNUMBER set the check number AC_BUILDBUDGET CATNAME/A,CATBUDGET/A Add a category to the transaction. CATNAME The category name CATBUDGET The amount to budget. Currently, use 0.00 AC_PUTRECORD Inserts the record you have built into the database.