March 11, 1999 Dear OKScript User, The OKScript Status Report is sent to OKScript licensees, developers and friends when significant updates have been made to the program. To be removed from the distribution list please reply to this message and indicate that desire. One significant enhancement and a number of minor fixes and tweeks occured during this period. An extended discussion of the new DO directive capabilities are included in item 1. If these issues affect your scripts you can download the latest revision from http://home1.gte.net/yweare. Your existing license will automatically be active on the new software if you install it to the same directory, otherwise you will have to re-enter the registration data (or copy the okscript.ini file from the folder where your licensed program was installed.) The current build is dated March 9, 1999. Click Help | About to determine the date of your copy of OKScript. This list is presented in approximate order of importance. See the latest help file to learn more about new or modified capabilities. 1. The DO directive, which was originally intended to provide scheduled script activation, was extended to also include scripting for generic menu and button clicks. This feature is useful when a script repeats the same instructions in a group of BUTTON or MENU handlers. This redundancy can often be consolodated into one DO handler. Several predefined macros that access the activating button's or menu's properties (including button color, menu checked status and control name, window and keystring fields) have been implemented to expand the utility of this feature. Here is an example of how this feature might be used with the OKWin client for OKbridge. Say that you want to build an alert panel that sends messages to both opponents and the spectators, but do not want the messages to be issued through the bidding box's edit control, that is, you want to make a bid then punch an OKScript button to issue the alert (after the bidding box has disappeared.) In the past BUTTON declarations that would do this would look like: BUTTON capp2D red OKbridge =majors{enter} PUT {%}majors{enter} With the new DO features you could reduce this to: BUTTON capp2d red x majors (note that the target window field will be ignored and can be set to anything - x is a nice short placeholder) and include this handler in your script to perform the details for *all* of your BUTTONs. (Note that I added a lot of explanitory annotation that you can freely remove, reducing this script down to eight lines.) - This is a handler that is activated by a left button - click prior to the button's main handler. You can - create one for right clicks and menu clicks as well. - Although somewhat less useful, such handlers which - activate AFTER the main button handler is completed - are also possible. DO BEFORE left - Only perform these functions for buttons that are RED. - This allows your panel the flexibility to have buttons - that perform differently and are not burdoned by this - DO script. IF nocase %-mycolor% EQ red - Activate the target window. WINDOW OKbridge - Send the alert to LHO and RHO. The predefined - -mykeys macro picks up the BUTTON's keystring field. PUT =%-mykeys%{enter} - Send the same string to the spectators. PUT {%}%-mykeys%{enter} - Disable the window and keystring fields of the - associated BUTTON directive so that it doesn't - try to replicate this functionality. MODE OFF windowfield MODE OFF keyfield - End the IF statement. FI 2. The inability to include more than one menu separator was fixed. The following code now performs as expected: MENU abc|def|- MENU abc|def|ghi MENU abc|def|- 3. A bug that caused an error when a window was specified in a BUTTON directive that included a width specification was fixed. 4. The PRAGMA HELPOFF, which removes the help menu from a panel (to save space), was added. 5. The option to pause while sending keystrokes after an {enter} is encountered was expanded to also pause after the last character in a script line (BUTTON, MENU, RIGHT or PUT.) 6. Some recent releases of the program would produce a panel with replicated buttons if Ctrl-R was struck while a panel was active. This has been fixed. 7. Fixed the title bar anomolies that occasionally occured when performing a CloseAll or SaveAs. Your ideas and problem reports *are* appreciated. You can email them to me (yweare@gte.net) or post them to the message board that I have set up at my web site. Thank you for using OKScript. Michael Mardesich okb://mikezzz yweare@gte.net http://home1.gte.net/yweare