OKScript Status Report #26 August 5, 2004 Dear OKScript User, The OKScript Status Report is sent to OKScript licensees, developers and friends when significant updates have been made to the program. Interesting techniques and applications for the program will also be distributed in the report periodically. To update or be removed from this distribution list please see the links at the bottom of this message or write me at yweare@gte.net. This issue announces OKScriptX, the first major update to OKScript since version 4.0 was released in October 1998. The motive for developing OKScriptX was to rework the implementation of several annoying features. During this process a few features were added and several bugs were fixed. Annoyance removal has made the OKScriptX language slightly different than the OKScript 4.0 language. Existing scripts, with the .oks extension, automatically execute in legacy mode and generally run fine. The changed and new features are accessed from scripts with the .okx extension. In the list below, items that pose a compatability issue are marked with an asterisk (*) bullet. The changes should make the program easier to learn and use, and be less prone to coding errors. The current version of OKScriptX (dated July 4, 2004) can be downloaded from... http://home1.gte.net/yweare/index.htm The new and changed features of OKScriptX include: - extending the built-in macro feature to accept a macro parameter. This makes it possible to add many of the new features as macros. For example, %-ISNUM abc% examines the macro abc and returns 1 if it is a number and 0 otherwise. A macro argument can be either a macroname or a literal string that begins with an apostrophe ('), thus %-ISNUM '123% returns 1 (true). - the addition of several new built-in macros, including... -ARG n access PROC arguments. -QUERY display a user dialog. -ISNUM test for numericity. -UPPER change a string to upper case. -RUNNING test if a program is running. -LENGTH determine the length of a string. -EXISTS test if file exists. -BUTTONENABLED test if a button is enabled. -MENUENABLED test if a menu is enabled. -MENUCHECKED test if a menu is checked. -STATESAVED test if the current macro state has been saved. -EQ -NE -LE -LT -GT -GE and -SEECASE and -HIDECASE string comparisons. -CHR produces a character with a particular ascii value (also {#ddd} ). -ORD produce the numeric ascii code of the argument character. -EX start of a numeric expression. * the IF instruction was changed to take advantage of the new built-in macros. The argument of IF is now simply an arithmetic expression - no more awkward iftypes. - brace character usage has been extended... * {alt}, {ctrl} and {shift} replace ~, ^ and +. This should solve the frequent problem of PUTing a plus (+) character with the expectation that it will be interpreted literally. In OKScriptX +, ~ and ^ have no special (meta) meaning. - a braced character now can include a count, thus {RIGHT 3} is the same as {RIGHT}{RIGHT}{RIGHT}. - {SPACE} has been added. - {#nnn} returns the ascii character nnn. - new PRAGMAs... - ROLLUPON and ROLLUPOFF - replaces functionality from PLACE. - SHOWTABS and HIDETABS - replaces functionality from PLACE. - OKX - enables OKScriptX features for .oks file. - new instructions... - RECOMPILE rebuilds the current file, which may render differently if macro values have changed. - EXTRACT gets a substring from a string. - new arithmetic formula features... * syntax: %-EX%formula; ... can be used wherever macros can be used. (See the help for syntax option.) - macro names can be used within formulas without %...% bracketing. - several instructions accept formulas without a preceeding %-EX%, including PLACE, IF, EXTRACT, LOOP, DELAY and MOUSE. - added relational operators. - changed instructions... * PLACE no longer accepts rollup and showtabs arguments. This functionality is now provided in PRAGMAs. - the STATE instruction can now specify a macro list. * when the DO AT time preceeds the current time it will fire at that time on the following day. - name and hints fields in MENU and BUTTON can now use macros. * removed QUOTECHAR instruction. * removed TRUNC instruction (see EXTRACT). * IF instruction performs arithmetic test (see above). - assorted fixes and changes... - PROC arguments were changed from %-argn% to %-arg n% - simplified Panel Options dialog. - fixed panel sizing with status bar and no buttons - fixed replace/skip issue in editor. - /x command line switch interprets extension-free files as .okx filenames. * diacritical characters work properly in GET instruction. - the MESSAGE, QUERY and GET dialog boxes stay on top of other dialogs. For more information, or to offer suggestions or interesting techniques or applications for OKScript write me at yweare@gte.net, or visit the website at http://home1.gte.net/yweare/index.htm Thank you for supporting the continuing development of OKScript. Michael Mardesich okb://mikezzz