WHAT'S NEW WITH DTFWIN 04/24/2004 1) A glb that has no parameters is indicated by "glbdialog=N". Previously it was also necessary to set glbrestrictmaxlen but that is no longer necessary. 01/30/2004 1) FIELD command allows global variables. 2) timeout parameter has option to write to a log file. The file contains the date and time of the timeout, the userid, and the list of any databases that were left open. 3) Fixed bug where seperator wasn't displaying on menus if nexted too deep. Now the column in which "separator" appears is critical, just like other menu items. However, seperators can be used at any depth. 4) Menu choices can be restricted to certain users. Use this statement to begin a block of INI menu statements that should be restricted or one or more specific users. IFUSER userlist Use this statement to end the block. ENDIFUSER These statements maybe indented for consistency with other statements. The user list consists of more or more logon userid's, separated by commas. Example: IFUSER JOHN,MARY,WILLIAM DSS Signed = PROMPT "CentreLink form signed" "Enter Agent #" 0 7 SET KEY01,1,7 PROMPT "CentreLink form signed" "Enter Date" 0 10 @date SET KEY02,1,10 DTFDATA ARRANGE PSTZR.QAX PSTZR.TMP "," TLB PSTZR.TMP ENDIFUSER 01/06/2004 1) PROMPT's initial value can get @date. It will be replaced with today's date in the format yyyy/mm/dd. 12/10/2003 1) CFG file [SPECIAL] section has new option DISABLED=n, where n=0 means no changes, always enabled. Default. n=1 is GRAYED but not DISABLED (used to be the default). n=2 is DISABLED but not GRAYED n=3 is GRAYED and DISABLED Not documented in DEVGUIDE. 2) @LOG command line option writes log to C:\WORK\LOG.TXT 11/26/2003 1) QUICKSTUFF option added to [DTFWIN] section of INI file. Causes windows clipboard to be used when stuffing, rather than stuffing characters one by one. The value given to quickstuff is the minimum length of a contiguous string of text characters (between hex 20 and 7E) that will be stuffed using the clipboard. A value of 0 turns off this option. By default it is off. Example: If quickstuff=10, STUFF "HELLO" will not use the clipbooard, but if quickstuff=5 it will. Note that and other non-text characters are not part of any string stuffed using the clipboard. Not documented in DEVGUIDE. 11/9/2003 1) Script command PROMPT and program mode command DO PROMPT can automatically adjust the width of the dialog box and also allow more flexibility in setting the size of the edit box. 10/28/2003 1) REPORT script command works for "Last Run" Problem actually was caused by a bug in the logic for showing Q&A Windows menus when required. 7/30/2003 1) TLB command (all modes) If /MULTISELECT at end of first line, return semicolon delimited values. If /ALL, all "ALL" button. Implies /MULTISELECT 7/6/2003 1) STUFF supports embedded quotation marks. Example, taken from a retrieve spec: STUFF "{ContractPlan <> ""RENT TO OWN""" STUFF "and PrevDebitDate=""""}" STUFF 5/29/2003 11:34PM 1) New script commands NEXTRECORD and PREVRECORD. 2) Fixed bug in REPORT command ("L" for "Last run" prevented report from running). 5/5/2003 10:25AM 1) TEMPDIR defaults have been changed. They are tried in this order: %TEMP% %TMP% C:\WINNT\TEMP\ C:\WINDOWS\TEMP\ Of course, if the CFG file specifies a value for TEMPDIR, it overrides any default. 2) QASCRIPT command permits // comments. 3) STUFF now stuffs lower and upper case letters properly, regardless of whether the caps lock key is up or down. 3/21/2003 0:36AM 1) DO SET KEYS now can chain to another DO command. DO SET KEYS/KEY10=abc/DO GLB qaxfile.QAX,cde,fgh would first set KEY10=abc, then do the GLB specified by qaxfile.QAX, passing it the parameters cde and fgh. The DTFWIN field would be set to "DOING" until the GLB was done, then it would be set to DID GLB .... 3/6/2003 5:48PM 1) DO CLOSEBUTTON label RUN SCRIPT scriptname,,... Note: Use RUN SCRIPT /NOACK scriptname so that DTFWIN doesn't try to stuff an acknowledgement if there's no record open (eg right after deleting a record). 2) New program mode command "DO GV", where GV stands for Global Variables. This single command can set multiple keys and retrieves all key values. It can also set and get the title text and can set closebutton messages. This command is very handy when multiple databases communicate via the key fields. One call can set multiple values and retrieve all of them, which simplifies programming and makes everything faster (with less flashing as well). DO GV label, GET KEYnn, If GET before SET, orig val returned. GET TITLE, SET KEYnn=ssssss, SET KEYnn+=ssssss, += appends the value. SET TITLE=sssss, CLOSEBUTTON=message CLOSEBUTTON=RUN script scriptname,,... (MUST BE LAST PARAMETER) DID GV label=KEYnn=sssss,KEYnn=ssss, Returns any key specified by GET KEY, returns title if GET TITLE specified, and also returns all key values not specified by GET KEY. If GET KEY is specified before SET KEY for the same key, the value returned is the value before being set. Because of this, it is possible to get the original value and then set it to a new value in one operation. If GET KEY is not explicitly specified, the value of the KEY will be returned, but it will be the value set by SET KEY. If GET KEYnn is specified, KEYnn= is returned even if the value is blank, whereas when returning all fields as the default, a key that is blank is omitted. To display a message rather than allowing the CLOSE button to close the record, specify something like this: DO GV XXX,CLOSEBUTTON=You must enter the customer's last name. To cause a script to be run when the button is clicked (perhaps to switch focus to another database), do something like this: DO GV XXX,CLOSEBUTTON=RUN SCRIPT /NOACK CLOSEUP CUSTOMER,KEYxx=xxxxxx Because the RUN SCRIPT can have comma separated parameters, if CLOSEBUTTON=RUN SCRIPT is used, it must be the last GV parameter. 3) "PGM:DO command " now leaves "Doing" in the DTFWIN field. The field exit programming in DTFWIN can have this test: IF DTFWIN <> "" THEN GOTO DTFWIN. This will lock the cursor in the field until DTFWIN.EXE can complete whatever it's doing. 4) PGM:CLEAR DO command To clear the DTFWIN field instead of stuffing "doing" into it, prefix CLEAR to the DO command. This would be the desired option if running a Q&A script or a DTFWIN script that leaves the DTFWIN field (eg to switch to another form or even another database). This will clear the field by stuffing CTRL-A,DEL but will not exit from the field. Scripts that change focus to another database or another field in the same database should typically be run like this: PGM:CLEAR DO SCRIPT /NOACK scriptname parameters 4) "PGM:DO SCRIPT /NOACK scriptname parameters" will not stuff "DID SCRIPT scriptname" into the DTFWIN field. "PGM:DO SCRIPT /WAIT scriptname parameters" will stuff "DID SCRIPT scriptname" into the DTFWIN field but only after the script has run to completion. Normally "DID SCRIPT scriptname" is stuffed into DTFWIN before the script is run. 5) Bug fix: 10 character passwords were not allowed. 6) End of line comments in scripts may now be indicated with "//". 2/22/2003 10:59PM 1) glbrestrict2required, 3, and 4 are now available for prompts 2 - 4 in a glb. For instance, when asking for the first and last names for a customer search, the first name can be optional but the last name can be required. 2/14/2003 3:38PM 1) SETFOCUS will no longer open a database but only changes focus. Furthermore, if the database is not open, SETFOCUS will quit the current script. 2) CANCELAUTO is no longer an option for OPEN or SETFOCUS. 1/31/2003 4:43PM 1) DO GET KEYnn now has /CLEAR option. Example: DTFWIN = "PGM:DO GET KEY14/CLEAR"; GOTO DTFWIN; This will return KEY14=sssss into DTFWIN and will clear KEY14 in DTFWIN. (If you need to clear the key value to signal that its value has been obtained by the database, this saves the additional step of doing "DO SET KEY14=".) THIS OPTION HAS BEEN REMOVED. SEE THE "DO GV" COMMAND INSTEAD. 12/18/02 3:07PM 1) SAVE button logic improved. It uses CTRL-T followed by ESC unless entering a new record, in which case it uses CTRL-R ESC. CTRL-T brings up the sort spec (and ESC clears it). This seems to be the fastest, safest, and surest way to force qawin to save a record to the drive. However, there is no sort spec when adding a record, so CTRL-R is used in that case. This brings up the retrieve spec and is not quite so fast (because it causes the qawin menu to reappear and then vanish) and is a bit of a problem under some conditions (for example if there is a sort spec also in place). However, CTRL-R seems to be good when adding new records. 2) SET KEYS supports setting the titlebar as well as keys. Eg DO SET KEYS/T=This is the new titlebar text,KEY05=123456 3) DO SET TITLEBAR can be used as well as the old DO TITLEBAR. 4) SET KEYS supports /+nn= for appending a value to a key. 5) SET KEYS supports /KEYnn= as well as simply /nn=. (This makes reading and scanning the code easier because one can search for KEYnn, not just nn. Eg there are far fewer instances of /KEY1 in a program than there are /1.) 11/21/2002 1) Attempting to open a new database when there are no available qawin's no longer automatically closes a database to free up its qawin. Change temporary. Due to complexity of closing with automatic save. 10/13/2002 1:50AM 1) DO PGMDLG DTFWIN = "PGM:DO PGMDLG ChangeChoice/title:Changes to the Arrangement/xsize:210/ysize:150," + "Button1:Per (currently " + ArrangePer + ");" + "Button2:Fixed/Variable Payments (currently " + FixedOrVariablePmts + ") + "Button3:Payment Date (currently " + @right(@str(ArrangeNextPmtdate),2) + @mid(@str(ArrangeNextPmtdate) ,5,4) + @left(@str(ArrangeNextPmtdate) ,4) + ")"; Returns ESC or BUTTON1, BUTTON2, or BUTTON3. Up to 10 buttons. Default title: SELECTION Default xsize: 100 Default ysize: 75 Rule of thumb for ysize: 35 * 15 for each button. 2) List boxes (GLB, TLB, US) automatically place the cursor on the first valid selection. Perhaps this should be an option. This does not apply for GLB's with glbpersistent=Y. 3) New script command: (not documented in DEVGUIDE.TXT) XLOOKUP dbname qaxfilename [comma_delimited_parameter(s)] Following this, use SET KEY or the new SET @NUMBER command. 4) New script command: SET @NUMBER,dbname,pos,len Sets @NUMBER in the named database to the value returned from XLOOKUP. 5) DTFX=Y in CFG file For Citrix 6) DO CLOSEBUTTON label message disables close button DO CLOSEBUTTON label enables close button DID CLOSEBUTTON label [message] 7) The DTFWIN program normally wakes up and checks for various things 10 times per second. (For example, has the database placed something of interest into the DTFWIN field.) This interval can be changed. The value is in milliseconds, so TIMER=100 is 1/10 second. [SPECIAL] TIMER=100 8/17/2002 11:38AM 1) Userselect (DO US) now allows the title and dimensions of the list box to be changed. Fixed font can also be specified. 2) List box dialogs (DO GLB) can now have a line of text included in each prompt dialog. Thus, when asking the user to enter a value prior to bringing up the list box, in addition to the label next to the edit box, there can be a line of instructions below the label and the edit box. Specify glbprompttext, glbprompttext2, glbprompttext3, or glbprompttext4 for up to 4 prompts. 3) A prompt dialog (DO PROMPT) can now have a line of text included as instructions. Thus, when asking the user to enter a value, in addition to the label next to the edit box, there can be a line of instructions below the label and the edit box. The line of instructions follows a comma after the (optional) default value. (If there is no default value, you must supply the comma anyway.) Here is an example, wrapped for clarity: "PGM:DO PROMPT GETMODEL,Stock search by model,Enter partial model,160,10,,Either enter a partial model number, or Cancel, enter a code, and try again."; 4) %TEMP% can now specify the directory for temp files, rather than putting a specific path into the CFG file. Example: [DIRECTORIES] tempdir=%temp% This option is useful when using a Citrix server so that each user can have his own directory on a drive that is local to the server. 5) The Auto_Retrieve_Script specified in the INI file can be triggered anytime the focus comes to the specified database, regardless of the value of any particular key (DTFWIN clipboard). Simply specify 999 for the key value for that database. The script that is run can be used to stuff some value into the DTFWIN field, triggering programming to update or "refresh" certain fields by doing xlookups to other databases. The could be useful, for example, in an invoice header file, which can do xlookups to its children (invoice detail files). 6) When invoking a script from within a database, you can set one or more of the 20 key values at the same time the script is called. This is a way of passing variable information to the script. Eg PGM:DO SCRIPT COPY FORM LETTER,KEY12=123456,KEY13=ABC.DOC 7) GLBNEW option in QAX file can now specify that is character should be stuffed after creating the new record. This can of course trigger field-entry programming on the first field. The syntax options are: glbnew=N glbnew=Y glbnew=Y,formname glbnew=Y, glbnew=Y,formname, 8) Bug fix. If a comment line in the list of field names in a QAX file contained "GLBHDR", the headers were messed up very badly and the list box did not allow selections to be made. 9) The default sizes for US (user select) list boxes are 100 for XSIZE and 75 for YSIZE. These are also the minimim permissible sizes. 10) New GLB parameter GLBNCSUPPRESS. Use to suppress columns on the left. Eg a date for sorting must be in the for YYYY/MM/DD (the internal format). To display it in a better format, such as MM/DD/YY, set glbncsuppress=11 (1 more than the column width of 10). Use glbtab settings for the remaining columns. Note: a field may appear more than once in the list of fields to be displayed, so the date field can appear in position 1 for sorting and in a later position for display (with a format specified. Example: GLBNCSUPPRESS=11 GLBTAB1=8 ... GLBTABn=6 10 CONTRACTDATE 8 CONTRACTDATE,MM/DD/YY GLBHDR=Date ... 6 ContractNo GLBHDR=Cntrct 11) New GLB parameter GLBHDR= to suppress a column used for sorting. (This is easier than using GLBNCSUPPRESS.) 12) QASCRIPT command can be used in program mode. Eg PGM:DO QASCRIPT 1 13) Bug fix: Pressing ESC in a list box used to leave the resulting text in the DTFWIN field and did not play an ENTER to trigger the database programming. An ENTER is now properly played. 14) New program mode command SET KEYS. DO SET KEYS/nn=string/nn=string/nn=string Sets the keys to the string values specified. The strings may contain global variables (see Topic 38). Although the command is shown with the "/" as a delimiter, any (reasonable) character can be used. 7/3/2002 4:52PM 1) PLEASEWAIT - new SCRIPT command. PLEASEWAIT "Title text" "Message text" PLEASEWAIT (with no parameters, cancels the existing message). 2) GLBNEW can now specify a form to change to when the target database is opened in add record mode. 3) UNDO buttons implement. Clicking has the same effect as Ctrl-Z or Edit>Undo from the qawin menu. 4) New program mode command DO COPYBIN source TO destination. Similar to script mode command. (This change not tested.) 5) Parameter strings for glb command were previously limited to 100 characters and being too long would cause an abort. This has been changed to 200 max and being too long will merely truncate (perhaps causing the search to fail) but it won't abort. 6) The GLBHDR option of specifying to indicate which field is to be returned when the user selects a line from the list box now allows a column header to specified. For example, to specify the column header "Stock#", use this syntax: GLBHDR=Stock# 7) New program and script mode commands BEEP. Makes a "ding" sound. 5/8/2002 10:28AM 1) RENAME script command added. RENAME oldname TO newname. 2) In the INI file, // can be used for comments (in addition to ;). 3) New script commands IFFILE and IFNOFILE. 4) New pseudocommand IFFILEEXISTS. (IFEXISTS renamed to IFDBEXISTS) 5) New script command MAKEDIR. 6) New global variable . 7) A message can be broadcast to all users and all users can be forced to logoff from DTFWIN (although one or more can be exempted from the forced logoff). To activate, create the text file MESSAGE.TXT in the DTFWIN directory. This can be done using an editor such as notepad. For a simple message (eg "Early dismissal at 3PM"), you can also type ECHO Early dismissal at 3PM > MESSAGE.TXT while at a DOS prompt in the DTFWIN directory. The message can be one or more lines. Total number of characters is 1000. Forced logoff is caused by putting USERLOCK in the first line, like this: USERLOCK MARY BILL All users must logoff now for routine maintenance. In this case, the first line will not be displayed as part of the message. The words MARY and BILL that appear after USERLOCK on the first line of the file are user id's (the userauth feature must be set in the INI file). Those users will receive the message but will not be forced to logoff. Presumably MARY and BILL need access to perform the routine maintenance. If no user id's appear after USERLOCK, all users will be forced off. For example, a BAT file that is scheduled to run at 3AM every day could do ECHO USERLOCK > MESSAGE.TXT, thus causing everyone to be logged off. It is not necessary to have a message on the second (and possibly additional lines) when USERLOCK is used. If there is no message, the users will be forced to logoff without notice. If you edit the MESSAGE.TXT file and remove all the text, no message will be displayed. 4/21/2002 0:00AM 1) New program mode command DO GET TITLEBAR. Returns TITLEBAR=value. 2) New command line option @SHOWQAXTLB causes glb file name to be displayed in the glb title. This is very helpful if there are many qax files and you don't know which one you're looking at. Also displays tlb file names in tlb titles. 3) On startup, looks for DTFSTAMP.DBL file (created by the DTFSTAMP program, q.v.). If found, checks each database listed in the file to make sure it has the correct date and time stamped into the program spec (32K copy). If not, gives error message and won't start. This prevents running with an out of date version of a database. 04/05/02 11:20pm 1) DTFDATA in program mode didn't understand "+" means append. It always replaced the output file. 2) Up to 20 KEY values, no longer just 9. 3) FORM command (script mode) can take etc, not just literals. 4) New form of SET KEY in script mode allows setting to literal value. Eg SET KEY20=Main would set KEY20 to "Main". 5) Generic list boxes can have up to 2 custom buttons to appear at the bottom between OK and Cancel. If the user clicks on one of these buttons, the list box behaves as if he had clicked on "OK" but once the database has been opened to the proper record(s), DTFWIN can change to a designated form. The database programming can interrogate @LAYOUT and thereby determine which button was clicked. See the example below. These optional buttons may be instead of the "New" button or the "All" button but not in addition to either. To use the option with one button, set GLBSETKEY20. For two buttons, set both GLBSETKEY20 and GLBSETKEY19. The text up to the comma will appear on the button. If clicked, the text after the comma will be placed into KEY20 or KEY19. This could be the name of a form. Example: GLBSETKEY20=Reset,ZZ DO NOT USE DO NOT DELETE 1 The button will have "Reset" on it. If clicked, KEY20 will be set to "ZZ DO NOT USE DO NOT DELETE 1", which should be the name of a form. In this example, I name it ZZ so that it will sort after all other forms in the database. I include the warnings DO NOT USE DO NOT DELETE to prevent accidental use or removal, since this form should only be used in this context. The "1" at the end is to distinguish this form from another you might have. Of course, you do not need to use this naming convention; you could call the form "Reset" if you wish. Here is a sample script. The form to go to if the user clicks "OK" is "Normal". If the user clicks the "Reset" button, the form to go to is "ZZ DO NOT USE DO NOT DELETE 1". SET KEY20=Normal GLB LOOKUP.QAX SET KEY1,1,1000 OPEN Vendor FORM RETRIEVEALL RETRIEVE FIELD ID STUFF FIELD GOTOFORM Notice that this script goes to the desired form with the FORM command. It then retrieves one or more records based on the GLB. Finally it goes to the GOTOFORM field. The database should have field entry logic for the GOTOFORM field that tests which form it's on using @LAYOUT and then behaves appropriately. 6) You can specify a third and fourth prompt field to create a third and fourth value to be passed to the QAX file for use in the SELECT statement as %3 and %4. Exampe of third: glbtitlerestriction3= and first names beginning with glbrestrictmaxlen3=1 glbpromptlabel3="First name (1 letter):" 7) You can put GLBHDR= on a line in a QAX file to specify the column header for the field. Starting with GLBHDR, the rest of the line is a comment as far as the DTFDATA logic is concerned. Anything to the right of GLBHDR that begins with // is a comment as far as the column header logic is concerned. The following is a legitimate entry in a QAX file: 15 First GLBHDR=First name //TEXTWRITER 2 This means that the column is 15 characters wide, the field name is "First", the column header is "First name", and this is field "2" if the TEXTWRITER command is used. Use GLBHDR= to indicate the field which is to be returned from a list box. It will override glbextractpos and glbextractlen if present. 8) New program mode command, DO SENDMAIL, for sending e-mails directly from a database record. Use as the following example shows: PGM:DO SENDMAIL To:jtd@pgh.net,Mary Smith Joel Campbell CC:Mary Jane Burpee BCC:theboss@mycompany.com Subject:"The subject must be enclosed in quotes" Attach:FILES\JC932282.DOC Text:The text of the message begins here and can span many lines. The To, CC, and BCC fields can have more than one recipient. The CC and BCC fields may be omitted completely. Recipients are specified either with an e-mail address such as jtd@pgh.net or with a combination name and address, as John Dow. Multiple recipients can be separated by commas or with a hard return (both shown in the "To" field above). The "Attach" field may use the following if the file to be attached is not in the DTFWIN directory: , , , , and of course . There can be multiple attachments, separated by commas or hard returns. Files are attached as binary files (not text files) - this is appropriate for Word documents. The files are sent using the Public Domain blat.exe program, a 32-bit windows command line email program (similar to sendmail in Unix). The program must be initialized as follows: BLAT -install smtpserver fromaddress Example: BLAT -install mail.myisp.net fredsmith@myisp.net 9) New [SENDMAIL] section in CFG file allows specifying BCC that's always automatically added with DO SENDMAIL. 10) SENDMAIL script command renamed to MERGEMAIL. Also, it no longer uses a BAT file and the program GBMAIL to send mail but, like the new DO SENDMAIL, it uses the program BLAT to send mail without requiring a BAT file. 11) DO RUN now processes meta-variables in the parameters passed to the program. Eg you could specify DO RUN NOTEPAD SOMEFILE.TXT to run notepad to edit a file in a directory specified in the CFG file. 10/31/01 1) New program mode command, RUNWAIT, runs a program, then puts up a message so the user can indicate when it has completed and whether it was successful or not. See also RUN, which doesn't put up a message and doesn't wait. 10/04/01 1) DTFWIN no longer needs MYKEYBOARD and USKEYBOARD records in the CFG file but instead automatically adjusts for the keyboard being used. (It is still necessary to use the [INTERNATIONAL] section of the CFG file to indicate if a version of Q&A other than English is in use.) 2) Q&A for Windows versions supported now include: ENGLISH GERMAN DUTCH FRENCH 3) Bug fix in DTFDATA. Versions after 2.12 may have failed to extract the proper data when extracting data without using a speedy field. 8/23/01 1) glball=Y. Puts "All" button on list box. Clicking selects all items. For use with multiselect list boxes. 2) glbshowcount=Y. Puts count of number of items in a list box into the list box title bar. 3) You can now specify the maximum number of records for sorting, to ensure that sufficient memory is allocated. Eg to sort 80,000 records using a 5 byte key, specify SORT=5,80000 in the QAX file. 4) The mouse pointer changes to an hour glass while a list box is being loaded. 5) KEY1 through KEY9 are initialized to null on startup. Previously they had random junk on startup. 6) Moved LANGUAGE= from INI to new [INTERNATIONAL] section of CFG file. This allows each workstation to use a different version of QAWIN. Changed LANGUAGE= to QAWIN=. 7) Improved support for German and Dutch versions of QAWIN by adding the ability to use a keyboard other than the standard US keyboard. See DEVGUIDE for details. 8) MAXWRAPLINES option added to DTFDATA. If FORMAT=RECORD and TRUNCATED=F (the default), this specifies the maximum number of lines to be generated per record. Example:MAXWRAPLINES=10 9) SEPARATOR option added. If FORMAT=RECORD, this generates a line between output "lines" similar to the DOUBLESPACE option but instead of a blank line, a line with underscore characters (_) is generated. The width of the line is specified by the value assigned to the option. Example: SEPARATOR=200. 10) New script commands FIRSTRECORD and LASTRECORD. 11) Help -> Technical now actually displays the CFG file. 12) If you use "FLD:SCRIPT scriptname" in a field and there is no script "scriptname", a message is displayed. (Previously the field would be cleared and the cursor left in it.) 13) Text list boxes now have new /NOENTER option which causes the user's selection to be entered into the field in the database as before, but the cursor is left in the field (normally DTFWIN simulates pressing the ENTER key to exit from the field). 6/28/01 1) More support for keywords in DTFDATA. 2) Ability to double space in list box. 3) Option to wrap list box lines at an arbitrary character (such as a semicolon). 4) Support for German and Dutch versions of Q&A for Windows. 5) Today's date can be passed to a GLB in the format YYYY/MM/DD. The full list of values that can be passed not only to a GLB but to the DTFDATA script command is as follows: Clipboards 1 - 9 Today's date Today's date 6) The SET TITLEBAR option allows setting from one of the 9 key values .. . Examples: SET "TITLEBAR, CUSTOMERomer #,22,15,38,10,1,20" SET "TITLEBAR, CUSTOMERomer #,,22,15,38,10,1,20" 7) New syntax for DO KEYn,value is DO SET KEYn,value. 8) New command DO GET KEYn. Returns KEYn=value to the field, with to trigger field exit programming. 5/22/01 1) Can stuff . 2) New script command PERSISTOFF. 3) bug fix. Wasn't closing databases if DTFWIN aborted and left any open. Possibly Win 2000 problem only. Q&A Win title bars on win 2000 look like <> (n) - [dbname.DTF], whereas on other os's the final database name in square brackets is missing as it should be. 4) bug fix. If DTFWIN aborted with a Q&A Windows in a hidden state, upon restarting DTFWIN didn't realize it was there so it didn't tell it to exit gracefully. It was necessary to "end task" the qawin. 05-08-01 1) Bug fix - list boxes were frozen in place on the screen, can now be moved with the mouse. 05-03-01 1) New option for CUSTOMERomization based on field contents rather than button click. Easier to control from within the database. 2) glbmultiselect option now trims blanks from returned values as they are concatenated together with semicolon delimiters. 04-10-01 1) Bug fix - qawin could cover glb list box. 04-02-01 1) Help -> Technical displays position and size (confirming what is set in the INI file). 2) Bug fix - INI file settings XPOS= and YPOS= were being ignored. 3) Automatic stuffing of Enter into the "This field requires a value." dialog is now turned on by putting AUTOENTER=Y in the [DTFWIN] section of the INI file. (Previously it was in effect all the time.) Use this option coupled with a MANDATORY special field. 4) Automatic stuffing of Enter into the "Do you want to discard the changes" dialog generated by Q&A when you use the REVERT script command now occurs (and is not related to the AUTOENTER option used for MANDATORY fields). 5) The glb options that are on or off can now be set with 1 or 0, Y or N, and T or F. These include glbdialog, glbrestrictrequired, glbcompress, glbviewonly, glbdisplaysort, glbmultiselect, glbnew, and glbfixedfont. 6) glbmultiselect is a new option. If glbmultiselect=Y, you can select more than one line from a list box. Instead of one result being returned, multiple results separated by semicolons are returned. If this is used to select a record, then Q&A will automatically select all records indicated, merely by pressing F10 and F9. 7) If you try to close DTFWIN but it can't because one or more QAWIN's is unsatisfied (eg the user has to respond to a message), the menus for the QAWIN's are turned on so the user can exit, revert the record, etc. 03-14-01 1) Bug fix - DTFWIN allowed itself to be maximized but shouldn't. 2) Enhanced DTFWIN logic so that if there is a DTFWIN dialog in front of a database (eg from a GLB or a MSG command), you can't click on the databae and thereby inadvertently obscure the message. 3) The default title for a glb prompt dialog is based on the list box title, like this: "Restrict string for " + glbtitle Example: Restrict string for CUSTOMERomers However, you can now override the default title like this: glbprompttitle="CUSTOMERomer Selection" The default label for the field in the prompt dialog is: "Enter first characters:" You can now change the field label like this: glbpromptlabel="Last name (1-3 letters):" And now you can specify a second prompt field to create a second value to be passed to the QAX file for use in the SELECT statement as %2. Example: glbtitlerestriction2= and first names beginning with glbrestrictmaxlen2=1 glbpromptlabel2="First name (1 letter):" The SELECT statement would now be something like this: SELECT=LASTNAME .b. %1 & FIRSTNAME .b. %2 4) New glb option glbddisplaysort=Y/N. The default is to sort the contents of a list box before displaying it. Thus, even if DTFDATA doesn't return records in sorted order, they will be sorted anyway. If you set glbdisplaysort=N you will prevent this sorting. Use the N setting in conjuction with DUPS=DUPS and other options for which the output is not sorted and must not be sorted. Example: blank lines between sets of records must not be sorted because they will rise to the top. 03-08-01 1) Bug fix. If DTFWIN terminated abruptly (but without actually aborting) while opening a database, it wasn't closing out any QAWINs that were running. 2) The script command STUFF can stuff . 3) QAMENU ON and QAMENU OFF persist. Previously if QAMENU ON appeared in a script the effect would be very short lived because DTFWIN would aggressively hide Q&A menus as quickly as it possible. That posed a problem if it was necessary to stuff some commands and the menu disappeared too fast. 4) New SCRIPT command PROMPT. Puts up dialog to prompt for a value. In the example shown here, the user is asked to enter a date as year and month (example 2000/12). The next statement assigns this value to the DTFWIN clipboard KEY1. The last statement extracts data, using the passed date as parameter %1 in the QAX file (not shown). PROMPT "Top Down Report" "Report month. YYYY/MM" 150 7 SET KEY1,1,7 DTFDATA ORDERS TOPDOWN.QAX TOPDOWN.TXT The first parameter is the text to appear in the title bar of the dialog. The second parameter is the text to appear in the dialog to describe the field value the user is to enter. It's the actual prompt string. The third parameter is the width of the dialog box. (See also glbxsize, which is a similar parameter for glb dialogs.) The fourth parameter is the maximum number of characters the user should enter. If more are entered, they will be truncated. 02-24-01 1) Bug fix. QAMENU OFF didn't work. (Since DTFWIN always hides the menu automatically, this command isn't really needed anyway.) 2) New script command, REPORT. Runs report by name, similar to FIELD and FORM, which go to a field or form by name. REPORT F/C/L "name" A/L The first parameter selects the type of report. F = FreeForm C = Columnar L = Label The "name" is the name of the report, case insensitive. The last parameter tells Q&A which retrieve to use. A = Attached L = Last run Do STUFF immediately after REPORT if you want the report to be automatically previewed. 02-20-01 1) Bug fix. See "glbnew=Y" in DEVGUIDE.TXT. One of the fields in the target database is supposed to be set by programming to "CLOSE:" followed by the new @NUMBER value. DTFWIN sees this, gets the number, then clears the field. The user doesn't even know it happened. However, if you just open the database directly to add records (rather than clicking on "New" in a GLB), DTFWIN wasn't clearing the field. That left things like "Close:25" in a field when someone was entering data, and it was confusing. DTFWIN now clears the field even if you didn't get there by clicking "New". 02-08-01 1) List boxes are a little wider now. They used to chop off the right most characters of the right most field. 01/31/01 1) DTFWIN would abort if a GLB tried to sort too many records. 2) The number of records that can be sorted has been increased by a factor of ten. It can now sort 10,000 records with 20 char keys. 01-23-01 1) DTFWIN.EXE checks on start up to make sure that the correct DLL is installed. 01-08-01 1) RETURN: can be used similar to CLOSE:, except that the database will be closed immediately (as if the user clicked the CLOSE button). 11-19-00 1) COPY script command: if bad file name, DTFWIN gives a message rather than aborting. 2) DTFDATA script command: the last parameter is optional (the one that specifies one or more parameters to be passed to the QAX file). 3) Script command on "=" line can be comment (;). reword 4) New command TEXTWRITER. Use with SENDMAIL for example. 5) COPY command substitutes proper string for in either the from or to file names. Eg COPY ABC.TXT TO C:\SAVEIT\ABC.TXT 09-17-00 1) If an invalid CFGDIR is passed when DTFWIN is started, an error message is given. Eg bad directory, or missing CFG file. (If no CFGDIR is specified, it is not an error if there is no CFG file.) 09-13-00 1) HBARSIZE and VBARSIZE can be put in [SPECIAL] section of CFG file to allow for a Win 95/98 status bar. 09-10-00 1) Bug fix -- The "FLD:" option didn't allow more than 20 characters in the command. Eg FLD:TLB C:\WINDOWS\TEMP\DTFDATA.TMP failed because it was too long. 2) Bug fix -- HDR= in a QAX file was no longer generating header lines for DTFWIN. 3) If @SIZE, you can drag databases to new positions and they will not snap back. 08-24-00 1) APPEND tolerates a missing "from" file. It acts as if it has an empty file. There is no error. 2) New script command SENDMAIL, allows sending e-mail to multiple addresses using a Q&A Windows Freeform Report. Using a Q&A Windows Freeform report, you can send CUSTOMERomized messages to multiple recipients at once, automatically, just by making a single menu selection. You define a Freeform report by putting the from and to e-mail addresses at the top of each page of a report, along with the subject. To send the e-mail messages, you define a menu choice to run that report and send the output to a file. The DTFWIN command SENDMAIL then reads that file. For each page of the report, it extracts the addresses and subject lines and e-mails the remainder of the report page as the message going to that particular address. Here are the details for setting it up: 1) If you haven't done so already, add a new printer, selecting "Generic / Text Only". This will allow you to send the report to a file without any font or formatting information, which is appropriate for an e-mail message. 2) While in "Design Reports/Labels", select File -> Print, then click on "Setup" and select "Generic / Text Only on FILE:" as a Specific Printer. This will indicate that the output from this report is to go to a file. 3) Select File -> Page Setup, click on "Source" and choose "Continuous - Page Break". This will put a Form Feed between each "page" of the report (that is, between each message to be e-mailed). 4) In defining the report, put "From:" followed by your e-mail address at the top of each page. This can be done in a text box if it doesn't change from message to message. 5) Put "To:" followed by the destination e-mail address on the next line. (Any blank lines will be ignored.) "To:" can be a text box, but the actual e-mail address presumably comes from a database field. 6) Put "Subject:" followed by the e-mail subject on the next nonblank line. This can be a text box or combination of text box and field. 7) The remaining lines are the message to be sent. Blank lines from this point on are included in the message. You can run the report and select preview, but you should also run the report manually and send the output to a file, then look at that file using a program like Notepad to make sure it is formatted correctly for e-mail purposes. Be warned, there can be a discrepancy between what it looks like when previewed and the resulting file actually written to disk. 8) Use Assistant -> Scripting Assistant to create a Q&A Windows script to "Print the Freeform Report" you've defined. 9) Use Assistant -> Manage Assistant Menu to add this script to the assistant menu. Let's say it's script 1. You'll see that same number below, following "QASCRIPT". 10) Add a menu choice "Send e-mails" in the DTFWIN INI file like this (for this example, the report is run from the CUSTOMEROMER database): Send e-mails = OPEN CUSTOMEROMER DELETE "C:\WINDOWS\TEMP\SENDMAIL.RPT" DIALOGCHECK OFF QASCRIPT 1 REPEAT IFWINDOW "Q&A" QUIT IFWINDOW "PRINT TO FILE" BREAK ENDREPEAT STUFF "C:\WINDOWS\TEMP\SENDMAIL.RPT" SENDMAIL C:\WINDOWS\TEMP\SENDMAIL.RPT 11) You may edit the SENDMAIL.BAT file (provided with DTFWIN) if you don't want to use the email program supplied with DTFWIN, if you want to send to a bcc address, etc. You do not need to do this, the BAT file and e-mail program supplied work fine without any changes. 12) Make sure the properties for the SENDMAIL.BAT file say to close on exit. 13) Connect to the Internet, run DTFWIN, select the menu choice, and watch the e-mails go out. As each message is prepared and sent, a DOS session will open temporarily displaying the from, to, and subject lines. 08-06-00 1) Pressing F1 in a field normally causes Q&A Windows to display generic help. Normally, if the user wants to see the field help, he must first select "Records", then "Field Help". DTFWIN changes Q&A Windows so that pressing F1 in a field will display the field help, not the Q&A Windows help file. To restore standard Q&A Windows behavior, put FIELDHELP=N in the [DTFWIN] section of the INI file. (If you really want to provide the user access to the standard Q&A Windows help file, you could run Winhelp.exe from a menu choice.) 2) DTFWIN on startup is supposed to shutdown any qawin's left over from a previous session. (This would only happen in abnormal situations, since DTFWIN should always close qawin's on exit.) This was broken. It has been restored. 3) DTFWIN keeps a lookout for Q&A dialogs to prevent lockup situations (for example, DTFWIN will not try to exit if a Q&A Windows needs an answer to some dialog). A new command, DIALOGCHECK OFF, allows an override of the automatic process. You may need to do this in a DTFWIN script to determine what is happening -- example when running a report that finds no records, your script should detect the dialog so it can act accordingly. This option is automatically turned on at the beginning of each script, so each script that needs it to be off must turn it off explicitly. You can turn it on again if desired. 4) The script commands ALLOW and DENY now understand menu items ASSISTANT->MENU_1 through 9. 5) DTFWIN now controls the order of appearance on the screen of databases, dialogs, itself, and any programs you start from DTFWIN (such as QAWRITE or the calculator). Dialogs appear in front of everything else. If DTFWIN starts another program (an image viewer, a phone dialer, Q&A Write for Windows, the calculator, etc) it will make sure that that program stays in front of DTFWIN and all the databases. The assumption is that these other programs are to be used then closed. If you want to access DTFWIN or the databases, you can drag the covering program to the side or minimize it. 6) In a TLB file you can have multiple columns, some of which may be only for display purposes in the listbox, others containing data to be stuffed into database fields. How each column is to be handled is specified by a line with +'s and -'s. This line may now be omitted if all columns are to be stuffed. Here's an example: City and State ---------------- -- Phoenix AZ Pittsburgh PA This is equivalent to: City and State + + ---------------- -- Phoenix AZ Pittsburgh PA 7) The GLB dialog prompting for a restrict string now has wider box to accommodate a wider field. 8) If a dialog appears with "This field requires a value." or "Do you want to discard the changes" then DTFWIN stuffs ENTER automatically. 9) You can no longer change the size of DTFWIN (it no longer has a thick border, so an edge or corner can't be grabbed with the mouse). Because this gives it a narrower border, the vertical size has been changed. The default DTFWIN heights are: 40 Windows 95/98 56 Win 3.1 These can be changed in the CFG file, which is described in the README_W.TXT file. 10) New script commands, in alphabetical order. (There are now about 50 commands in total.) APPEND file TO file ------------------- Appends one file to another. Example: APPEND C:\WINDOWS\TEMP\RPT.TXT TO C:\WINDOWS\TEMP\RPTS.TXT (This is shown on two lines to accommodate an 80 column display of this file. In the INI file the statement must be on one line.) See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. BREAK ----- Exit from a loop. See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. CONTINUE -------- Return to the top of a loop, skipping any statements that come between this statement and the next ENDREPEAT statement. This might be used in conjunction with IFWINDOW. For example, IFWINDOW "abc" CONTINUE means that as long as the "abc" window is visible, keep going back to the top of the loop. COPY file TO file ----------------- Copies a file. Has the option for generating a file name based on the date, with a tie breaker terminal letter. Example: COPY C:\WINDOWS\TEMP\REPORT.TXT TO C:\HISTORY\.TXT would create a file with a name like 000802A.TXT (or 000802B.TXT if the A file already exists). (This is shown on two lines to accommodate an 80 column display of this file. In the INI file the statement must be on one line.) See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. DELETE file ----------- Deletes the named file. Example: DELETE C:\WINDOWS\TEMP\REPORT.TXT See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. ENDREPEAT --------- End of a loop. Cannot be nested. See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. GOTO label ---------- GOTO (with label). A label, preceded by a colon (:), may appear at the beginning of a statement or on a line by itself. Labels may be "outdented" for readability; just make sure they are indented at least 10 spaces, otherwise they will appear to be a new menu choice. Labels can consist of any reasonable characters except spaces. Example: IFWINDOW "Q&A" GOTO MYLABEL (statements here) :MYLABEL STUFF "HELLO" See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. IFANYOPEN --------- If no databases are open, then this menu choice is greyed out. Must be the first statement in the script. See also IFOPEN. IFWINDOW "text" command ----------------------- Tests for a window with the specified text in the title bar. The test is not case sensitive. If the window exists, the specified command is executed. If the window does not exist, the next command is executed. See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. MASSUPDATES ----------- Brings up Mass update menu. The Q&A menu does not need to be visible for this command to work. QAMENU ON/OFF ------------- To run a report or a Q&A Windows script and be able to stuff characters into a dialog that comes up (eg to modify the retrieve spec or the output filename etc), use QAMENU ON, STUFF "R", QAMENU OFF rather than using the DTFWIN script command REPORTS. For the same reason, to use the scripting assistant, use QAMENU ON, STUFF "S", QAMENU OFF for the scripting assistant (instead of QASCRIPTS). Summary: use REPORTS and QASCRIPTS to bring up the reports dialog and the scripting assistant dialog for the user to access them, but use QAMENU ON and STUFF if you want to access them in your DTFWIN script. QASCRIPT 1 (through SCRIPT 9) --------------------------- QASCRIPT 1 tells Q&A Windows to run the script numbered "1" on the "Assistant menu." (You can put scripts on the menu using the "Manage Assistant Menu" option on the "Assistant" menu.) DTFWIN can run scripts "1" through "9". See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. QASCRIPTS ------- Brings up the "DAVE the Scripting Assistant" menu, as if the menu choice Assistant -> Scripting Assistant had been made. (This is not "DAVE the Intelligent Assistant".) The Q&A menu does not need to be visible for this command to work. QUIT ---- Causes the current script to stop executing. If there is a secondary script, it is executed at this point. See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. REPEAT ------ Beginning of a loop. Cannot be nested. See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. RETRIEVEALL ----------- RETRIEVEALL clears the retrieve spec, so a subsequent retrieve will find all data records. Note that if a script is to put values into certain fields to create a retrieve spec, it is good practice to do RETRIEVEALL first to clear any existing spec, then use RETRIEVE and FIELD and STUFF to set up a spec. WAIT n ------ Causes a wait of approximately n/10 seconds. See Section "Script commands - example" of the DEVGUIDE.TXT file for an example. 06-21-00 SET command has optional parameter that specifies a character to be removed from the string. Example: if a templated value is returned by DTFDATA, the template characters must be removed before the string can be used in a retrieve spec. 03-29-00 1) New parameter in the CFG file allows workstation specific control of vertical size of DTFWIN. Example: [SPECIAL] DTFWINHEIGHT=50 Put the SPECIAL section in the CFG file following the DIRECTORIES section. 2) If you set a field to some text followed by "", DTFWIN will delete the "" and press the Enter key. This is useful when a Q&A Windows is used to give a field a value and then go to the field. DTFWIN will press Enter to trigger the field exit programming. 3) Unless a database's location is explicitly set (eg to "0" and "0", meaning the upper left corner of the Client area below DTFWIN), the database will be centered below DTFWIN. 4) By default, all Q&A Windows commands are allowed (previously the default was denied). The reason is that DTFWIN now hides the Q&A menu so there is no longer any need to deny the user access to the commands. Since some commands are needed at unexpected times for the normal functioning of Q&A, it is simpler to default to "allow" yet have the ability to deny them if needed. BECAUSE THE Q&A WINDOWS MENU IS NOW HIDDEN, YOU SHOULD REMOVE THE ALLOW'S AND DENY'S FROM THE AUTOSTART SCRIPT IN YOUR INI FILE (if you have such a script). IF YOU DON'T, DTFWIN WILL BE ABLE TO START Q&A WINDOWS BUT THE DATABASE WILL NOT OPEN. 5) A new option has been added, a dialog with buttons. When the user selects a button, a secondary dialog is invoked. For example, you could have multiple searches tied to an F12 button on the database form. Upon clicking the F12 button (or pressing the F12 key), a dialog would appear with buttons for the various search choices. When a selection is made, the specified search (eg a GLB or TLB) is invoked. Here is a sample file specifying this new type of dialog. // Ask whether to search by first or last name title=Name search xsize=120 ysize=70 button=Search by last name,GLB SRCHLAST.QAX button=Search by first name,GLB SRCHFRST.QAX In this example, next to the first button will be the words "Search by last name". Next to the second button will be "Search by first name". You can have at most 10 buttons. To use this type of dialog, specify "F12:DLG filename" on the Q&A Windows button. Example: "F12:DLG NAMESRCH.DLG". With time I plan to add more options to this dialog. 6) The database used by a GLB is named by the parameter "glbdb". DTFWIN has been changed so that the database is now named using the script name of the database, not the actual name. 7) If you specify TIMEOUT=300 in the [DTFWIN] section of the INI file, a user will time out after 300 seconds of inactivity. The entire application will shut down, and any Q&A databases that are open will be closed. If you set a negative value, such as TIMEOUT=-10, then the timeout interval will be 10 seconds but it won't actually timeout. It will only display a message saying "TIMED OUT". Use this to test the behavior of DTFWIN to learn under what conditions it will time out. The time out doesn't work in all cases. For example, if the user is in a DTFWIN dialog, it won't time out until he exits from it. However, it does time out if he has qawin up and isn't doing anything. Changing a form or tabbing to another field will keep it from timing out. Changing the contents of a field (first 100 characters) will keep it from timing out. 8) If you close a database by clicking on a CLOSE button or using the CLOSE script command, the focus is changed to another database (instead of leaving the focus at DTFWIN). 9) Changes to logic using database size and coordinates in the INI file. Should not affect program behavior. 10) If glbnew=Y, a button with the text "NEW" appears on the listbox between OK and CANCEL. If clicked, DTFWIN automatically opens the target database (specified by glbdb= in the QAX file) in add mode. When the user closes that database, focus automatically returns to the current database. Typically one of the fields in the target database will be assigned a new value using @NUMBER. If a field is given the value "CLOSE:" + @STR(the id field), DTFWIN will remember the number and clear the field. Then, upon closing the database, when the focus returns to what had been the current database, the value of @NUMBER followed by Enter is stuffed into the field automatically. If "CLOSE:" isn't used to pass a value to DTFWIN, on closing the database it will pass back the contents of the current field. 11) New script command REVERT. 12) New script command QAWRITE, launches QAWRITE. 13) DTFWIN has a title bar and menu, and below that there is a white window that forms a backdrop for qawin's that are started. This white window no longer goes away when a qawin is started, a fact that is very apparent when the qawin does not occupy the same screen space but is smaller. (Previously the DTFWIN title bar and menu would persist but the white window would go away, so the qawin would float over the desktop and anything else that happened to be present.) 14) Correction to documentation for in DEVGUIDE.TXT about using SCRIPT in field mode. 15) IFEXIST script command, similar to IFOPEN, greys out menu choice if the database doesn't exist. 03-16-00 1) The [DTFWIN] section of the INI file now has two new parameters. They control how close an F12 button has to be to a field for DTFWIN to pair them so that the label on the F12 button will be used as a field mode command for the field. The x distance is measured from the right side of the button to the left side of the field (so the size of the button does not affect proximity). The y distance is from the top of the button to the top of the field. F12xProximity defaults to 10 and F12yProximity defaults to 5. 2) The Q&A Windows menu is now hidden. If you want to override this during development, put @SHOWMENU on the command line. 3) The standard text in the qawin title bar is replaced with more meaningful and esthetically pleasing text. For example Q&A [CUSTOMEROMER.DTF] is replaced with << Honest Abe Car Sales:CUSTOMERomer database >> (2) where "Honest Abe Car Sales" is the application name. The number "2" in parentheses is the number of the database and may or may not be useful to humans but is unobtrusive and required by DTFWIN. If you have designed the forms to have unique buttons and have listed the form names in the INI file, then the form name will also appear, following the word database. Example: << Honest Abe Car Sales:CUSTOMERomer database Data Entry form >> (2) 4) The DTFWIN title bar now has a minimize box. If you minimize DTFWIN, it will automatically hide any databases that are open. If DTFWIN is minimized and you click on it in the status bar to restore it, the databases will also be restored automatically. 5) If you move DTFWIN, any open databases will be moved with it. If you move a database, it will snap back into position. 03-04-00 1) You can set any field to "FLD:" followed by one of the field mode commands. For example, to do a generic listbox, you could set a field to "FLD:GLB CUSTOMEROMER.QAX". With this option, you do not need to have unique buttons and do not need to identify fields by coordinates. 2) You can set any field to "PGM:" followed by one of the program mode commands. For example, to put up a message box, you could set a field to "PGM:DO MSG label,button,icon,text of message". With this option, you do not need to have unique buttons and do not need to identify fields by coordinates. 3) A field mode command can be run simply by making it part of the label of an F12 button. Add the command following "F12:". For example, "F12:GLB CUSTOMEROMER.QAX". It is important that the button be located immediately to the left of the field so that DTFWIN can associate the button with the field. The command will be executed if you press the button or if you are in the field and press the F12 key. 4) Most of the sections in the INI file are now optional. Specifically: [MAP] [UNIQUE BUTTONS] [SPECIAL FIELDS] [AUTOMATIC FORM SELECTION] [NAVIGATION] [SCRIPTS] 5) The CFG file is optional. Default directories are: QAWINDIR C:\QAWIN TEMPDIR C:\WINDOWS\TEMP DATADIR install directory 02-29-00 1) [DATABASES] section has Lock column. If "Y", the database cannot be closed if there aren't enough copies of qawin for the number of databases being opened. 2) The title bar text can be changed from within the program. Here is the syntax. DO TITLEBAR,text Example: DTFWIN = "DO TITLEBAR, Case:" + CASENO; GOTO DTFWIN; Sets DTFWIN to "DID TITLEBAR". 3) The DTFDATA routine can be called from a script. You can pass one of tkey key values as a parameter. Here is the syntax: DTFDATA database qaxfile outputfile parameters Example: DTFDATA PI LISTPI.QAX LISTALL.TMP 4) The RUN command can be used in a script. Not fully tested. Syntax is: RUN program 5) A TLB can be displayed from a script. Syntax: TLB filename Examples: TLB LISTA.TXT TLB C:\WINDOWS\TEMP\TLB.TMP TLB \TLB.TMP (This syntax is now also permitted for TLB's in special fields and invoked via programming through the DO TLB command.) 6) There are now several parameters for a TLB that can be specified in the title line (put them at the right side, not the left). They are: /VIEWONLY Previously existing option. /FIXEDFONT The contents are displayed in a fixed font. /YSIZE=nnn You can specify a number to control the height of the TLB window. The default value is 100. The value you specify must be 3 digits. Example: "/YSIZE=250". (The width is computed automatically based on the contents you supply.) 7) DTFDATA now has DAT=, a new option for headers that's useful for DTFWIN. (Remember that DTFDATA is built into DTFWIN.) The header options are: WIN= generates headers in DTFWIN. DOS= generates headers in DOS but not in DTFWIN. HDR= generates headers in DOS and in DTFWIN. DAT= generates headers in DOS all the time, but it generates headers in DTFWIN iff DTFDATA was called directly instead of via a GLB. (The DAT option is new, the others are unchanged.) 8) Bug fix. Horizontal scVENDORing wasn't working for TLB and navigation listboxes. (It was working for GLB's). 9) CUSTOMERom button supported. In the [DTFWIN] section of the INI file, add a line like this: BUTTON=buttonname where "buttonname" is the text you put on the CUSTOMERom button. Example, you might want a button labelled "FAX": BUTTON=FAX DTFWIN can be CUSTOMERomized if necessary to handle clicks on this button. Without CUSTOMERomization, if the user clicks on the button, your database should execute a script that sends control to the DTFWIN field, at which point the DTFWIN program will enter the following text and press Enter to trigger the field exit programming: BUTTON formname,buttonname "formname" is the form name from the INI file; you might want to use @layout instead. "buttonname" is the text that was on the button that was clicked. At present, DTFWIN only supports one CUSTOMERom button, so this information is redundant. 10) SORT= option in QAX files now works. (Previously it only worked when DTFDATA was called as a DOS program.) 11) DAY date format now available (in addition to MM/DD DAY etc). 12) You can specify glbfixedfont=Y in a QAX file so that a GLB will display with a fixed font. You can use with the glbhelpfile option to supply (non-scVENDORing) column headers for the listbox. 02-02-00 1) [NAVIGATION] section of INI file is optional. If present, it must come right before the [MAIN:MENU] section. 2) The CFG file may now have an entry NAVIGATION=filename. If present, it specifies a file that contains the navigation entries. If there is an [NAVIGATION] section in the INI file, this will override it. If no path appears, the file is in the same directory as the INI file. If a path appears, the file can be anyplace. Example: "NAVIGATION=NAV.INI". 3) New DTFWIN field command DO KEYn,xxxx. 4) You can now do a listbox from a script (GLB filename.qax). If there is an error or the user presses ESC, the script is aborted. 5) New script command, SET KEY1, to set the key to the result of a listbox (glb). Do immediately after the GLB in the script. Specify the starting column and the number of columns to be extracted from the text returned by the glb. (See glbextractpos and glbextractlen.) Example SET KEY1,1,6 will take the first six characters. (If you want to take everything, specify something like 1,99.) Keys 1 - 9 are valid. 6) New script command, SET TITLEBAR, to set the title bar to the result of a listbox (glb). Do immediately after the GLB in the script. Specify pairs of starting column and field width. Example: SET TITLEBAR,22,15,38,10,1,20 The maximum number of pairs is 4. There is a limit to the amount of text that can be displayed in a title bar. If you have too long an application name and try to append too much text, it will be truncated. 7) New option for script command STUFF is . If you're stuffing it in a retrieve spec (which is likely), you'll probably want to do this: STUFF A Keys 1 - 9 are valid. 8) Can now specify "Key" for databases and an Auto_Retrieve_Script in the [DATABASES] section of the INI file. If the specified key is changed and then the user switches to another database, the auto retrieve script will be run automatically to retrieve the proper record(s). Specify both a key (1 - 9) and a script. If a script is already running, the Auto_Retrieve_Script will run after the current script exits. 9) New script command TRACE ON or TRACE OFF. 10) The FORM command didn't work if all forms started with the letter M. Example: MASTER FORM and MAIN. 11) A glb can be passed a parameter, including the values of the keys (see SET KEYx). 12) You no longer need to set glbtab values if they are the same as the fields widths specified in the list of fields to be retrieved. 13) DTFWIN no longer aborts if you attempt to open a database that's missing. 14) New option "CANCELAUTO" for script command "OPEN". Use when another script is opening a database and the auto retrieve script would interfere. For example, when opening to add a new record, you don't want the auto retrieve script to try to retrieve a record. 15) The TECHNICAL menu and script command will display the values of any keys (see SET KEY etc). It also displays how much of certain resources have been used; useful information to let you know if your application is about to burst at the seams. 12-31-99 1) Bug fix - Caused by DO DTFDATA returning too long a record. As a convenience, the first record of those found by DTFDATA is passed back to the database through the DTFWIN field. If the record was too long, it caused problems. The DTFWIN program now truncates the text it returns to the field at 80 characters. 12-29-99 1) There is now a script command MSG that displays a message box. Similar to DO MSG used in the DTFWIN special field, but it doesn't return a value and has no label. The syntax is: MSG "button,icon,text of message". 12-27-99 1) The @COORDS command line option has been renamed to @DESIGN. Also, when @DESIGN is in effect, you will now be permitted to design the input form. This is to facilitate adding and positioning fields, particularly the DTFWIN field. (Normally users are prevented from doing anything that would alter the form design.) If you have @DESIGN in effect, the cursor is in a field that isn't a special field, and you press F12, you will be asked if you want to go to the DTFWIN field. If you reply "Yes", control will pass to that field (This is useful because the DTFWIN field is often hidden and difficult to find.) If you say "No", it will display the coordinates of the current field. You can use this as follows to design forms with the DTFWIN field. First, put the field on the form near the middle so it is likely to be hidden by any dialogs that appear. Then press F12. Note where the dialog appears, then reply "Yes" and see if the DTFWIN field would have been covered by that dialog. Edit the form as necessary. When you are pleased with the placement and appearance of the DTFWIN field, press F12 to go to the DTFWIN field, then press F12 again and say "No" to copy down the coordinates of the field. 12-25-99 1) glbhelpfile=filename If specified, the contents of the file (a plain ascii file) are displayed in the listbox below the title bar and above the actual list. You can specify an actual file name, such as LBHELP.TXT. You can also use a parameter, such as %2; in this case, this must be the last parameter value passed. Default is blank, or no help file. 2) glbduplen=10 Specify the number of characters to be suppressed if they are duplicated from line to line. The test is performed as the listbox is loaded, which means that the QAX _must_ return them using an appropriate key so that they are in order. If this option is used, the listbox will not be sorted automatically; if it is not used, the listbox will be sorted automatically. Default is 0, or no suppression. 12-21-99 1) A TLB file can omit the second line with the + and - to indicate which column or columns should be inserted into the database. If the line is omitted, it defaults to a single +. This option allows a file used by DTFTALK in the DOS world to be also be used without change as a TLB in the Windows world. 2) A TLB file can use line draw characters instead of hyphens to indicate the column headings. They are only visible in the DOS world using DTFTALK, and line draw characters look better because they form a solid line. 3) GLB explanation in DEVGUIDE.TXT improved. 4) GLB, TLB, RUN, SCRIPT, and XLOOKUP syntax changed to remove the =. For example, it used to be GLB=CUSTOMEROMER.QAX in a special field or DO GLB=CUSTOMERONMER.QAX in the DTFWIN field, and now it's GLB CUSTOMEROMER.QAX or DO GLB CUSTOMEROMER.QAX. The reasons are: 1) to be consistent with DO DATA, DO MSG, and DO US, and 2) so that when a value is returned, such as DID GLB CUSTOMEROMER=1234, there is only one "=" so it's easier to use @INSTR in the database programming to split out the value that was returned. This change will require some adjustments to your INI file and in your database programming. The [SPECIAL FIELDS] section of the INI file should be checked for required changes. Also, if you have DTFSPECS, you can use it to scan your programming for GLB=, TLB=, RUN=, SCRIPT=, and XLOOKUP=. 12-20-99 1) DO GLB in the DTFWIN field now allows a parameter list to be passed into the QAX file as %1, %2, etc. See the DEVGUIDE.TXT file for an explanation. 2) DO DTFDATA options FORMAT=TABLE and FORMAT=SPLIT weren't working quite properly. (However, there was no problem in the DOS version of DTFDATA.) 12-19-99 1) The new option wasn't working on certain forms. 12-13-99 1) Discovered that using an editor that puts tab characters into the INI or CFT files will cause DTFWIN to get very confused. It does not expand tabs into spaces, you must take care to do that yourself. 2) By putting into a field via database programming, you can tell DTFWIN to do a down arrow. If the field has a restrict spec, this will automatically make the list appear, prompting the user to make a choice. 3) DO US label=value1;value2;value3;value4 allows you to do a "userselect" poup list. It differs from a restrict spec or a text listbox (TLB) in that it's specified in the program, so it can be dynamic. 11-12-99 1) There are now 10 formats for displaying dates. These are: MM/DD/YY DD/MM/YY MM/DD/YYYY DD/MM/YYYY MM/DD DAY DD/MM DAY MM/DD/YY DAY DD/MM/YY DAY MM/DD/YYYY DAY DD/MM/YYYY DAY The characters DAY will be replaced with the day of the week. Run DATEFMTS.BAT in the DTFDATA demo to see these in use. 10-31-99 1) DEVGUIDE.TXT changed slightly to correct instructions on DO RUN command for DTFWIN field. 2) FAXDEMO database added to show how to extract data to merge it into another program, such as a word processor with the intention of sending it to a fax program. 10-27-99 1) Bug fix - If a field has a restrict spec then QAWIN generates a listbox for it with all its possibilities. If the user selected a choice with the keyboard, no problem. However, if the mouse was used to select from the list, DTFWIN was allowing it to happen but generating an error message saying the action was denied. This has been cleared up so that no error message is generated. 10-24-99 1) Allow and Deny now include a new category of commands, "Hidden". For example, "Hidden->F3" is the command that clears a retrieve spec when you press F3. This command does not correspond to any menu choice. 10-22-99 1) glb's can now have up to 20 columns. Previously the limit was 10. For example, you can have glbtab1 through glbtab20. 10-20-99 1) Toolbar->Load Input Form added to Allow and Deny script commands. DEVGUIDE.TXT updated to show not only this but also to show which menu items are also toolbar items (so that if you allow or deny a menu item you are also allowing or denying the toolbar item). 10-18-99 1) SEPARATOR in menu definitions draws a line across the menu. 2) IFCLOSED is like IFOPEN but the reverse of course. 3) You can have databases in a second data directory instead of in the standard DATADIR as specified in the CFG file. Specify DATADIR2= and the directory path in the CFG file, and in the [DATABASE] section, put \ in the actual database name column before the database name. The backslash here is optional, since DTFWIN always provides one automatically at the end of DATADIR and DATADIR2. If you put another one here for readability, it is ignored. 4) The STUFF script command has and as choices. Whatever you specified in the CFG file for DATADIR or DATADIR2 will be stuffed, including a terminating backslash (\). 10-15-99 1) Bug fix - when I changed TLB's so they don't sort, I inadvertently also made the same change to GLB's. GLB's should be sorted, TLB's should not be sorted. 10-01-99 1) Bug fix - if size of db was left blank in INI file, database was put up in a very small window. 09-21-99 1) DTFWIN field can be set to DO GLB=CUSTOMEROMER.QAX After the listbox is closed by the user, the DTFWIN field is set to DID GLB=CUSTOMEROMER.QAX=1023 where "1023" is the value returned. If there is an error, the DTFWIN field is set to DID GLB=CUSTOMEROMER.QAX=ERR and if the user presses the ESC key, the DTFWIN field is set to DID GLB=CUSTOMEROMER.QAX=ESC 2) DTFWIN field can be set to DO TLB=C:\WINDOWS\TEMP\SOMEFILE.TMP Note that with this option, the full path of the file can be specified. (The default directory is QAWINDIR.) On the other hand, if you specify TLB= in the INI file, you cannot specify a full path, hence the file to be displayed must be in the QAWINDIR directory, After the listbox is closed by the user, the DTFWIN field is set to DID TLB=C:\WINDOWS\TEMP\SOMEFILE.TMP=1023 where "1023" is the value returned. If there is an error, the DTFWIN field is set to DID TLB=C:\WINDOWS\TEMP\SOMEFILE.TMP=ERR and if the user presses the ESC key, the DTFWIN field is set to DID TLB=C:\WINDOWS\TEMP\SOMEFILE.TMP=ESC 3) If the first line of a TLB file ends with "/VIEWONLY", the user will be shown the information and will be able to scVENDOR to see it if necessary, but can only click on "Cancel" to clear the box. No selection is possible. The "/VIEWONLY" will be removed from the first line before it is used for the title of the listbox. 4) If a QAX file specifies glbviewonly=Y, the user will be shown the information obtained by the built-in DTFDATA and will be able to scVENDOR to see it if necessary, but can only click on "Cancel" to clear the box. No selection is possible. 5) DTFWIN field can be set to DO DTFDATA database qaxfile outputfile parms After DTFDATA is called, the field is set to DID DTFDATA database qaxfile outputfile parms=result where "result" is whatever is returned in the first record in the outputfile. If there is an error, the DTFWIN field is set to DID DTFDATA database qaxfile outputfile parms=ERR Note: this command can be used for posting. As a byproduct of posting, you can generate and display a file showing the current status of each item updated in the target database. 6) TLB files are no longer sorted before being displayed in the list box. 7) Scripts are executed faster. This is noticeable on startup when menu options are being allowed or denied and multiple database are being opened, as in WinDemo. 8) DTFWIN field can be set to DO SCRIPT=dtfwinscriptname and the script will be executed. Nothing will be returned to the DTFWIN field. It will be cleared automatically before the script is executed. 9) The RUN= command for special fields can now specify %1 to include the contents of the field. For example, to open a file in a word processor, you could put the name of the file in a special field and then specify RUN=WINWORD %1 in the INI file for that field. This will run WINWORD.EXE and pass to it on the command line the contents of the field. You may also specify other parameters on the command line, both before and after the %1. The program to be run, WINWORD.EXE, must be in a directory specified by the path as defined in AUTOEXEC.BAT. 10) A special field may contain SCRIPT=dtfwinscriptname to cause the script to be executed when the user presses F12 in the field (or clicks on the associated F12 button). 11) DTFWIN field can be set to DO RUN=program parm %1 parm to run an external program under the control of the Q&A programming. 09-09-99 Fixes re sizing for Win 3.1 09-03-99 [SCRIPTS] section added to INI file. New commands "Allow" and "Deny" added to script language. The script "AUTOSTART" is executed as soon as DTFWIN is started. This can be used to open one or more databases immediately. (Use the ability to specify the position and size of the databases to tile them if you wish.) [DATABASES] moved earlier in the INI file. CFG file section renamed to [DIRECTORIES]. Read the "Menus and Scripts" section of DEVGUIDE. 08-30-99 "Width Height Xpos Ypos" added to [DATABASES] section of the INI file to allow specifying the size and position (relative to DTFWIN) of each database. Now must have both CFG and INI files. CFG file has [DIRECTORIES] and INI file has [appname] and [DTFWIN], all read before logon. [DTFWIN] section of the INI file can specify size and location of DTFWIN on the screen. Earlier enhancements from the original version of DTFWIN as seen in WinDemo. Dialog boxes (with OK and Cancel buttons etc). A dialog appears to prompt the user for the string to restrict the data used to load a listbox from a database. Support for data integrity logic. More robust handling of databases that can't be closed due to a problem (such as a mandatory field that's blank). A CFG file in addition to the INI file. The ability to use only copies of QAWIN and not QAWIN itself (so that Q&A Windows is available outside the application while the application running). Posting. Date formatting in listboxes.