AfterGrasp GLPRO replacement project start Feb 27th, 2002 ---------------------------------------------------------------------------- Tue, 18 December 2018 Removed 31 character limit on PRINTSTART command. Newer versions of windows do not have this limit. I recommend sticking with 31 characters for your print job title if you are using older windows versions. Limit is now 1023 characters. ---------------------------------------------------------------------------- Thu, 13 December 2018 New html text option to control whether
    produces a newline. In the past it has always done so. Now there is: SET TEXTHTMLBULLETENDNEWLINE OFF This prevents that newline from being added. It's a bit more complicated internally in that is has to make the
    normally done for each delayed until the next
  1. unless it's the last line in which case it's skipped. ---------------------------------------------------------------------------- Thu, 05 July 2018 STRHTMLCLEAN was removing nested ABC") Would display as "ABC" Fixed. ---------------------------------------------------------------------------- Tue, 23 January 2018 HTML color:inherit check was reversed, fixed. ---------------------------------------------------------------------------- Tue, 16 May 2017 Small changes to DEBUG dialog in preparation for call stack view, and resizing IMAGESIZECROPFIT no longer creates a extra copy if the destination image size is the same (nothing to crop). ---------------------------------------------------------------------------- Tue, 28 November 2016 New command IMAGEHISTOGRAM Collects list of all colors used in 1 or more images. List of colors is sorted by popularity VAR ARRAY = IMAGEHISTOGRAM(COLORCOUNT, IMAGE, [IMAGE2, IMAGE3, IMAGE4, ...]) COLORCOUNT is how many of the most popular colors to return. ARRAY[0] Most popular Color ARRAY{0} Color use count ARRAY[1] Second most popular Color ARRAY{1} Color use count ... and so on ---------------------------------------------------------------------------- Wed, 26 October 2016 AGF Font load was not restoring the vertical spacing or size of a space character, Fixed. ---------------------------------------------------------------------------- Wed, 24 August 2016 WINFINDBYCLASS and WINFINDBYTITLE when searching with EnumChildWindows now return an array of matching results, never a single value. RESULTARRAY = WINFINDBYCLASS(WINHANDLE, CLASSNAME) RESULTARRAY = WINFINDBYTITLE(WINHANDLE, TITLENAME) ---------------------------------------------------------------------------- Tue, 23 August 2016 WINFINDBYCLASS and WINFINDBYTITLE have new options. If they are provided two parameters they will use EnumChildWindows to search all child windows for a match by class or title. This is very useful for complex dialogs with nested elements. RESULTHANDLE = WINFINDBYCLASS(WINHANDLE, CLASSNAME) RESULTHANDLE = WINFINDBYTITLE(WINHANDLE, TITLENAME) ---------------------------------------------------------------------------- Mon, 15 August 2016 New commands WINSENDKEYS WINSETFOREGROUNDWINDOW WINSENDKEYS STRING WINSETFOREGROUNDWINDOW WINHANDLE The STRING passed to WINSENDKEYS supports several special characters defined with {KEYNAME}: {CLEAR} {RETURN} {ENTER} {ESCAPE} {ESC} {SPACE} {PRIOR} {NEXT} {END} {HOME} {LEFT} {UP} {RIGHT} {DOWN} {PRINT} {INSERT} {DELETE} {HELP} {F1} {F2} {F3} {F4} {F5} {F6} {F7} {F8} {F9} {F10} {F11} {F12} Example: drawclear white local han winfindbytitle("Save As") winsetforegroundwindow @han winsendkeys "abc.pdf{ENTER}" exitnow ---------------------------------------------------------------------------- Sun, 14 August 2016 Added two new commands: APPEXECNOWAIT works exactly like APPEXEC except it does not wait at all for a task to finish. WINPOSTMESSAGE works exactly like WINSENDMESSAGE except it uses the PostMessage API call which does not wait for a response (important with multi-threaded). WINPOSTMESSSAGE and WINSENDMESSAGE now support a large number of built in message names, each corrisponds to the WIN32 message with WM_ prefix. For example: WINSENDMESSAGE @TESTHAN KEYDOWN 13 0 ACTIVATE, ACTIVATEAPP, APP, ASKCBFORMATNAME, CANCELJOURNAL, CANCELMODE, CAPTURECHANGED, CHANGECBCHAIN, CHAR, CHILDACTIVATE, CLEAR, CLOSE, COMMAND, COMPACTING, COMPAREITEM, CONTEXTMENU, COPY, COPYDATA, CREATE, CTLCOLORBTN, CTLCOLORDLG, CTLCOLOREDIT, CTLCOLORLISTBOX, CTLCOLORMSGBOX, CTLCOLORSCROLLBAR, CUT, DDE_ACK, DDE_ADVISE, DDE_DATA, DDE_EXECUTE, DDE_FIRST, DDE_INITIATE, DDE_POKE, DDE_REQUEST, DDE_TERMINATE, DDE_UNADVISE, DEADCHAR, DELETEITEM, DESTROY, DESTROYCLIPBOARD, DEVMODECHANGE, DISPLAYCHANGE, DRAWCLIPBOARD, DRAWITEM, DROPFILES, ENABLE, ENDSESSION, ENTERIDLE, ENTERMENULOOP, ENTERSIZEMOVE, ERASEBKGND, EXITMENULOOP, EXITSIZEMOVE, FONTCHANGE, GETDLGCODE, GETFONT, GETHOTKEY, GETICON, GETMINMAXINFO, GETTEXT, GETTEXTLENGTH, HANDHELDFIRST, HANDHELDLAST, HELP, HOTKEY, HSCROLL, HSCROLLCLIPBOARD, ICONERASEBKGND, IME_CHAR, IME_COMPOSITION, IME_COMPOSITIONFULL, IME_CONTROL, IME_ENDCOMPOSITION, IME_KEYDOWN, IME_NOTIFY, IME_SELECT, IME_SETCONTEXT, IME_STARTCOMPOSITION, INITDIALOG, INITMENU, INITMENUPOPUP, INPUTLANGCHANGE, INPUTLANGCHANGEREQUEST, KEYDOWN, KEYFIRST, KEYUP, KILLFOCUS, LBUTTONDBLCLK, LBUTTONDOWN, LBUTTONUP, MBUTTONDBLCLK, MBUTTONDOWN, MBUTTONUP, MDIACTIVATE, MDICASCADE, MDICREATE, MDIDESTROY, MDIGETACTIVE, MDIICONARRANGE, MDIMAXIMIZE, MDINEXT, MDIRESTORE, MDISETMENU, MDITILE, MEASUREITEM, MENUCHAR, MENUSELECT, MOUSEACTIVATE, MOUSEFIRST, MOUSEHOVER, MOUSEMOVE, MOUSEWHEEL, MOVE, MOVING, NCACTIVATE, NCCALCSIZE, NCCREATE, NCDESTROY, NCHITTEST, NCLBUTTONDBLCLK, NCLBUTTONDOWN, NCLBUTTONUP, NCMBUTTONDOWN, NCMBUTTONUP, NCMOUSELEAVE, NCMOUSEMOVE, NCPAINT, NCRBUTTONDBLCLK, NCRBUTTONDOWN, NCRBUTTONUP, NEXTDLGCTL, NEXTMENU, NOTIFY, NOTIFYFORMAT, NULL, PAINT, PAINTCLIPBOARD, PAINTICON, PALETTEISCHANGING, PARENTNOTIFY, PASTE, PENWINFIRST, PENWINLAST, POWER, POWERBROADCAST, PRINT, QUERYDRAGICON, QUERYENDSESSION, QUERYNEWPALETTE, QUERYOPEN, QUEUESYNC, QUIT, RBUTTONDBLCLK, RBUTTONDOWN, RBUTTONUP, RENDERALLFORMATS, RENDERFORMAT, SETCURSOR, SETFOCUS, SETFONT, SETHOTKEY, SETICON, SETREDRAW, SETTEXT, SETTINGCHANGE, SHOWWINDOW, SIZE, SIZECLIPBOARD, SIZING, SPOOLERSTATUS, STYLECHANGED, STYLECHANGING, SYSCHAR, SYSCOLORCHANGE, SYSCOMMAND, SYSDEADCHAR, SYSKEYDOWN, SYSKEYUP, TCARD, TIMECHANGE, TIMER, USER, USERCHANGED, VKEYTOITEM, VSCROLL, VSCROLLCLIPBOARD, WINDOWPOSCHANGED, WINDOWPOSCHANGING, WININICHANGE ---------------------------------------------------------------------------- Fri, 08 July 2016 STRSPLITARRAY was storing values backwards in the array it produces. ARRAY is now slightly faster, uses a ArrayInsert call with known index instead of ArrayAdd which looks up last index on each item. ---------------------------------------------------------------------------- Tue, 01 March 2016 TEXTHTML handling of "A HREF" tag now recognizes "inherit" for the link color, as well as standard HTML colors: ---------------------------------------------------------------------------- Wed, 24 February 2016 Bug in TEXTREPLACEMENTS command, any replacement string that is shorter than the original would leave a piece of the original after the replacement. Fixed. ---------------------------------------------------------------------------- Fri, 08 January 2016 The @0 defined at startup to be the command line text was missing. Re-added back. ---------------------------------------------------------------------------- Mon, 23 November 2015 Three new global settings for overriding HTML bullet drawing SET TEXTHTMLBULLETTYPE SINGLECHAR SET TEXTHTMLBULLETCHAR STRING SET TEXTHTMLINDENTSIZE FLOATVALUE Bullettype is a single character, valid values are: " " forced unordered "1" numeric count "a" lower case letter count "A" upper case letter count "i" lower case roman numeral count "I" upper case roman numeral count IndentSize is a floating point value representing a fraction of an inch. So 0.5 would be one half an inch. Bulletchar is a string representing what is used for the bullet, or after the bullet count. For instance set texthtmlbullettype "I" set texthtmlbulletchar ")." set texthtmlindentsize (2./3.) Would give a list of: I). Frog II). Toad Indent level for
    • Hello
    is now the same as
  2. Hello
  3. First indent tab for bullet is now 0, so bullet is no longer centered inside indent, it's to the left hand side. Was like this: 1 Hello 2 There * Red * Blue 3 Ending Is now like this: 1 Hello 2 There * Red * Blue 3 Ending Also use of ,
      and
    tags no longer add extra blank lines. ---------------------------------------------------------------------------- Sun, 01 November 2015 HTML text now handles ampersand text codes in HEX, like ●
  4. tag support in HTML draw no longer does a leading
    unless there is text above it did not end with a
    ---------------------------------------------------------------------------- Sun, 01 November 2015 Using ->size or .length of a invalid array was giving the string length of the variable name. Fixed. This now displays 0 as expected: local z array() messagebox z[1]->size ---------------------------------------------------------------------------- Fri, 30 October 2015 Support for reading non-existant 0th element of an array removed. Previously you could do this (which looks crazy, but did serve a purpose in XML parsing) z[1] = 5 messagebox @z[0] ; shows 5 ---------------------------------------------------------------------------- Wed, 12 November 2014 Use of {} now means the same as [] or array(). ---------------------------------------------------------------------------- Fri, 17 October 2014 Strange syntax errors from AGCOMP caused by missing carriage returns at the end of lines fixed. It was designed to only compile source files where each line ended in a CRLF, but since Javascript often only has a LF at the end of a line, it was causing strange bugs in AGCOMP. The error message dialog from AGCOMP is now much more extensive, showing the last 32 lines of source, with open/close brace counts to figure out mismatched brace errors. ---------------------------------------------------------------------------- Fri, 26 September 2014 HOTSPOT now supports "ZINDEX" option, takes single value (depth in integer), ignores it. ---------------------------------------------------------------------------- Tue, 16 September 2014 Added more retries and checking to HTTP POST ---------------------------------------------------------------------------- Mon, 04 August 2014 Use of += and -= with spaces is now allowed, like: var a = 50; a += 10; Bug in use of += and -= with variables fixed, so for instance var a = 50; var b = 60; a += b; It now correctly adds b to a; ---------------------------------------------------------------------------- Tue, 15 July 2014 Use of [] alone is now accepted as the same as array(). Only works for creating empty arrays. ---------------------------------------------------------------------------- Tue, 08 July 2014 Long standing bug with global arrays where you could not easily add items to an array is fixed. Simple example: global a array() a[5] = 10 set variables on wait exit In the past, a new local array called a would be created. Now new items are added to the global array (as expected). ---------------------------------------------------------------------------- Tue, 01 July 2014 Problem with WHEN for Javascript/NOATVAR fixed, the name of the when needs to be in quotes, but the other options do not: when "test" always after 450 { messagebox("Hello"); } Added the -= and += operators, very useful for Javascript style FOR loops. for n from 1 to 10 step 2 for(n=1; n<=10; n+=2) ---------------------------------------------------------------------------- Tue, 17 Jun 2014 DELETE command added, a synonym for FREE. Big difference is in NOATVAR mode, the value passed is not treated as a variable: SCRIPTOPTIONS ATVAR local fred array(5,6) free fred SCRIPTOPTIONS NOATVAR var fred = array(5,6); delete fred; // same as free("fred"); ---------------------------------------------------------------------------- Tue, 10 Jun 2014 GOTO now works in when NOATVAR is enabled (previously it would try to treat the label as a variable). REMEMBER, JAVASCRIPT DOES NOT HAVE A GOTO COMMAND. This is a fix for AG scripts only. ---------------------------------------------------------------------------- Thu, 15 May 2014 AT ATREF and other variable commands now translate uppercase variables to lowercase before looking up. For instance this now works: JOHN = 5 b = "JOHN" messagebox @@b ---------------------------------------------------------------------------- Sun, 11 May 2014 Use of PARSEINT and PARSEFLOAT now accepted, they have the same syntax as INT and FLOAT. ---------------------------------------------------------------------------- Thu, 08 May 2014 AGCOMP could not handle comment lines that ended in a LF instead of CRLF. Also the line count was wrong for files that had LF instead of CRLF on some lines. Both problems fixed. ---------------------------------------------------------------------------- Fri, 02 May 2014 GLOBAL now converts the variable name into a valid variable name. ---------------------------------------------------------------------------- Wed, 23 Apr 2014 ARRAYLABEL command now converts first parameter (the label) into a valid variable name. This is to allow use like this: gosub ArrayLabel("AreaSelect",0); same as gosub ArrayLabel("areaselect",0); same as areaselect(0); Prior to this change, the label "AreaSelect" would be stored as mixed case and would never match a label since all labels are converted to lowercase upon compilation with AGCOMP. ---------------------------------------------------------------------------- Tue, 22 Apr 2014 Added these new commands, not indended to be called directly STRCHARAT0, STRCHARCODEAT0, STRINDEXOF0, STRLASTINDEXOF0, STRSLICE, STRSPLITARRAY, STRSUBSTR, and STRSUBSTRING. They are all to match Javascript string methods. Those ending in zero take zero based string offsets, while typical AG string functions all use 1 as the start of a string. These are generally to only be used in NOATMODE via method calls: STRCHARAT0(STRVAL, INDEX) STRVAL.charAt(INDEX) STRCHARCODEAT0(STRVAL, INDEX) STRVAL.charCodeAt(INDEX) STRINDEXOF0(STRVAL, SEARCHSTRING) STRVAL.indexOf(SEARCHSTRING) STRLASTINDEXOF0(STRVAL, SEARCHSTRING) STRVAL.lastIndexOf(SEARCHSTRING) STRSLICE(STRVAL, STARTINDEX, LEN) STRVAL.slice( STARTINDEX, LEN) STRSPLITARRAY(STRVAL, SPLITVALUE) STRVAL.split(SPLITVALUE) STRSUBSTR(STRVAL, STARTINDEX, ENDINDEX) STRVAL.substr(STARTINDEX, ENDINDEX) STRSUBSTRING(STRVAL, STARTINDEX, ENDINDEX) STRVAL.substring(STARTINDEX, ENDINDEX) ---------------------------------------------------------------------------- Sat, 19 Apr 2014 When in NOATMODE, the following Javascript style methods are supported: Methods with '*' are not implimented yet. array.length string.length * string.charAt(...) * string.charCodeAt(...) string.concat(...) string.fromCharCode(...) string.indexOf(...) string.lastIndexOf(...) string.localeCompare(...) string.match(...) string.replace(...) string.search(...) * string.slice(...) string.split(...) string.substr(...) * string.substring(...) string.toLocaleLowerCase(...) string.toLocaleUpperCase(...) string.toLowerCase(...) string.toString(...) string.toUpperCase(...) string.trim(...) string.valueOf(...) Math.abs(x) Math.acos(x) Math.asin(x) Math.atan(x) Math.atan2(y,x) Math.ceil(x) Math.cos(x) Math.exp(x) Math.floor(x) Math.log(x) Math.max(x,y,z,...,n) Math.min(x,y,z,...,n) Math.pow(x,y) Math.random() Math.round(x) Math.sin(x) Math.sqrt(x) Math.tan(x) Use of any method not directly support will call a function with the prefix "method_" with the first parameter being the object that invokes the method. For examples: var j = "hello"; var a = j.test(50); messagebox(a); // displays "hello 50" function method_test(s,v) { return s+" "+v; } ---------------------------------------------------------------------------- Wed, 16 Apr 2014 Use of .length instead of ->size is now supported in NOATVAR SCRIPTOPTIONS NOATVAR var a = array(5,6); var b = a.length; messagebox(b); ->size now provides the length of a string if used on a non-array non-memorybuffer item. Useful with .length to get length of a string using same method as Javascript. ---------------------------------------------------------------------------- Wed, 02 Apr 2014 Several problems with support of JS extension files in AGCOMP fixed. It now correctly turns on NOATMODE. Some problems with FOR ( VAR IN ARRAY ) fixed. ---------------------------------------------------------------------------- Fri, 28 Mar 2014 Bug in new C style FOR loops, the COMPARE was being reversed. Fixed. ---------------------------------------------------------------------------- Thu, 27 Mar 2014 Two new types of FOR loops supported, generally only used when the NOATVAR scriptoption is set. FOR ( BEFOREEXPRESSION ; COMPARE ; AFTEREXPRESSION ) Same syntax as C, C++ and Javascript for loop: for ( x=1; x<10; ++x ) { textln(x); } FOR ( VARNAME IN ARRAYNAME ) Works very much like INARRAYINDEX loop, designed to be a copy of the Javascript FOR IN loop. Example listed with notes on use of arrayname. When using NOATVAR scriptoption, use of array variable names is the same as &ARRAYNAME instead of @ARRAYNAME. For example: drawclear white SCRIPTOPTIONS NOATVAR var test = new array(5,6,7); testfunc(test); function testfunc(a) { messagebox(a->size); for(n in a) { messagebox(a[n]); } } SCRIPTOPTIONS ATVAR Slow memory leak whenever using @ARRAYNAME fixed. The arrayname was not being released. ---------------------------------------------------------------------------- Mon, 17 Mar 2014 When SCRIPTOPTIONS NOATVAR is enabled, use of '+' calls a new ADDCAT function. ADDCAT looks at each pair of parameters, and if either is a string then it does a string concatination instead of addition. So for example this provides "51" not 6. result = "5"+1 There may be some quirks with numeric string constants because AGCOMP defaults to simplifying numeric strings if they can be expressed as a integer or float. ---------------------------------------------------------------------------- Thu, 13 Mar 2014 New setable system variable TEXTHTMLLINKUNDERLINE defaults to OFF. It controls whether
    links are underlined in TEXTHTML. Since it defaults to OFF, this means that links will no longer be underlined by default. DRAWSEGMENTSMERGE was not merging segments where the second coordinate was equal to the first coordinate, like 0,17 and 17,36 should be merged to 0,36, but this was not working. Fixed. ---------------------------------------------------------------------------- Thu, 06 Mar 2014 DRAWOVERLAP and DRAWOVERLAPS now return a count of overlaps instead of 0 or 1. DRAWOVERLAP and DRAWOVERLAPS will now accept arrays of box coordinates as well as coordinates, for example: local olist array(0,0,40,30, 50,60,100,100) messagebox drawoverlap(30,30,80,80,&olist) ; displays 2 The same could be done by expanding an array with @ like this: messagebox drawoverlap(30,30,80,80,@olist) But passing the array directly is much faster, particularly with large lists of box coordinates. ---------------------------------------------------------------------------- Mon, 03 Mar 2014 Bug in use of strings defined with single quotes that had a semicolon in them is fixed. ---------------------------------------------------------------------------- Wed, 26 Feb 2014 New String search command which returns the count of matches instead of a match location. STRSEARCHCOUNT local a "100001" messagebox strsearchcount(@a, "1") ; gives 2 messagebox strsearchcount(@a, "1", 1, 6) ; gives 1 All string search functions now have an optional fourth parameter which is the last character which end the search. List of affected commands STRAFTER STRAFTERINCLUDE STRAFTERINCLUDEREVERSE STRAFTERREVERSE STRBEFORE STRBEFOREINCLUDE STRBEFOREINCLUDEREVERSE STRBEFOREREVERSE STRSEARCH STRSEARCHCOUNT STRSEARCHREVERSE For instance: local a "abcdefghij" messagebox strsearch(@a, "d", 1, 4) ; gives 0 messagebox strsearch(@a, "d", 4, 5) ; gives 4 messagebox strsearch(@a, "d", 1, 5) ; gives 4 ---------------------------------------------------------------------------- Tue, 25 Feb 2014 Use of single quotes to define strings is now supported (only worked partially before). These are the same: messagebox "\"Hello\"" messagebox '"Hello"' ---------------------------------------------------------------------------- Thu, 20 Feb 2014 Bug in lines of html text using mixed font sizes, was not using the full line height. Was using the vertical font gap from the last font active in the line instead of the largest. FONTLINEHEIGHTCALC has new trailing option that is a table of fixed font heights. Each is a pair of font y size, and line height like this: FONTLINEHEIGHTCALC ON FONTMULTNUM FONTADDNUM VGAPMULTNUM YSIZE,HEIGHT YSIZE,HEIGHT .... Work example that simulates maximum range for Verdana font in most browsers: heighttable = array(5,9,6,10,7,11,8,13,9,14,10,15,11,16,12,17,13,18,14,19,15,21,16,22,17,23,18,25,19,25,20,28,21,28,22,29,23,30,24,32,25,32,26,33,27,35,28,36,29,37,30,40,31,40,32,42,33,42,34,44,35,44,36,46) fontlineheightcalc on 1.25 1.5 0 @heighttable used to use the same rules as , so that 1=8pt 2=10pt 3=12pt 4=14pt and so on. Now it using 1 with STYLE=FONT-SIZE will be the same as 1px, 2 will be same as 2px and so on. Hello" messagebox textheight(@zz) This used to display 19, now it displays 40 ---------------------------------------------------------------------------- Wed, 19 Feb 2014 VARVALUE no longer returns "" for an array or array reference, instead it returns the array or array ref. VARREFERENCE now returns a NULL Token instead of 0 for a undefined variable. ---------------------------------------------------------------------------- Wed, 12 Feb 2014 SCROLLBOX and HOTSPOT cursors are now handled with a complex linked list with instance counts for each cursor use. This allows multiple cursor changes at the same time without confusion. ---------------------------------------------------------------------------- Tue, 04 Feb 2014 New Call stack information in DEBUG dialog, not fully working yet. New command ARRAYRANGE, takes a array, array name or array reference and one or more start/count pairs. This example creates a list of 1000 rectangles, and shows which do not overlap any of the others. The loop version took 47 seconds, the arrayrange version took 11 seconds. windowsize 1200 800 drawclear white local rectlist array() color red for n from 0 count 1000 local xpos random(@drawwidth) local ypos random(@drawheight) rectlist[@n] = array(@xpos,@ypos,@xpos+random(32),@ypos+random(32)) drawbox @rectlist[@n] next messagebox strlist(arrayrange(rectlist,0,2)) ; shows rectlist[0] and rectlist[1] messagebox strlist(at(arrayrange(rectlist,0,2))) ; shows values of rectlist[0] and rectlist[1] timerset slow color blue local count 0 for n from 0 count rectlist->size local fail 0 for b from 0 count rectlist->size if @b==@n continue if !drawoverlap(@rectlist[@n],@rectlist[@b]) continue fail = 1 break next if !@fail drawrect @rectlist[@n] inc count endif next messagebox "SLOW Rectangles with no overlap:"$@count$" "$(@slow/1000.)$" Seconds" timerset fast color green local count 0 for n from 0 count rectlist->size if !drawoverlap(@rectlist[@n],at(arrayrange(rectlist,0,@n,@n+1,rectlist->size-(@n+1)))) drawrect @rectlist[@n] inc count endif next messagebox "FAST Rectangles with no overlap:"$@count$" "$(@fast/1000.)$" Seconds" wait exitnow ---------------------------------------------------------------------------- Thu, 30 Jan 2014 Bug in size of a space character in FONTCHARWIDTHCALC, and size of vertical gap in FONTLINEHEIGHTCALC. With non WINFONTs the calculation was done being done twice (most of the time). This was particularly problematic for printing because spacing would not match the screen for the same font at the same DPI. ---------------------------------------------------------------------------- Wed, 29 Jan 2014 New system variable which can enable special code for font spacing when printing. Normally font spacing tables are calculated from a font handle selected into a printer's HDC. But because printer fonts are sometimes different than screen fonts spacing can be slightly different from screen text. To avoid this, you can use SET TEXTNOPRINTFONT ON. This will force text calculations and drawing to be done using a screen spacing, not printer spacing. SET TEXTNOPRINTFONT ON/OFF ---------------------------------------------------------------------------- Mon, 27 Jan 2014 Two new commands WINFONTLOAD and WINFONTFREE. WINFONTLOAD is used to load true type fonts into the system for private use (just our app). They are free'd upon exit. The variable created is GLOBAL. WINFONTLOAD FILENAME WINFONTLOAD FILENAME VARNAME WINFONTFREE is to free a font before the app exits. ---------------------------------------------------------------------------- Mon, 06 Jan 2014 When SCRIPTOPTIONS NOATVAR is enabled, or compiling a Javascript source file (file extension ".js"), AGCOMP now compiles FALSE as 0, and TRUE as 1. It does not call the system functions VAR_FALSE() and VAR_TRUE(). Serious bug in use of named array elements with NOATVAR enabled fixed, expressions like a[1].b now work. VARREFERENCE now works with NOATVAR like &a[1].b Use of system variables now compiled correctly. Was calling AT(VARNAME) function which is slower, now correctly calls VAR_VARNAME(). ---------------------------------------------------------------------------- Sun, 05 Jan 2014 AGCOMP now automatically turns on SCRIPTOPTIONS NOATVAR when compiling a source file with the .JS file extension making it simpler to include javascript code. This includes use of SCRIPTMERGE. Use of the OBJECT() as a function is now supported, is exactly the same as ARRAY(). Use of "new " as a prefix on function calls is now ignored, so you can now write (with NOVATVAR): var test = new Object(); test.red = "red"; test.blue = "blue; This is exactly the same as (with ATVAR): local test array() test[red] = red test[blue] = blue The IF, WHILE and FOR commands now allow parenthesis right after the command name like: while(@fred<10) if(@david) ---------------------------------------------------------------------------- Thu, 19 Dec 2013 Open brace at the end of a function declaration is now allowed: function fred(a,b) { messagebox @a @b } nested function declarations are now allowed inside a WITH. This does not mean WITH changes will be true inside the function. For example: with fred 27 messagebox @fred function test(a) { messagebox @fred @a } endwith fred = 1 test("hello") this will display 27, and then 1 ---------------------------------------------------------------------------- Mon, 16 Dec 2013 ActiveX install now sets allowable domains to "*" in registry via these settings: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{19640616-034A-6F68-6E42-726964676573}] [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{19640616-034A-6F68-6E42-726964676573}\iexplore] "Type"=dword:00000001 "Flags"=dword:00000000 "Count"=dword:000007ce "Time"=hex:dd,07,0c,00,01,00,10,00,0f,00,25,00,1a,00,d4,03 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{19640616-034A-6F68-6E42-726964676573}\iexplore\AllowedDomains] [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{19640616-034A-6F68-6E42-726964676573}\iexplore\AllowedDomains\*] ---------------------------------------------------------------------------- Tue, 10 Dec 2013 Problem with STREVAL() on strings that have dots in them (because of new dot operator) fixed. The dot operator is disabled in STREVAL. ---------------------------------------------------------------------------- Mon, 09 Dec 2013 Use of arrays with NOATVAR enabled is fixed, previously it did something like (@arrayname)[indexval] This now works: set j[3] "hello" messagebox j[3] When NOATVAR is enabled, the dot character '.' is now an operator. The DOT operator is just like an array index except it does not need quotes so these two statements are the same: j["fred"] = 1 j.fred = 1 Added increment and decrement, both pre and post operators working just like C/C++/Javascript. Here is a working example done in Javascript style: // scriptoptions NOATVAR var fred=0; var barn=4; while (++fred<5) { textln(fred); textln(barn--); textln(); } messagebox(barn); ---------------------------------------------------------------------------- Sun, 08 Dec 2013 Scripts without use of @ for variables is now working via the NOATVAR scriptoptions: SCRIPTOPTIONS ATVAR ; default SCRIPTOPTIONS NOATVAR Known problems fixed include use of INC and DEC, which no longer need the variable name in quotes. For example: scriptoptions noatvar var b = "hello" var hello = 1 inc b inc "hello" messagebox hello ; displays 2 inc hello messagebox hello ; displays 3 scriptoptions atvar ---------------------------------------------------------------------------- Fri, 06 Dec 2013 AGCOMP now handles open braces on same line as all commands that start a block, including else. WITH now supports braces for blocks. with color red { text hello } AGCOMP now handles an else on the same line as a close brace like this: if (1) { messagebox always } else { messagebox never } ---------------------------------------------------------------------------- Sun, 24 Nov 2013 DRAWLISTINSIDE total rewrite to never return 0, instead it simulates out of side positions similar to the way a section cursor works. Includes all new code for end of line position, below line postion, above line position and so on. ---------------------------------------------------------------------------- Thu, 21 Nov 2013 Javascript style function declarations, you can now define a function or subroutine using the function command with braces defining the start and end. If you have no return value you can leave out the return statement and the closing brace will generate a simple return command. You can stick these functions inside other code, and they will be skipped around, so no more having to stick functions after the main code. Example: function funday(a) { return @a$" Ending"; } function john(a,b) { messagebox(@a, funday(@b)); } john("Hello", "There"); // Javascript style call john test text Same as: goto skip_funday funday: declare a return @a$" Ending" skip_funday: goto skip_john john: declare a b messagebox @a funday(@b) return skip_john: john("Hello", "There"); // Javascript style call john test text ---------------------------------------------------------------------------- Wed, 20 Nov 2013 Assignments are now allowed with LOCAL, GLOBAL and SET, the assignment is still optional: local j 50 local j=50 global fred @j$".jpg" global fred=@j$".jpg" New VAR command, works exactly the same as LOCAL. Used for code compatibility with Javascript. Combined with an extra semi-colon (which in AfterGRASP just means a comment follows), it can be written exactly the same as Javascript: var j=50; Use of braces for loops and IFs is now allowed. No special scriptoptions required, it is handled as part of normal syntax. For example: local finish 0 while !@finish for fred from 1 to 30 if (@fred==2) messagebox "Hello" finish = 1 endif next endwhile local finish 0 while !@finish { for fred from 1 to 30 { if (@fred==2) { messagebox "Hello" finish = 1 } } } local finish 0 while !@finish { for fred from 1 to 30 { if (@fred==2) { messagebox "Hello" finish = 1 } } } ---------------------------------------------------------------------------- Wed, 06 Nov 2013 SCRIPTREPLACE now working any line leading with a // has the // ignored, this allows AG specific lines to be comments in script code compiled as both javascript and AG script. // scriptreplace ---------------------------------------------------------------------------- Tue, 05 Nov 2013 Comparison was reversed in _IDLEIFLESS so if a event took too long, it would never exit a FOREVER 1 (for example). Fixed. DEBUG code disassembly strings added for _IDLEIFLESS and a few other missing base commands (ones encoded as part of a constant). ---------------------------------------------------------------------------- Mon, 04 Nov 2013 New internal compiler generated command _IDLEIFLESS takes a value, variable name, and label. Does not take stack tail, so MUST have all 3 parameters which are removed from stack upon return. Is generated by FOREVER COUNT and WAIT COUNT commands by compiler. For example WAIT 33 generates this low level code: (_ftimer1 timerinit) (0 var_mousekey) _wait1 _label (var_mousekey) _waitquit1 _if 330 _ftimer1 _wait1 _idleifless _waitquit1 _label (_ftimer1 free) FOREVER 2 generated this low level code: (_ftimer1 timerinit) _forever1 _label 20 _ftimer1 _forever1 _idleifless (_ftimer1 free) The purpose of these changes is when a FOREVER/WAIT is active, and a WHEN event does multiple POPs that wipe out the timing variables, it can no longer produce a variable undefined error. ---------------------------------------------------------------------------- Thu, 31 Oct 2013 *** EARLY ALPHA - NOT WORKING *** New compile time commands under development, SCRIPTREPLACE and SCRIPTIONS: SCRIPTREPLACE SEARCH REPLACE Like the #DEFINE feature in C/C++, except the search is a regular expression. Same syntax as the strregexreplace. Parameters can be in quotes, or not. SCRIPTOPTIONS OPTION1 OPTION2 OPTION3 Option currently supported are BRACES, NOBRACES, ATVAR, and NOATVAR BRACES allows use of curly braces instead of ENDIF/NEXT/ENDWHILE/ENDLOOP terminators. NOBRACES: if (@fred==charles) messagebox ok endif BRACES: if (@fred==@charles) { messagebox ok } or if (@fred==charles) { messagebox ok } ATVAR: if (@fred==charles) messagebox ok endif NOATVAR: if (fred=="charles") messagebox("ok") endif ---------------------------------------------------------------------------- Thu, 03 Oct 2013 New function CLIPBOARDGETLIST() gives the list of filenames from CF_HDROP. Returns multiple items, so you need to use something like ARRAY or STRLIST to capture the results. Example: for fn inarray array(clipboardgetlist()) messagebox @fn next ---------------------------------------------------------------------------- Mon, 16 Sep 2013 DRAWLISTSCALE was rounding the size of rect down, fixed. Now rounds position down, but size up. All TEXT RECTS commands which get a list of the size and location of each character now give full width rectangles for space characters, and include the extra space provided by FONTCHARWIDTHCALC. New command LISTREVERSE, reverses a list of items: ; displays dcba messagebox strcat(listreverse(a,b,c,d)) ---------------------------------------------------------------------------- Mon, 09 Sep 2013 FILEGET internal code rewritten to try to allocate the entire file size in a single allocate call and file read to eliminate performance problems reading very large files. ---------------------------------------------------------------------------- Wed, 04 Sep 2013 SUB and SUP are removed from suffixes generated for fontoverride_ since subscript and superscript fonts are just reduced versions of regular fonts. ---------------------------------------------------------------------------- Tue, 03 Sep 2013 Use of scalefont for html text now supported with special fontoverride variables. Before a font is created, a search is done for a variable with the prefix "fontoverride_" followed by the font face name. If found, then it contains the variable name of the font. For example: drawclear white local face "Avant Garde" local varface strvarname(@face) set texthtml on fontstyle init render fontdefine "fontoverride_"$@varface @face 72pt fontstyle init render bold fontdefine "fontoverrideb_"$@varface @face 72pt text "Hi Hello there" waitkey For font attributes, then a suffix is created on the fontoverride name fontoverrideb_courier would be used for bold courier fontoverridebi_courier would be used for bold italic courier suffixes are: b for bold i for italic u for underline s for strikeout sub for subscript sup for superscript ---------------------------------------------------------------------------- Tue, 27 Aug 2013 FILEGETARRAY and FILEGETARRAYNAMED now support comment lines, they must begin with a ';' character. ---------------------------------------------------------------------------- Thu, 22 Aug 2013 Font variable names now match STRVARNAME, previously they only had spaces removed, now they are completely cleaned up so only letters, numbers and underlines are allowed into the font variable name. ---------------------------------------------------------------------------- Thu, 15 Aug 2013 Remaining password and decryption code removed from UNRAR support. ---------------------------------------------------------------------------- Wed, 14 Aug 2013 FILEUNZIP, FILEUNZIPAS and FILEUNZIPLIST now support RAR files. There is no RAR compress option, only uncompress. Extraction is not multi-threaded, and does not support extracting hard or soft links. For now, the UNRAR features do not support AG specific file features such as MEM: or HTTP: files because the UNRAR code makes direct calls to windows for file access. ---------------------------------------------------------------------------- Thu, 08 Aug 2013 FILEPUTARRAY and FILEPUTARRAYNAMED were converting array contents to all strings. Fixed so the data is now untouched. DRAWSEGMENTSSORT & DRAWSEGMENTSMERGE Two new commands added for dealing with arrays of line segments. Usually X axis only, or Y axis only, with an optional overlap check field. local test array(array(102,108),array(5,75),array(112,150),array(5,75),array(80,109)) drawsegmentssort test ;gives: ;array(array(5,75),array(80,109),array(102,108),array(112,150)) drawsegmentsmerge test ;gives: ;array(aray(5,75),array(80,109),array(112,150)) Script code which does exactly what these new commands do (although far far slower). DRAWSEGMENTSSORT: declare s redo1: if s->size>1 for a from 0 to s->size-2 for b from @a+1 to s->size-1 if @s[@a][0]>@s[@b][0] local tmp &s[@b] s[@b] = &s[@a] s[@a] = &tmp else if @s[@a][0]==@s[@b][0]&&@s[@a][1]==@s[@b][1] s[@a][2] = @s[@a][2]||@s[@b][2] arraydelete s @b goto redo1 endif endif next next endif return DRAWSEGMENTSMERGE: declare s redo2: if s->size>1 for a from 0 to s->size-2 for b from @a+1 to s->size-1 if @s[@a][2]||@s[@b][2] continue if @s[@a][1]>@s[@b][0] if @s[@a][1]<@s[@b][1] s[@a][1] = @s[@b][1] endif arraydelete s @b goto redo2 endif next next endif return ---------------------------------------------------------------------------- Mon, 05 Aug 2013 Several general performance boosts to AG Interpreter, particular with constant numerical values and strings, and simple function calls. ---------------------------------------------------------------------------- Fri, 02 Aug 2013 Occasional crash bug in DEBUGPROFILE fixed. ---------------------------------------------------------------------------- Wed, 31 Jul 2013 Fixed a leak in all cursor commands, was particularly bad with hotspots since a GDI handle got used up each time you rolled over a hotspot. Backup old versions of PNG JPEG XML TIFF libs and EXAMPLE.CAB project removed from main development tree. ---------------------------------------------------------------------------- Fri, 26 Jul 2013 FONTCHARWIDTHCALC Now has 2 more options, they are for monospaced fonts such as COURIER. FONTCHARWIDTHCALC OFF FONTCHARWIDTHCALC ON FONTCHARWIDTHCALC ON FONTXSIZEMULTIPLY FONTCHARWIDTHCALC ON FONTXSIZEMULTIPLY FONTXSIZEADD FONTCHARWIDTHCALC ON FONTXSIZEMULTIPLY FONTXSIZEADD FONTXSPACEMULTIPLY FONTCHARWIDTHCALC ON FONTXSIZEMULTIPLY FONTXSIZEADD FONTXSPACEMULTIPLY FONTXSPACEADD FONTCHARWIDTHCALC ON FONTXSIZEMULTIPLY FONTXSIZEADD FONTXSPACEMULTIPLY FONTXSPACEADD FONTXSIZEMONOMULTIPLY FONTXSIZEMONOADD If no values are given, then the default values are: FONTXSIZEMULTIPLY = 1.00 FONTXSIZEADD = 0 FONTXSPACEMULTIPLY = 1.20 FONTXSPACEADD = 0.5 FONTXSIZEMONOMULTIPLY = 1.1 FONTXSIZEMONOADD = 0.5 ---------------------------------------------------------------------------- Tue, 23 Jul 2013 New command to scale a DRAWLIST DRAWLISTSCALE &DRAWLIST NEWWIDTH NEWHEIGHT Useful for cases where you want to calculate text positions at a higher or lower resolution than you are displaying. Results are identical to this script code: for i from 0 count DRAWLIST->size step 4 set DRAWLIST[@i] int((@DRAWLIST[@i]*@NEWWIDTH)/@OLDWIDTH+.5) set DRAWLIST[@i+1] int((@DRAWLIST[@i+1]*@NEWHEIGHT)/@OLDHEIGHT+.5) set DRAWLIST[@i+2] int(((@DRAWLIST[@i+2]+1)*@NEWWIDTH)/@OLDWIDTH-.5) set DRAWLIST[@i+3] int(((@DRAWLIST[@i+3]+1)*@NEWHEIGHT)/@OLDHEIGHT-.5) next ---------------------------------------------------------------------------- Mon, 22 Jul 2013 HTML font sizes given in measurements are now rounded, not truncated. So a 14pt font at 71dpi is now 16 pixels instead of 15 pixels. ---------------------------------------------------------------------------- Tue, 10 Jul 2013 Unusual crash bug in conversion of BSTR variant to STR, sometimes the size returned from SysStringLen would be less then the size stored in the BSTR head. Changed to use the size stored in the BSTR head to prevent this problem. ---------------------------------------------------------------------------- Thu, 27 Jun 2013 HOTSPOT now has a CURSOR and CURSORCUSTOM option which lets you specify a different rollover cursor for each hotspot. HOTSPOT has a new PRIORITY option, makes all whens created as part of a hotspot be high priority (much like WHEN PRIORITY option). ---------------------------------------------------------------------------- Tue, 25 Jun 2013 Font character drawing is now clipped to DRAWOFFSET just like IMAGEPUT and other image drawing commands. This involved a complete rewrite of font clipping to use common code with image clipping so there may be some glitches. Example: drawCLEAR white set texthtml on text "" drawoffset 100 100 400 400 drawregion -50 -50 200sizex 200sizey text "Microsoft will use its annual developers conference to release a preview of Windows 8.1, a free update that promises to address some of the gripes people have with the latest version of the company's flagship operating system." wait New WHEN option, PRIORITY. When used in a WHEN definition, it will give that WHEN a priority over any other WHEN that did not have a PRIORITY option. Not only will the PRIORITY when be responded to first, any non-priority whens that trigger for the same action (like a mouse click) will be ignored. ---------------------------------------------------------------------------- Mon, 10 Jun 2013 Fixed Crash bug in AGCOMP when a trailing parentheses is missing, now gives a error message for the line with the likely missing parentheses. ---------------------------------------------------------------------------- Tue, 04 Jun 2013 Corrected resources for two line input box for ActiveX DLL version of runtime. ---------------------------------------------------------------------------- Mon, 03 Jun 2013 INPUTBOX now supports a two field input box. The added optional values are VARIABLE2 and PROMPT2 RESULT = INPUTBOX(VARIABLE) RESULT = INPUTBOX(VARIABLE,PROMPT) RESULT = INPUTBOX(VARIABLE,PROMPT,TITLE) RESULT = INPUTBOX(VARIABLE,PROMPT,TITLE,VARIABLE2) RESULT = INPUTBOX(VARIABLE,PROMPT,TITLE,VARIABLE2,PROMPT2) INPUTBOX VARIABLE INPUTBOX VARIABLE,PROMPT INPUTBOX VARIABLE,PROMPT,TITLE INPUTBOX VARIABLE,PROMPT,TITLE,VARIABLE2 INPUTBOX VARIABLE,PROMPT,TITLE,VARIABLE2,PROMPT2 Eight new simple string functions that simplify common search/parse operations. They all have the exact same syntax as STRSEARCH and STRSEARCHREVERSE, but insteading returning a string index position, they return a string result. For failure, all these new stringfuntions return a NULL string. STRAFTER STRBEFORE STRAFTERINCLUDE STRBEFOREINCLUDE STRAFTERREVERSE STRBEFOREREVERSE STRAFTERINCLUDEREVERSE STRBEFOREINCLUDEREVERSE Examples: local test "The123Hello123Goodbye" local search "123" ; gives "Hello123Goodbye" messagebox strafter(@test,@search) strafter ; gives "The" messagebox strbefore(@test,@search) strbefore ; gives "123Hello123Goodbye" messagebox strafterinclude(@test,@search) strafterinclude ; gives "The123" messagebox strbeforeinclude(@test,@search) strbeforeinclude ; gives "Goodbye" messagebox strafterreverse(@test,@search) strafterreverse ; gives "The123Hello" messagebox strbeforereverse(@test,@search) strbeforereverse ; gives "123Goodbye" messagebox strafterincludereverse(@test,@search) strafterincludereverse ; gives "The123Hello123" messagebox strbeforeincludereverse(@test,@search) strbeforeincludereverse ---------------------------------------------------------------------------- Fri, 10 May 2013 Very old bug in error message code which would crash if a variable name was larger than 2020 bytes long is fixed. Would show up mostly if you stuck an extra '@' in trying to use a big string as a variable name. Instead of the undefined variable error you would get a crash. ---------------------------------------------------------------------------- Wed, 08 May 2013 Bug in postscript injection not working on second and onward page of a print job is fixed. This affected HTML links as well as more complex image or code injection. The problem seemed related to an issue with more recent windows versions not returning true for POSTSCRIPT_IDENTIFY if done after the first page. I've put in a cache so that once it is identified as a Postscript printer's HDC, it will remember. ---------------------------------------------------------------------------- Wed, 01 May 2013 MOUSEGET now reads mouse button information directly instead of depending on events in the window handling thread. The means the results will now be realtime, and correctly updated even if our window is not processing messages. The bad side effect is that MOUSEGET can now be out of sync with event driven commands like WHEN or HOTSPOT. This is to eliminate issues with loops waiting for a mouse button to release that never respond when the mouse is released outside the window or other unusual circumstances. ---------------------------------------------------------------------------- Fri, 26 April 2013 STRREPLACE now has a huge performance boost when used with a large number of search/replace strings. Previously the entire list was search for each character position, now a list indexed by first letter is searched. Speedups of 10x or more are typical for very large lists. ---------------------------------------------------------------------------- Thu, 04 April 2013 Removal of all BHO (Browser Helper Object) code from IE AfterGRASP runtime is complete. It will no longer automatically load a signed GL, it must be started via a new ActiveX method "RunScript" which takes a URL of the GL file to load. As a side note, be sure to revert TabProcGrowth to the default value or else on x64 Windows systems the 32bit addons will never load! HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth Default value for IE9 and IE10 is "Medium" Here is a ActiveX example, it runs "example.gl", and polls once per second for script completion, transfering control to a new page provided by the EndScript property. The EndScript property is undefined until the script is running, then it's an empty string until set by the WEBNAVIGATE command. ActiveX Test
    Loading
    ---------------------------------------------------------------------------- Thu, 07 March 2013 In addition to suffix ".invalid", the suffix ".invalid.html" is now stripped from a GL filename/URL when opened since there were so many problems with html content in a file with the extension of ".invalid". Added new method to ActiveX IEAfterGRASP object. RunScript(PATHTOGL) var BHOobj=null; BHOobj=new ActiveXObject("IEAfterGRASP.Object"); var result = BHOobj.RunScript(window.location.href); var version = BHOobj.Version; BHobj = null; Still undergoing testing. ---------------------------------------------------------------------------- Fri, 01 March 2013 All the shift/ctrl/alt key variables are now updated for every event, not just keypresses. This allows doing things like shift-click. Affected are: @KEYDOWNSHIFT @KEYDOWNCTRL @KEYDOWNALT @KEYUPSHIFT @KEYUPCTRL @KEYUPALT ---------------------------------------------------------------------------- Mon, 25 February 2013 Another change to how
  5. bullets are rendered, it's changed back to using  BULLET TEXT for the first bullet, no forced tabs. The position of TEXT is now kept so that wrapped text will line up. Also, the wingdings small circle is no longer used, instead l in whatever font is active is used. ---------------------------------------------------------------------------- Thu, 21 February 2013 Word wrap after a
  6. now wraps to the start of previous lines text, not before the bullet point. ---------------------------------------------------------------------------- Wed, 06 February 2013 Error check for ->IMAGEFILETYPE added. SET of ->IMAGEFILEALPHA fixed (was reversed). ---------------------------------------------------------------------------- Tue, 05 February 2013 Two new elements for images ->IMAGEFILEALPHA and ->IMAGEFILETYPE IMAGEFILEALPHA is true when the image file the image was loaded from had an alpha channel. This is only supported for PNG for now. IMAGEFILETYPE is exactly like FILEGETTYPE, it's set for any image loaded. So for instance if you load dummy.image and the actual contents are a jpeg, then ->imagefiletype would be "jpeg". ---------------------------------------------------------------------------- Fri, 18 January 2013 New element for images "->IMAGEDATA", gives the entire image bitmap data as a string. Useful for things like creating a checksum to compare images. color red imagenew 100 100 testred color green imagenew 100 100 testgreen messagebox strhex(strsha2(testred->imagedata)) red messagebox strhex(strsha2(testgreen->imagedata)) green ---------------------------------------------------------------------------- Thu, 03 January 2013 STRHTMLREPAIR now removes any inner tags inside nested tags. For instance: local test "onetwo" messagebox strhtmlclean(@test) produces "onetwo" ---------------------------------------------------------------------------- Tue, 18 December 2012 STRHTMLCLEAN now removes a pair, and anything betweeen them if there is no text content between them. Also when any non content set of tags (like or ) has only non-content tags inside it, it's all thrown away. For instance: local test "
    one" messagebox strhtmlclean(@test) produces "one" ---------------------------------------------------------------------------- Fri, 14 December 2012 AG BHO Runtime is now hardlinked to WINSOCK32.DLL WININET.DLL and SENSAPI.DLL. Previously they were softloaded after startup as needed. ---------------------------------------------------------------------------- Mon, 10 December 2012 Font foreground and background colors were reversed when drawing to a non-32bit color image buffer. Hex numbers with a leading "#" instead of "0x" are now recognized in many more places in a general way. IMAGEPIECE now supports grabbing a section of the LAYER frame buffer as well it's original feature of grabbing a section of another image. IMAGEPIECE NEWIMAGE IMAGEPIECE NEWIMAGE STARTX STARTY IMAGEPIECE NEWIMAGE STARTX STARTY XSIZE YSIZE IMAGEPIECE NEWIMAGE STARTX STARTY XSIZE YSIZE VIRTXSIZE VIRTYSIZE ---------------------------------------------------------------------------- Wed, 05 December 2012 In a further attempt to match the font spacing in most browsers there is a new command to enable an approximation of font character width. Defaults to OFF FONTCHARWIDTHCALC OFF FONTCHARWIDTHCALC ON FONTCHARWIDTHCALC ON FONTXSIZEMULTIPLY FONTCHARWIDTHCALC ON FONTXSIZEMULTIPLY FONTXSIZEADD FONTCHARWIDTHCALC ON FONTXSIZEMULTIPLY FONTXSIZEADD FONTXSPACEMULTIPLY FONTCHARWIDTHCALC ON FONTXSIZEMULTIPLY FONTXSIZEADD FONTXSPACEMULTIPLY FONTXSPACEADD If no values are given, then the default values are: FONTXSIZEMULTIPLY = 1.00 FONTXSIZEADD = 0 FONTXSPACEMULTIPLY = 1.08 FONTXSPACEADD = 1 The algorithm used when each character is drawn is: If space: CHARWIDTH = INT(SPACEWIDTH*FONTXSPACEMULTIPLY+FONTXSPACEADD) otherwise: CHARWIDTH = INT(FONTSIZEX*FONTXSIZEMULTIPLY+FONTXSIZEADD) ---------------------------------------------------------------------------- Mon, 03 December 2012 IMAGEDENSITY command now supports floating point values. Largest effect is on fonts size calculations, and anything else expressed in measurements like PT, CM, MM, IN and so on. Fonts internally include the floating point DPI value. Fonts are still saved with integer DPI values (the new floating point density value is truncated when the font is written to disk). ---------------------------------------------------------------------------- Wed, 28 November 2012 Non-anti-aliased text now supports DRAWALPHAONLY ON ---------------------------------------------------------------------------- Mon, 26 November 2012 Normally all text height calculations do not include the trailing blankspace at the bottom of text. So for instance a block of text three lines tall made up of a font 10 pixels high, with a vertical gap of 4 pixels would not be 42 pixels tall. It would be 38 pixels tall. Unfortunately, most web browsers DO include the vertical white space when calculating the height requirements for text in a table. To handle the situations in which we do need this extra blank area included in the height result I have added a new option: SET TEXTHEIGHTVSPACE ON It defaults with OFF. I recommend using it with the WITH command to avoid conflict with other features that use text height, like text layers. drawclear white fontlineheightcalc on set texthtml on with textheightvspace on set txtheightnew textheight("Hello") ; 26 set txtheightold textheight("Hello") ; 19 messagebox strlist(@txtheightold,@txtheightnew) ---------------------------------------------------------------------------- Thu, 22 November 2012 Default values for FONTLINEHEIGHTCALC are now: FONTMULTNUM = 1.07 FONTADDNUM = 1.9 VGAPMULTNUM = 1.07 ---------------------------------------------------------------------------- Wed, 21 November 2012 In an attempt to match the font spacing in most browsers there is a new command to enable an approximation of font height. Defaults to OFF FONTLINEHEIGHTCALC OFF FONTLINEHEIGHTCALC ON FONTLINEHEIGHTCALC ON FONTMULTNUM FONTLINEHEIGHTCALC ON FONTMULTNUM FONTADDNUM FONTLINEHEIGHTCALC ON FONTMULTNUM FONTADDNUM VGAPMULTNUM If no values are given, then the default values are: FONTMULTNUM = 1.22 FONTADDNUM = 2 VGAPMULTNUM = 0 The algorithm used when each font is created is: LINEHEIGHT = INT(FONTSIZEY*FONTMULTNUM+FONTADDNUM+VGAPMULTNUM*LINEMULTNUM) When FONTLINEHEIGHTCALC is ON, then TEXTHTMLFONTVSPACE is ignored (not used). ---------------------------------------------------------------------------- Tue, 20 November 2012 The SHIFT-CTRL-D (Debug) and SHIFT-CTRL-V (Variables) keys can now be disabled with SET SYSESC 0, this disables not only the ESC special key but all the other special keys. ---------------------------------------------------------------------------- Thu, 15 November 2012 In addition to FOR INARRAY, there is now INARRAYINDEX0 and INARRAYATTRIB0. drawclear white set texthtml on text "" set textwrap off set texthtml off aexample[fred][0][zed] = a aexample[fred][1][zed] = b aexample[fred][2][zed] = c bexample[fred][zed] = z testi0 &aexample[fred] testi0 &bexample[fred] wait exitnow testi0: declare a for i inarrayindex0 &a textln @a[@i]$" "$@i next return ---------------------------------------------------------------------------- Wed, 14 November 2012 STRSORT with Numeric option now compares groups of numbers, previously it only compared the first number found in each string. Given this list: abba2_22 abba2_213 abba12_3 abba9_9 Without numeric option will sort as abba12_3 abba2_22 abba2_213 abba9_9 With numeric option will sort as abba2_22 abba2_213 abba9_9 abba12_3 ---------------------------------------------------------------------------- Tue, 13 November 2012 In addition to FOR INARRAY, there is now INARRAYINDEX and INARRAYATTRIB. FOR VAR INARRAYINDEX ARRAY ... NEXT FOR VAR INARRAYINDEX ARRAY ... NEXT INARRAYINDEX gives all the index values from an array, so for instance instead of this: for idx from 0 count myarray->size You can write this now as: for idx inarrayindex &myarray And instead of: for atr inarray array(arrayindex(&myarray)) You can now write: for atr inarrayattrib &myarray ---------------------------------------------------------------------------- Fri, 02 November 2012 LOCALDEPTHS was broken, had wrong offset to skip depth option VARMATCH now does a match on non-wildcard variables, previously it would always report them as existing even if they did not. VARVALUE now returns "" for invalid (NULL Token) variables. ---------------------------------------------------------------------------- Thu, 01 November 2012 Simple comparisons of arrays is now supported. Just equal and not equal work. local a array(a,b,c,d) local b array(a,b,c,e) local c array(a,b,c,d) messagebox strlist("&a==&b",&a==&b,"&a==&c",&a==&c) ---------------------------------------------------------------------------- Wed, 10 October 2012 New command WINPATH, gets Windows CSIDL paths, accepts either an integer CSIDL ID, or a name. Documentation on CSIDL paths can be found at the Microsoft site: http://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx Names are recognized both with and without the CSIDL_ prefix, so WINPATH(DESKTOP) and WINPATH(CSIDL_DESKTOP) will give the same result. You can also use CREATE as an option to force the directory to be created if it doesn't already exist. WINPATH(CREATE,FAVORITES) or WINPATH(FAVORITES,CREATE) List of recognized names are: ADMINTOOLS ALTSTARTUP APPDATA BITBUCKET CDBURN_AREA COMMON_ADMINTOOLS COMMON_ALTSTARTUP COMMON_APPDATA COMMON_DESKTOPDIRECTORY COMMON_DOCUMENTS COMMON_FAVORITES COMMON_MUSIC COMMON_OEM_LINKS COMMON_PICTURES COMMON_PROGRAMS COMMON_STARTMENU COMMON_STARTUP COMMON_TEMPLATES COMMON_VIDEO COMPUTERSNEARME CONNECTIONS CONTROLS COOKIES DESKTOP DESKTOPDIRECTORY DRIVES FAVORITES FONTS HISTORY INTERNET INTERNET_CACHE LOCAL_APPDATA MYDOCUMENTS MYMUSIC MYPICTURES MYVIDEO NETHOOD NETWORK PERSONAL PRINTERS PRINTHOOD PROFILE PROGRAM_FILES PROGRAM_FILES_COMMON PROGRAM_FILES_COMMONX86 PROGRAM_FILESX86 PROGRAMS RECENT RESOURCES RESOURCES_LOCALIZED SENDTO STARTMENU STARTUP SYSTEM SYSTEMX86 TEMPLATES WINDOWS ---------------------------------------------------------------------------- Mon, 08 October 2012 Bug in "size] = a test[test->size] = b test[test->size] = c test[test->size] = d Much simpler and more robust to use [+] instead. ---------------------------------------------------------------------------- Thu, 19 April 2012 If you use "EXITPROCESS" (case not significant) as the URL for the WEBNAVIGATE command, then rather than transferring to a new URL when BHO DLL exits, it will instead exit InternetExplorer. ---------------------------------------------------------------------------- Wed, 21 March 2012 New commands WHENFLUSH, HOTFLUSH and SCROLLFLUSH. They remove any associated triggered WHENs from the queue. Useful for multiple overlapping WHENs, HOTSPOTS or SCROLLBOXes where you want to prevent any extra actions. Syntax is the same as WHENDISABLE, HOTDISABLE and SCROLLDISABLE. They accept one or more variable names, wildcards accepted. ---------------------------------------------------------------------------- Tue, 28 February 2012 Incorrect value from ASINCHES when IMAGEDENSITY 0 is used (to get a inches only value) fixed. drawclear white local test 50+8in messagebox asinchesonly(@test) ; displays 8 exitnow asinchesonly: declare v local savedpi @drawdensityx imagedensity 0 local result asinches(@v) imagedensity @savedpi return @result INPUT commands now recognize a "HEX" type. Single character codes added for COLOR "C" and HEX "H" type, for instance: inputline test "HHHHHH" ; allow a 6 digit hex number SET INPUTCURSORCOLOR fixed, was not working. ---------------------------------------------------------------------------- Sun, 26 February 2012 Use of INPUTACTIVE with no other input fields now exits an input instead of looping back to the same input field. ---------------------------------------------------------------------------- Thu, 23 February 2012 Hang when INPUTLAYERED used with manual INPUTEND fixed. ---------------------------------------------------------------------------- Wed, 22 February 2012 Crashing bug in INPUT commands when the input variable has no starting value fixed. New INPUT commands option, SET INPUTLAYERED ON (defaults to OFF). When enabled, all characters for input are drawn using layers instead of regular text commands. This can be quite a bit slower since it creates/destroys layers for every character. The primary advantage is you can do input over the top of other active layers. INPUT commands now disable TEXTHTML and TEXTRTF internally for the actual INPUT display. Both text options were causing strange quirks before this fix. Two new input types, COLOR, which accepts hex digits and a leading '#', and MEASUREMENT which accepts a positive floating point number, and the letters used to make cm mm um m in ---------------------------------------------------------------------------- Fri, 03 February 2012 HTTP POST and HTTP PUT now call InternetErrorDlg to ask for authentication when they get a when they get a ERROR_INTERNET_FORCE_RETRY error. ---------------------------------------------------------------------------- Thu, 02 February 2012 @@MEMBUF accessing of a string was broken. Fixed. ---------------------------------------------------------------------------- Tue, 31 January 2012 HTTP POST and HTTP PUT now recognize the ERROR_INTERNET_FORCE_RETRY error and try again up to 10 times before failing. ---------------------------------------------------------------------------- Wed, 25 January 2012 Removed some debug tracking from BHO DLL to reduce overhead. In BHO DLL, added new ERROR URL used if a GL cannot be read or is corrupt. It takes the URL of the GL, and replaces .GL with _ERROR.HTML much like the background .HTML loaded if there is no error. ---------------------------------------------------------------------------- Tue, 24 January 2012 Eliminated some old TOKEN32 based code as part of the move to only TOKEN64. ---------------------------------------------------------------------------- Sun, 22 January 2012 INT command was truncating values to 32bits instead of maintaining the full 63 bits. Fixed. STRRIGHTLEFT and STRRIGHTLEFTHTML were both broken. They were working like STRRIGHT and STRRIGHTHTML, fixed. AGEXE now recognizes the RUNTIME= line if it goes not contain the text "glplay" or "glpro". ---------------------------------------------------------------------------- Sat, 21 January 2012 New command to allow APPEXEC to run programs as a different user. APPEXECUSER USERNAME PASSWORD DOMAIN DIRECTORYPATH OPTIONS OPTIONS are the the logon type which can be one of the following: BATCH This logon type is intended for batch servers, where processes may be executing on behalf of a user without their direct intervention. This type is also for higher performance servers that process many plaintext authentication attempts at a time, such as mail or Web servers. Credentials are not cached for this logon type. INTERACTIVE This logon type is intended for users who will be interactively using the computer, such as a user being logged on by a terminal server, remote shell, or similar process. This logon type has the additional expense of caching logon information for disconnected operations; therefore, it is inappropriate for some client/server applications, such as a mail server. NETWORK This logon type is intended for high performance servers to authenticate plaintext passwords. Credentials are not cached for this logon type. NETWORKCLEARTEXT This logon type preserves the name and password in the authentication package, which allows the server to make connections to other network servers while impersonating the client. A server can accept plaintext credentials from a client, call LogonUser, verify that the user can access the system across the network, and still communicate with other servers. NEWCREDENTIALS This logon type allows the caller to clone its current token and specify new credentials for outbound connections. The new logon session has the same local identifier but uses different credentials for other network connections. This logon type is supported only by the WINNT50 logon provider. SERVICE Indicates a service-type logon. The account provided must have the service privilege enabled. UNLOCK This logon type is for GINA DLLs that log on users who will be interactively using the computer. This logon type can generate a unique audit record that shows when the workstation was unlocked. And Logon provider, which can be one fo the following: DEFAULT Use the standard logon provider for the system. The default security provider is negotiate, unless you pass blank/NULL for the domain name and the user name is not in UPN format. In this case, the default provider is NTLM. WINNT35 Old logon provider. WINNT40 Use the NTLM logon provider. WINNT50 Use the negotiate logon provider. The default values for logon type and logon provider are INTERACTIVE and DEFAULT. A small example: drawclear white messagebox winerrormessage(appexecuser(test,testpass,aluminum)) appexecuser messagebox winerrormessage(appexec(notepad.exe)) appexec exitnow ---------------------------------------------------------------------------- Fri, 13 January 2012 Micrometers are now supported for measurements. A micrometer is 1/1000th of a millimeter. The suffix for micrometere is "um". So 0.005cm is the same as 0.05mm or 50um The full set of measurement functions are now: asinches asmicrometers asmillimeters aspercentage aspicas aspoints tocentimeters toinches tomeasure tomicrometers tomillimeters topercentage topicas topixels topixelsx topixelsy topoints tosize tosizex tosizey ---------------------------------------------------------------------------- Wed, 11 January 2012 Serious bug in these system variables @DESKTOPPATH @DRIVECDROM @DRIVECDROMS @GLPRODIRECTORY, @GLPRONAME @GLPROPATH They could cause a crash error if the result was used in an expression like this: text fileget(@desktoppath$"example.txt") Problem is fixed. Logic for linebreaks in
      and
    • tags is changed to more closely match expected behavior in modern browsers. ---------------------------------------------------------------------------- Wed, 21 December 2011 COLORDIALOG command now returns a full dump of COLORDIALOG structure when the ChooseColor API call fails. ---------------------------------------------------------------------------- Tue, 20 December 2011 Install script for BHO now forces you to close Internet Explorer or cancel. At end of install it navigates to a fixed url. COLORDIALOG command now correctly copies the current color value into the dialog (previously it was copied, but the init option was not set). COLORDIALOG window handle is now basehwnd for cases like IE9 where it differs from the current hwnd. ---------------------------------------------------------------------------- Mon, 19 December 2011 Install script for BHO now forces you to close Internet Explorer or cancel. At end of install it navigates to a fixed url. ---------------------------------------------------------------------------- Thu, 15 December 2011 FILEPUTVARIABLES no longer puts spaces around the "=" after each variable name. It's now "variable=value" instead of "variable = value". ---------------------------------------------------------------------------- Wed, 07 December 2011 Minor fix to SET DRAWWIDTH and SET DRAWHEIGHT. They were not working correctly if a DRAWOFFSET was in effect. ---------------------------------------------------------------------------- Mon, 05 December 2011 method of font sizing. TOMEASURE now recognizes the PX suffix as the same as PIXELS. This is because the font size tags in HTML text sometimes use a PX suffix. ---------------------------------------------------------------------------- Sun, 09 October 2011 WINDOWCHILD is now ON by default for DLL. To disable, hold down the shiftkey when the DLL starts to run a GL. ---------------------------------------------------------------------------- Tue, 04 October 2011 New logic in shutdown for DLL to prevent crashes and delays, eliminates extra branches so shutdown always happens the same way. ---------------------------------------------------------------------------- Wed, 29 September 2011 With WINDOWCHILD enabled, the child window was not resizing correctly, it was never allowed to go larger than the original window size. Fixed. ---------------------------------------------------------------------------- Wed, 28 September 2011 Fixed two problems with BHO/DLL shutdown related to WINDOWCHILD enabled. 1. The interpreter busy flag was mistakenly being set to false too soon which allowed IE to force the freeing of our status/instance while we were still using it. 2. The "do we own the window" flag was not being set correctly with WINDOWCHILD enabled so that the created child window was never being sent a "Destroy me" message. ---------------------------------------------------------------------------- Mon, 26 September 2011 PM Added a bunch more error checking at shutdown to fix a thread crash when WINDOWCHILD enabled. ---------------------------------------------------------------------------- Mon, 26 September 2011 For the sake of testing WINDOWCHILD is now only enabled by holding down the shift key during start of a GL. If the shift key is not held down, then WINDOWCHILD defaults to OFF. ---------------------------------------------------------------------------- Sun, 25 September 2011 Strange bug where the default Window size was wrong sometimes in BHO fixed. It now waits for the WM_SIZE message before getting the starting window size. Faster startup for BHO, it previous waiting for no messages, an idle period, before accepting the window was ready. It now waits for a few hundred messages, and then assumes the window is ready. Because AG needs to hook into the IE window before the interpreter starts it's not possible to have SET WINDOWCHILD ON/OFF work. It will have to be set at compile time, although I have a special compile time option which sets WINDOWCHILD. After several fixes to the WINDOWCHILD code, WINDOWCHILD now defaults to ON (applies to BHO DLL only). We'll see how stable it is.... ---------------------------------------------------------------------------- Thu, 08 September 2011 DRAWINSIDE now returns a count instead of just 0 or 1. Useful for multiple coordinates, for instance to find out how many corners of a box are inside another box: local boxbcount drawinside(@boxa,@boxb[0],@boxb[1],@boxb[0],@boxb[3],@boxb[2],@boxb[1],@boxb[2],@boxb[3]) local boxacount drawinside(@boxb,@boxa[0],@boxa[1],@boxa[0],@boxa[3],@boxa[2],@boxa[1],@boxa[2],@boxa[3]) ---------------------------------------------------------------------------- Wed, 07 September 2011 WINSOCK support in BHO is now working (has not worked before this because of differences in message handing for async winsock calls). This means the NET: prefix filenames, and NETOPEN command now work and have been tested. ---------------------------------------------------------------------------- Tue, 06 September 2011 All FileOpen commands/features, anything that opens a file, in particular the SCRIPT commands will now look into the launch directory if all other locations fail. The launch directory is what was the current directory when the program first started. WINERRORMESSAGE now handles WININET and WINSOCK errors (previously it only handled Windows errors). ---------------------------------------------------------------------------- Fri, 02 September 2011 Long standing bug when redefining a WHEN is finally fixed! If you created another when with the same name as an existing one, the new when would be disabled, and have incorrect default inside/outside coordinates. ---------------------------------------------------------------------------- Thu, 01 September 2011 SET VARIABLES ON display for WHEN is drastically improved to give when active/disabled, type, delay, inside/outside coordinates, keyboard key and triggered count. ---------------------------------------------------------------------------- Fri, 19 August 2011 FILEGETTYPE now recognizes BMP images where biCompression is non-zero, values 0 to 5 are now accepted. FILEGETTYPE now recognizes TIFF images where the trailing head bytes are 00 2A instead of standard 2A 00. Apparently shows in some older TIFF files created on BigEndian Macs (68000 or PowerPC). ---------------------------------------------------------------------------- Thu, 18 August 2011 FILEGETTYPE was not recognizing some JPEG images saved with Adobe Illustrator that use application specific extension tag 0xED. Fixed to allow all application specific extensions 0xE0 to 0xEF. This also affects IMAGELOAD since it uses the same code as FILEGETTYPE to determine the image file format. ---------------------------------------------------------------------------- Wed, 17 August 2011 Bug IMAGESIZEFITCROP which was using parameter 1 for parameter 2 (the Y axis alignment was using the X axis alignment). Fixed. ---------------------------------------------------------------------------- Mon, 08 August 2011 STRSEARCH now accepts an array for the SOURCESTRING and SEARCH value, but not both. This allows you to search a large number of source strings, or for a large number of search strings. The result is one value for each array item, and the result is an array like one return by the array() command. For example this gives 5,1,4,7,0: test = "boycatdog" searchtest = array(a,b,c,d,e) result = strsearch(@test,&searchtest) messagebox strlist(@result) "Search Result" A multi source string example gives 1,5,2: test = array("abcd","boycatdog","cad") result = strsearch(&test,"a") messagebox strlist(@result) "Search Result" ARRAYDELETE now accepts multiple values pairs for the start position and count. ARRAYDELETE ARRAY STARTPOS COUNT STARTPOS COUNT STARTPOS COUNT .... They deletions are done in forward order, so make sure the successive deletions are BEFORE each previous deletion. There is no adjustment made for previous deletions, so this example will delete item "2" and item "4". test = array(0,1,2,3,4,5,6,7,8) arraydelete test 2,1 3,1 If you wanted to remove item "2" and item "3" you would need to do it in reverse: test = array(0,1,2,3,4,5,6,7,8) arraydelete test 3,1 2,1 ---------------------------------------------------------------------------- Sun, 07 August 2011 Long standing bug in font creation during first startup which could give zero size fonts (nothing drawn) is finally fixed. It now tries the text metrics call up to 100 times with a 1/100th of a second delay between calls to give the windows font engine time to "catch up". VERY ODD BUG! Bug in text drawing which could stop before finishing text if complex tags which use the unget render feature are at the end of text is fixed. The count of remaining unget chars is now check by main text loop and by wrap point check as well to prevent this bug. Bug in TEXT*RECTS commands which was not filling in the last entry if it was a printable character is fixed. New command TEXTREPLACEMENTS takes an array of strings where the index is the original string, and value is the replacement. During any text command, the replacement pairs are used to change the output text. This works with position dependent text commands using the original text position (positions are based on original string, not the result of replacements), and it does work with the character position array returning text commands (array is based on original string, not the one after replacements). An example that shows what happens with TEXTRECTS commands when the length of the replacement is different. Notice the "Mr" vs "Mrs", the leading letter and trailing letter are matched, but the middle letter has no entry in the RECTS array. drawclear white set texthtml on text "" textreplacements arrayindexpair("abc","abc","Mr","Mrs") local s "The Mr abc def" local rects TEXTSTRPOSITIONRECTSFROM(@s) for n from 1 count strlen(@s) if @rects[@n*4]!=@rects[@n*4+2] color green text @rects[@n*4] @rects[@n*4+1] ""$strmid(@s,@n,1)$"" endif color red drawbox @rects[@n*4] @rects[@n*4+1] @rects[@n*4+2] @rects[@n*4+3] next wait Search strings are case sensitive. Replacement strings are limited to 512 characters each. ---------------------------------------------------------------------------- Sun, 10 July 2011 The VARIABLES dialog expand large arrays checkbox is now remembered across open and closings. Previously it would reset to closed every single time the dialog was opened in a debug session. The Expand LgArrays button now does a refresh. The Expand LgArrays button and Refresh button now work when a MESSAGEBOX command is active (using a different code path for this one special case). ---------------------------------------------------------------------------- Sun, 19 June 2011 The SET VARIABLES variable name match now allows multiple variable names. The same is true with the variable name match field in the variables debug dialog box. Variable names can be seperated by spaces or commas. Multiple seperate values are combined with spaces between them. Any of the following is valid: set variables a b c d set variables "a b c d" set variables a,b,c,d ; This will display as "a b c d" in the variables dialog set variables "a,b,c,d" z = array(a,b,c,d) set variables @z ---------------------------------------------------------------------------- Mon, 13 June 2011 Three new functions, IMAGESOLID, IMAGESOLIDX and IMAGESOLIDY. They return either true or false. IMAGESOLID determines if an image is all a single color IMAGESOLIDX determines is an image is the same colors on the X axis, which would look like vertical strips. IMAGESOLIDY determines is an image is the same colors on the Y axis, which would look like horizontal stripes. BOOLRESULT = IMAGESOLID(IMAGEBUF) BOOLRESULT = IMAGESOLIDX(IMAGEBUF) BOOLRESULT = IMAGESOLIDY(IMAGEBUF) Primary use of these functions is to reduce/eliminate redundant images, such as in a HTML email. ---------------------------------------------------------------------------- Tue, 17 May 2011 Bug in IMAGEALPHASET would remove an image before it had been used as an alpha mask. Fixed. This becomes an issue when you use a temporary image that does not exist outside the call to IMAGEALPHASET like this example which failed until this fix: imageset imagenew(test->sizex,test->sizey,8,black) with color white drawrectround @drawminx @drawminy @drawmaxx @drawmaxy imagealphaset test imageset() ---------------------------------------------------------------------------- Fri, 13 May 2011 Bug in IMAGEPIECE could crash if used to enlarge an image (add blank space around it). Fixed. ---------------------------------------------------------------------------- Wed, 27 April 2011 Multiple bugs caused by WINDOWCHILD fixed including keyboard input was broken, WHENs were sometimes flakey, LAYERS when freed were not updating the window. WINDOWCHILD is left off by default because of window priority problems. ---------------------------------------------------------------------------- Wed, 20 April 2011 All DRAWANTI commands had a memory leak from not releasing the temporary image buffer used to store the alpha image. Fixed. Serious system GDI handle leak in @DESKTOPSIZEXREAL and @DESKTOPSIZEYREAL. They were leaking GDI handles with each call. Heavy use of them would eventually cause the program to crash or behave in strange ways as items like image buffers could no longer be created. ---------------------------------------------------------------------------- Tue, 19 April 2011 Huge number of error checks added for rare (usually a bug) cases of the main window buffer not being created. Error checks added to interal CallAlphaSetImagePut, which is used by all the DRAWANTI commands when the alpha channel image fails to be created (generally caused by rare bugs). ---------------------------------------------------------------------------- Sat, 09 April 2011 SET WINDOWCHILD ON/OFF Defaults to OFF, when ON the drawing window is created as a child of the base window. Only has effect in the BHO. Added to compensate for problems with IE9 drawing/erasing our window sometimes. A child window is isolated, and hides the original window. Left OFF by default for now because of likely bugs such as window resizing. ---------------------------------------------------------------------------- Thu, 07 April 2011 Bug in active layer update code was still updating the screen for disabled layers. So an animated layer would keep causing constant screen updates for no reason slowing everything down. ---------------------------------------------------------------------------- Wed, 06 April 2011 Updated dates in legal copyright section of EXE and DLL info. Corrected outdated app version problem DEBUGLOGGING now writes the log to the desktop to avoid permission issues with writing to "C:\" ---------------------------------------------------------------------------- Tue, 05 April 2011 Made browser version install force closing of any open IE windows since the live activate code does not work, so a relauch of IE is required for the plugin to work. ---------------------------------------------------------------------------- Fri, 01 April 2011 Crash caused by IE9 (Internet Explorer 9.0) with BHO fixed. Was a reference to a NULL pointer in debug code caused by call to depricated function which returns NULL now. IE9 also causes a flash to white whenever the BHO updates the window, this will be addressed in a future update. ---------------------------------------------------------------------------- Wed, 30 March 2011 Bug in error message for _CALL function, used everywhere to call all subroutines and commands. It was often saying the name of an invalid command is "0" because it was destroying the label name before getting to the error code. Fixed. Also added early error checking for completely invalid labels like "1" or "0". Rewrote all low level string commands to have two fixed root strings "0" and "1" which never have to be allocated or freed. This reduces overhead, and speeds things up. Duplicate Label error now gives the label name. ---------------------------------------------------------------------------- Wed, 16 March 2011 The TEXTCALC commands were all failing when being used in a DRAWREGION, and were also giving incorrect results for line wrapping. Both problems Commands fixed are: TEXTCALCLINESRECTS TEXTCALCLINESRECTSFROM TEXTCALCSTRPOSITIONRECTS TEXTCALCSTRPOSITIONRECTSFROM ---------------------------------------------------------------------------- Mon, 14 March 2011 LAYERLEVEL was not working correctly, it's behavior was backwards. If a layer at the given depth does already exists, it was supposed to skip the level change. Instead it did the opposite, it skipped setting the level if no layer at the given level exists. Fixed. ---------------------------------------------------------------------------- Thu, 10 March 2011 HOTSPOT command now accepts floating point values for coordinates. This fixes a odd bug where you would get a missing image error if you used a floating point value for a coordinate. ---------------------------------------------------------------------------- Mon, 28 February 2011 Added fix for rare case when "" was found as a valid variable name. Also added shortcuts for those cases to speed up searching for blank variables. New command VARLEN(varname) exactly the same as STRLEN(VARVALUE(varname)). ---------------------------------------------------------------------------- Wed, 23 February 2011 All HTML encoding functions no longer encode these tags since they are not officially support by FireFox or IE: &ersand; &apostrophe; &asterisk; &at; &bar; ⁁ : , $ &equal; &exclaimation; ‐ &percent; . + &question; "e; ---------------------------------------------------------------------------- Thu, 17 February 2011 IMAGESIZEFITCROP was not preserving the aspect ratio, and was producing incorrect results. Also excessive rescaling was going on with both IMAGESIZEFIT and IMAGESIZEFITCROP which gave sometimes pixelated results. Both problems fixed. ---------------------------------------------------------------------------- Tue, 15 February 2011 Occasional crash bug from use of uninitialized elements in an offset array in commands that use regular expressions is fixed. This showed up with STRREGEXEXTRACT in some rare cases. ---------------------------------------------------------------------------- Thu, 27 January 2011 New element for layers to retrieve the FILTER value: LAYERNAME->LAYERFILTER Runable Example: drawclear white with color green imagenew blinker 200 100 layer testlayer 0 0 image blinker whenicursorrefreshsub when mm mousemove mouseget b x y layer testlayer @x @y endwhen forever whenicursorrefreshsub: with whenenabled off windowupdatecount off layer testlayer filter 100-testlayer->layerfilter whenfree whenicursorrefresh when whenicursorrefresh always after 800 whenicursorrefreshsub endwhen endwith return Element ->LAYERANIMFRAME now supported (was stub) now works, it gives the frame number currently displayed by a animated layer. Element ->ANIMFRAMES now supported (was stub), it gives the total number of frames in a animated layer. If used on an array it returns the array size (animated GIFs are loaded as an array of images, so that's the reason this will work on an array). ---------------------------------------------------------------------------- Wed, 19 January 2011 DRAWALPHAONLY support rewritten to handle mixing alpha into an existing alpha. This allows multiple overlapping draw commands to mix correctly. The results are not exactly the same as doing the anti-aliased drawing normally because of rounding errors, but are still pleasantly close. This new DRAWALPHAONLY support only works if the output image is 32bits per pixel. Although I've optimized it to be all integer, the calculations are still quite a bit more elaborate than normal anti-aliasing/alpha. Here is a runable example which shows the new results: windowsize 1024 600 drawclear white set texthtmlantifont on set texthtml on text "" strexample = "Hello there" color black imagenew textexample textwidth(@strexample) textheight(@strexample) imageset textexample set drawalphaonly on color red text @strexample color green drawantiline @drawminx @drawminy @drawmaxx @drawmaxy 2 color blue drawantiline @drawminx @drawheight/2 @drawmaxx @drawminy 1 imageset imagealpha on textexample layer textlayerexample image textexample imagesizefit @drawwidth @drawheight-40 textexample imageput 0 40 textexample forever ---------------------------------------------------------------------------- Mon, 17 January 2011 New system variable SET DRAWALPHAONLY ON/OFF, controls anti-alias drawing commands like TEXT. Defaults to OFF. When ON, anti-alias drawing only writes the mix percentage as the alpha, and does not mix the color with the background. This is useful for creating a image buffer that can be anti-aliased against any background. Tested with TEXT and DRAWANTI commands. Here is an example using a layer, notice the text and line are not correctly blended, so avoid overlaping anti-alias draws. drawclear white set texthtmlantifont on set texthtml on text "" strexample = "Hello there" color black imagenew textexample textwidth(@strexample) textheight(@strexample) imageset textexample set drawalphaonly on color red text @strexample color black drawantiline @drawminx @drawminy @drawmaxx @drawmaxy 3 imageset imagealpha on textexample layer textlayerexample image textexample forever ---------------------------------------------------------------------------- Mon, 13 December 2010 Four new commands DRAWOVERLAPLINELINE, DRAWOVERLAPLINEBOX, POSITIONINTERSECTLINELINE, and POSITIONINTERSECTLINEBOX. DRAWOVERLAPLINELINE returns @TRUE if two lines passed overlap/intersect. DRAWOVERLAPLINEBOX returns @TRUE if the line and box passed overlap/intersect. POSITIONINTERSECTLINELINE returns the XPOS and YPOS of the point of intersection between two lines passed. Returns two values, so must be used with SETS, or LOCALS, or GLOBALS, or a multi-value function like ARRAY or STRLIST. POSITIONINTERSECTLINEBOX returns the XPOS and YPOS of the point of intersection between a line and box. If there are multiple intersections, then the intersection point closest to LX1,LY1 is returned. RESULT = DRAWOVERLAPLINELINE(LX1,LY1,LX2,LY2,ZX1,ZY1,ZX2,ZY2) RESULT = DRAWOVERLAPLINEBOX(LX1,LY1,LX2,LY2,BX1,BY1,BX2,BY2) SETS XPOS YPOS POSITIONINTERSECTLINELINE(LX1,LY1,LX2,LY2,ZX1,ZY1,ZX2,ZY2) SETS XPOS YPOS POSITIONINTERSECTLINEBOX(LX1,LY1,LX2,LY2,BX1,BY1,BX2,BY2) Runable test: beginloop testit random(0,@drawmaxx),random(0,@drawmaxy),random(0,@drawmaxx),random(0,@drawmaxy),random(0,@drawmaxx),random(0,@drawmaxy),random(0,@drawmaxx),random(0,@drawmaxy) delay 100 endloop exitnow testit: drawclear white color red drawantiline @1 @2 @3 @4 color green drawbox @5 @6 @7 @8 color black drawanticircle @1 @2 5 5 locals xx yy positionintersectlinebox(@1,@2,@3,@4,@5,@6,@7,@8) color blue drawbox @xx-1 @yy-1 @xx+1 @yy+1 return ---------------------------------------------------------------------------- Thu, 02 December 2010 Bug in conversion of color values into strings fixed. Previously it ws providing the address of the color value instead of a 32bit integer. Now it converts the color into a 32bit integer. New command VARVALUE, works as a combination of VARDEF() and AT(). If a variable exists, it gives it's value, if not then it return a empty string "". Useful for replacing code that does things like this: if vardef(outputlist) if strlen(@outputlist)>0 ... do something endif endif With this: if strlen(varvalue(outputlist))>0 ... do something endif Accepts multiple values, for example: a = 1 c = 3 messagebox strlist(varvalue(a,b,c)) ---------------------------------------------------------------------------- Thu, 11 November 2010 Fixed a memory corruption issue font define code when the font has less than 256 characters (would overrun end of a temorary character width buffer). STRURLENCODE now uses Windows API WideCharToMultiByte call to do translation to UTF8 STRURLDECODE now supports decoding UTF8 encoded strings, it uses the Windows API MultiByteToWideChar call to do translation from UTF8. It always outputs a BSTR. STRHTMLTOFLASH fixed to handle characters over 127. Previously it would convert them into a negative number which became a large unsigned 16bit value in the output BSTR. It also now uses the ISO Latin 1252 translation just like the & translation code uses. This fixes is to that inline characters like "£" will work just like £ test = "Two for 10£ is 5£ each" result = strurlencode(strhtmltoflash(strhtmlclean(@test))) original = strurldecode(@result) messagebox strlist(@test,@result,@original,@original) New command, STRUTF, takes a BSTR (or regular string) and outputs a UTF8 string. If given a regular string (not a BSTR), it will use a simple conversion, not a full unicode conversion. ---------------------------------------------------------------------------- Thu, 04 November 2010 Changed the REAL variables, @DESKTOPSIZEXREAL, @DESKTOPSIZEYREAL and @DESKTOPBITSREAL to all read the values live from Windows, not use stored values. This is to allow adjusting for changes in video mode while a program is running. DESKTOPGET command revised to also use current desktop size, not the buffered value from when the application started. ---------------------------------------------------------------------------- Wed, 03 November 2010 Updated install and BHO background install to new InnoSetup v5.4.0 New command STRREGEXEXTRACT, used to extract matching strings. Can return multiple items if used with matching sets. Multiple values can be captured or used with ARRAY, SETS, GLOBALS and other commands that take a variable number of parameters. RESULT = STRREGEXEXTRACT(STRING, REGEXSTRING) RESULT = ARRAY(STRREGEXEXTRACT(STRING, REGEXSTRINGSET)) RESULT = STRREGEXEXTRACT(STRING, REGEXSTRING, STARTPOS) RESULT = ARRAY(STRREGEXEXTRACT(STRING, REGEXSTRINGSET, STARTPOS)) Runable example: drawclear white messagebox @quote$strregexextract("Hello There Ed"," .* ")$@quote "Simple Match" result = array(strregexextract("Hello There Ed"," (.*) ")) messagebox @quote$@result[0]$@quote "Entire Match" messagebox @quote$@result[1]$@quote "Match Set 1" exitnow ---------------------------------------------------------------------------- Thu, 28 October 2010 Two new commands work much like ARRAYPAIR and ARRAYPAIRS. They create a new array using pairs of INDEX, and VALUE. ARRAYRESULT = ARRAYINDEXPAIR(INDEX1, ITEM1, INDEX2, ITEM2, INDEX3, ITEM3, ..., ...) ARRAYRESULT = ARRAYINDEXPAIRS(INDEX1, INDEX2, INDEX3, ..., ITEM1, ITEM2, ITEM3, ...) One simple use is to combine with the FILEGETVARIABLES like this: a = 5 b = 6 fileputvariables test.txt a b local result arrayindexpair(filegetvariables("test.txt")) messagebox @result[a] "result[a]" This is particularly useful when reading a list of variables from an unsecure source where someone could have edited the variables and put in something dangerous or bad. Now you can read those variables into an array which is isolated from any system/program variables. ---------------------------------------------------------------------------- Sun, 17 October 2010 New command STRUTFTOHTML. Converts a UTF-8 string into a HTML encoded string. Uses the same code for translating UTF as the CLIPBOARDGETTEXTHTML command. Does not do any other HTML transformations. RESULTSTR = STRUTFTOHTML(UTFSTRING) Example: ; transform a UTF-8 encoded HTML file into ISO Latin charset local s strutftohtml(fileget(test.html)) ; use wildreplace because it's case insensitive, use 1 to replace only first match local s strwildreplace(@s, "charset=UTF-8", "charset=ISO-8859-1", 1) fileput testnew.html @s ---------------------------------------------------------------------------- Thu, 14 October 2010 The STEP and DELAY options in LAYER CURVE were broken by the Sept 20th stack checking changes. Fixed. Bug in STREVAL which was treating numbers followed "_" as either a number alone, or invalid expression fixed. Now STREVAL("1_1") gives "1_1". STRREPLACE and STRWILDREPLACE now support a number of replacements count option. The default is infinite (all replacements made). The count is of all search/replace pairs total. So for instance: strreplace("bcadef","a","A","b","B","c","C",2) gives aBCdef To claify case insensitivity. STRREPLACE is CASE SENSITIVE STRWILDREPLACE is CASE INSENSITIVE (upper/lower do NOT matter) STRREGEXREPLACE is CASE INSENSITIVE (upper/lower do NOT matter) Syntax is: RESULT = STRREPLACE(STRING, SEARCHSTR, REPLACESTR) RESULT = STRREPLACE(STRING, SEARCHSTR, REPLACESTR, COUNT) RESULT = STRREPLACE(STRING, SEARCHSTR, REPLACESTR, ..., SEARCHSTRN, REPLACESTRN) RESULT = STRREPLACE(STRING, SEARCHSTR, REPLACESTR, ..., SEARCHSTRN, REPLACESTRN, COUNT) RESULT = STRWILDREPLACE(STRING, SEARCHWILDSTR, REPLACESTR) RESULT = STRWILDREPLACE(STRING, SEARCHWILDSTR, REPLACESTR, COUNT) RESULT = STRWILDREPLACE(STRING, SEARCHWILDSTR, REPLACESTR, ..., SEARCHWILDSTRN, REPLACESTRN) RESULT = STRWILDREPLACE(STRING, SEARCHWILDSTR, REPLACESTR, ..., SEARCHWILDSTRN, REPLACESTRN, COUNT) ---------------------------------------------------------------------------- Wed, 13 October 2010 STRREGEXSEARCH is in, and tested. Syntax is: RESULT = STRREGEXREPLACE(STRING, REGEXSEARCH) RESULT = STRREGEXREPLACE(STRING, REGEXSEARCH, REPLACESTR) RESULT = STRREGEXREPLACE(STRING, REGEXSEARCH, REPLACESTR, REPLACECOUNT) If REPLACESTR is left out, then it is assumed to be "" If REPLACECOUNT is left out, then it is assumed to be infinite (all copies found are replaced). If $ followed by a single digit is found in REPLACESTR, it used the matching set from the REGEXSEARCH. $0 is the entire matching string. $1 is the first set, $2 the second and so on up to $9. Use of $$ gives a single $ character. Use of any character besides 0-9 or $ after a $ gives nothing. Examples: strregexreplace("abc53def","([a-z][0-9]+)","[$1]") Gives "ab[c53]def" strregexreplace("abc53def",".*([a-z][0-9]+).*","$1") Gives "c53" strregexreplace("abc53def","[a-z][0-9]+","$$0$0$$") Gives "ab$0c53$def" strregexreplace("abc53def","[a-z][0-9]+","Z$aZ") Gives "abZZdef" ---------------------------------------------------------------------------- Tue, 12 October 2010 Three new commands for searching and replacing strings STRWILDREPLACE, STRREGEXSEARCH and STRREGEXREPLACE STRWILDREPLACE Works exactly like STRREPLACE, identical syntax. But the search string supports wildcard characters. Wildcard characters are: '?' to match a single character (in regex this is ".") '*' to match 0 or more characters '#' to match 1 or more digits in a row (in regex this is [0-9]+) Syntax: RESULT = STRWILDREPLACE(STRING, WILDSEARCH, REPLACESTR) RESULT = STRWILDREPLACE(STRING, WILDSEARCH, REPLACESTR, WILDSEARCH2, REPLACESTR2) RESULT = STRWILDREPLACE(STRING, WILDSEARCH, REPLACESTR, WILDSEARCH2, REPLACESTR2, ...) Example: strwildreplace("name list under the door sitting", "under*door", "over the wall") STRREGEXSEARCH has the same syntax as STRWILDSEARCH RESULTPOS = STRREGEXSEARCH(STRING,REGEXSEARCH) RESULTPOS = STRREGEXSEARCH(STRING,REGEXSEARCH,STARTPOS) REGEXSEARCH is a regular expression as defined as "Perl Compatible Regular Expressions" More detail on Perl regular expressions be found here: http://perldoc.perl.org/perlre.html General information on Regular Expressions can be found at Wikipedia: http://en.wikipedia.org/wiki/Regular_expression Differences between the PCRE Library (which is what we use for Regular Expressions), and the native Perl format can be found here: http://en.wikipedia.org/wiki/PCRE Expressions are processed as CASE INSENSITIVE like the STRWILDSEARCH and STRSEARCH commands. Example: messagebox strregexsearch("abc53def","[a-z][0-9]+") The expression "[a-z][0-9][0-9]+" broken down, means: "[a-z]" a single character between a and z (letter) "[0-9]+" one or more digits This search will return 3. **STRREGEXSEARCH** is NOT working yet, it's still under development ---------------------------------------------------------------------------- Tue, 05 October 2010 New command IMAGESIZEFITCROP, similar syntax as IMAGESIZEFIT, adds optional arguments to control where the cropping happens. Unlike IMAGESIZEFIT which sizes down to the smallest fitting axis, it sizes up and crops the other axis. For instance imagenew 100 200 testa imagesizefit 200 500 testa ; testa is now 200x400 imagenew 100 200 testb imagesizefitcrop 200 500 testb ; testa is now 200x500 with the xaxis center cropped IMAGESIZEFITCROP CENTERX CENTERY XSIZE YSIZE IMAGEVARNAME IMAGESIZEFITCROP CENTERX CENTERY IMAGEVARNAME IMAGESIZEFITCROP XSIZE YSIZE IMAGEVARNAME IMAGESIZEFITCROP IMAGEVARNAME CENTERX can be "LEFT", "RIGHT" or "CENTER" CENTERY can be "TOP", "BOTTOM" or "CENTER" The default is CENTER, CENTER imagenew 100 200 testb imagesizefitcrop left top 200 500 testb ; testa is now 200x500 with the xaxis left cropped (so right ; hand 50 pixels in scaled image is cropped off after scaling). ---------------------------------------------------------------------------- Wed, 29 September 2010 AGCOMP now writes a LOG file even if there is an error, this helps in diagnosing compile errors. The cryptic "Command Items Overflow" error in AGCOMP now provides the message of the line where the compile error took place. This error is usually caused by a missing closing parenthesis which can be hard to track down, particularly when statements/expressions can cross lines. The extra information makes it far easier to diagnose. ---------------------------------------------------------------------------- Mon, 20 September 2010 Added whole new layer of error checking for when parameter stack is changed by complex subroutines, such as the HOTSPOT command. This is to prevent rare crashes such as when using a empty invalid image with hotspot. This adds a slight amount of overhead (check is done in EVERY access to stack, which is multiple times in every command). Also fixed bug in HOTSPOT that would assume the stack is not touched by an image load (it could be touched by a bad or missing image load). ---------------------------------------------------------------------------- Mon, 13 September 2010 TIFF support via LIBTIFF updated to version 3.9.2 Loading TIFF RGB images with no ORIENTATION tag fixed to default to TOPLEFT. This fixed a problem with some images being flipped when they had no orientation tag. LISTDUPLICATED would sometimes include values that were not a duplicate. For example listduplicated(1,1,3,3,5,5,8), Fixed. Default WINTITLE, WINCLASSNAME and WINSTYLE all changed for DLL BHO for rare cases that a window is created instead of using the browser window. ---------------------------------------------------------------------------- Sun, 12 September 2010 SET DEBUGPROFILE ON was hanging with writing forever, a bug in the script search which never reached the end of the script it was writing to a PRO output log. Fixed. Interal MyAppVersionString macro now generated (one less thing for me to edit for new builds). Reminder, delays in GIF files are honored by default, even when putting up a single frame from an animation with IMAGEPUT or putting the image into a buffer with IMAGESET. Make sure to use IMAGEDELAY to set the delay to 0 when you not want the delay. ---------------------------------------------------------------------------- Wed, 08 September 2010 Loading of BMP files with palettes where the palette is smaller than the maximum for the given number of bits per pixel is fixed. For instance a 8 bit per pixel image with only 64 colors in it's palette will now load correctly. ---------------------------------------------------------------------------- Tue, 07 September 2010 LIBPNG upgraded to version 1.4.3 PNG Image load now gets Image DPI for X and Y from the PNG if available. IMAGELOAD with Indexed PNG images (not RGB, but instead greyscale or those with a palette) were not loading correctly. Fixed. ---------------------------------------------------------------------------- Thu, 02 September 2010 New command FILEGETTYPE, returns a string with the filetype, or "" if type not recognized. The type is determined by the file header, not by the filename. Types recognized: ico bmp pic gif tiff png emf wmf jpeg pdf If no file types match, it tries skipping the first 128bytes to compensate for MacBinary headers. Example: drawclear white beginloop local testimage fileopendialog("Select Image File") local type filegettype(@testimage) local types array(jpeg,gif,tiff) if arraysearch(&types,@type)->size messagebox "Valid Image" @quote$@type$@quote else messagebox "Not a Valid Image" @quote$@type$@quote endif endloop Test script I used to copy any invalid files to a test directory for examination to verify the FILEGETTYPE code. It creates a RESULTS.CMD which when run copies all the failed files into "C:\TEST". checkdir: drawclear white filedelete results.cmd beginloop local p "\\\\192.168.2.140\\Photos\\" for fn in drivefilelist(0,@p$"*") local type filegettype(@p$@fn) if strlen(@type)==0 filesendln results.cmd "copy "$@quote$@p$@fn$@quote$" c:\test" endif next exit ---------------------------------------------------------------------------- Tue, 31 August 2010 Bug in internal conversion of strings to BSTR, and some other unusual cases was sometimes cropping a string to the first 1024 characters. Fixed. Internal DynamicArray (DynamicString) no allows direct access to buffer, all code which needs the address of the buffer is moved inside the template for safety reasons. ---------------------------------------------------------------------------- Mon, 30 August 2010 STRHTMLSTRIP, STRTEXTTOHTML, STRRTFTOHTML, STRURLENCODE and STRUTLDECODE now use new DynamicString (based on DynamicArray) for output buffer safety. ---------------------------------------------------------------------------- Sat, 28 August 2010 Internal DynamicArray array type expanded to support string operations, even with BSTR. STRHTMLTOFLASH has some serious memory buffer overflow bugs fixed. Made ultrasafe by rewriting it to use new DynamicArray support for strings. ---------------------------------------------------------------------------- Sun, 08 August 2010 New system variable STRHTMLBULLETS, controls whether the STRHTMLCLEAN and STRHTMLREPAIR functions see bullet tags
    • and
    • . It defaults to OFF. This is because adding/removing bullet tags actually changes the appearance of a HTML string when rendered, which is generally considered a destructive action. Example: local s "
    • Top
    • " messagebox strhtmlrepair(@s) "BULLETS DEFAULT" with strhtmlbullets on messagebox strhtmlrepair(@s) "BULLETS ON" with strhtmlbullets off messagebox strhtmlrepair(@s) "BULLETS OFF" ---------------------------------------------------------------------------- Wed, 28 July 2010 Changed internal filename of IEAfterGRASP.dll to Digi-products Removed some old build files from older versions of visual studio. ---------------------------------------------------------------------------- Mon, 19 July 2010 If SCRIPTERROR is set to blank "", then execution continues as if there was no error. Combined with ERRORMESSAGE OFF, this can be used to completely ignore any error. For example: WITH ERRRORMESSAGE OFF ERRORLOAD OFF SCRIPTERROR "" IMAGELOAD BADTEST.JPG ENDWITH When ERRORLOAD is OFF, the JPEG Load code will return a partial image if the error happened during an image load. ---------------------------------------------------------------------------- Thu, 14 July 2010 Rare crashing bug in WINFONT fixed (an uninitialized buffer for text metrics could be used if a system call failed). IMAGEPOSTSCRIPT has a new 6th option that controls whether the Y axis is flipped. The default is still TRUE, but you can now specify FALSE RESULT = IMAGEPOSTSCRIPT(XPOS, YPOS, XSIZE, YSIZE, IMAGEBUF) RESULT = IMAGEPOSTSCRIPT(XPOS, YPOS, XSIZE, YSIZE, IMAGEBUF, FLIPY) Any place where ON/OFF is acception, the word TRUE or FALSE is now accepted as well. Some commands where this applies: (also applies to many other commands indirectly) drawflood.cpp set ->layerbusy.cpp set ->layershow.cpp imagepostscript.cpp imagetran.cpp mousedisplay.cpp screnable.cpp screnable.cpp timerset.cpp set drawand.cpp set drawor set drawxor set imageregionmask set textcenter set textclip set textcolorcodes set textdraw set textdrawback set textfontcodes set textfromstrip set texthtml set texthtmlantifont set texthtmllink set texthtmlspaces set texthtmltabs set texthtmlwinfont set textindent set textjustified set textleft set textmonospace set textquick set textright set textrtf set textscroll set textwrap set textwrappunct windowfloattop windowforcetop windowpositionstyle windowpositionstyle windowstyle winfontstyle winfontstyle ---------------------------------------------------------------------------- Sun, 11 July 2010 Removed recursion from AVL Tree search code to reduce overhead and speed up all searches for variables. ---------------------------------------------------------------------------- Sat, 10 July 2010 AVL Tree code for removing nodes rewritten to prevent moving nodes in memory. Also fixes problem with linked list corruption, and some cases where nodes were lost. This fixes several long standing issues, and corrects some new problems that showed up since Arrays and Variables were shifted to using AVL Tree code. ---------------------------------------------------------------------------- Mon, 05 July 2010 The tag in TEXTHTML now does a
      . The
    • tag only does a
      if there is no previous line break right before it. This fixes this "
    • 1

    • 2" ---------------------------------------------------------------------------- Wed, 30 June 2010 Tree based variable and array support now enabled after a new set of tests for corruption came up clean. Also changed AVL Tree code to put actual data item first in each node to simplify access. ---------------------------------------------------------------------------- Thu, 24 June 2010 Added two new simple string commands STRRIGHTLEFT and STRRIGHTLEFTHTML. STRRIGHTLEFT(STR,POS) is the same as STRMID(STR,POS,INFINITY) STRRIGHTLEFTHTML(STR,POS) is the same as STRMIDHTML(STR,POS,INFINITY) Tree based variable and array support still not enabled (still needs internal testing). ---------------------------------------------------------------------------- Wed, 23 June 2010 Four new commands for calculting text positions without actually drawing any text: TEXTCALCLINESRECTS same as TEXTLINESRECTS TEXTCALCLINESRECTSFROM same as TEXTLINESRECTSFROM TEXTCALCSTRPOSITIONRECTS same as TEXTSTRPOSITIONRECTS TEXTCALCSTRPOSITIONRECTSFROM same as TEXTSTRPOSITIONRECTSFROM ---------------------------------------------------------------------------- Tue, 15 June 2010 ASCII codes for “ ” ‘ and ’ are all corrected, they were using unicode values with extra whitespace. They now use high ascii values 0x91 0x92 0x93 and 0x94 instead which gives correct spacing. InnoSetup updated to v5.3.10 Cleaned up /MP build option in VS2008. Now only done for non-debug builds so the MinimalRebuild option can be used for debug builds since it's faster to only compile as needed than use multiprocessor build. All /MP and MinimalRebuild options are now in consistent inherited property sheets. ---------------------------------------------------------------------------- Thu, 03 June 2010 All information needed for LAYERS THREAD is now compartmentalized into a separate data area. This eliminates some rare crash conditions at exit where the layers busy thread would try to access memory that was already free. AVL tree code for arrays and variables still disabled in this copy (needed for production work since new array/variable code not stable enough yet). ---------------------------------------------------------------------------- Wed, 02 June 2010 AVL tree code for arrays and variables disabled temporarily to produce a stable build for some updated utilities. ---------------------------------------------------------------------------- Tue, 01 June 2010 COMMON command fixed (was crashing). The COMMON command does not support arrays. All array and variable access is now done with AVL trees that use a secondary linked listed for sequential access. This eliminates memory shifting issues with layers, hotspots, whens or other background operations. In general this should be faster, but some operations like ARRAYSEARCH are slightly slower (for now). I've tested this with some complex tests, and there are some small quirks still. ---------------------------------------------------------------------------- Thu, 27 May 2010 All AVL tree code now uses a linked list for iteration. The code which uses trees for arrays and variables is not enabled yet (still crashes), but pre-tree code and tree code now use the same code for iteration. ---------------------------------------------------------------------------- Mon, 24 May 2010 Version number was incorrect in last build because resource editor in Visual Studio removed all the app version macros. ---------------------------------------------------------------------------- Thu, 20 May 2010 Problem with LAYER BELOW and other commands that use internal ArrayPush code fixed. Was broken in previous build. DEBUG Display updated to be wider, using full height for code disassembly display, and adding a list of LAYERS and a total layer count. ---------------------------------------------------------------------------- Tue, 18 May 2010 Bug in HTML tag support, the comparisons were being done case insensitive so á was being matched as Á. This let to some characters always being displayed as uppercase. To allow odd encoding like & if no match is made, the tag is converted to lowercase and the match is tried again. So &AACUTE; and &AacutE; will match á not Á. The entire project is compiled with the Visual Studio 2008 /MP option to use multiple CPU cores during compile. This may give slightly different executables (code in different order). Large number of internal changes in preparation for replacing all array and variable code with AVL Trees, and adding second layer to AVL Trees with linked list for fast linear access. All this is disabled in this build since it is unfinished (the array/variable code does not compile yet, and the linked list has some dangling pointer issues). But there are still extensive enough changes that other new bugs may have crept in. I would only use this build for testing, or in cases where the HTML tag fix is needed. ---------------------------------------------------------------------------- Sun, 02 May 2010 Some debug code from a long while ago had been left in which made all variable manipulation and array resizing much slower than expected. This debug code allowed all items to be resized even if they had not changed. Fixed. Also changed ARRAYINCREMENT from 16 to 64 to further reduce the amount of resize calls for arrays and variables (variables are just a bunch of system arrays). This increases memory overhead slightly, but further speeds up general interpreter speed. ---------------------------------------------------------------------------- Fri, 30 April 2010 Added some more error checking AVL Tree code which prevents a crash during error scriptlinks. Fixed duplicate free of labels tree that could cause a crash after an error. ---------------------------------------------------------------------------- Thu, 29 April 2010 New system variable @WINDOWUPDATETHREADED, defaults to ON. When ON, a separate thread is run in the background to do updates to the window. This may speed things up on multi-core processors, but it may also give a slight lag. SET WINDOWUPDATETHREADED ON When OFF, the updates are done in the same thread as the interpreter, same pre-2010 builds of AG. SET WINDOWUPDATETHREADED OFF ---------------------------------------------------------------------------- Wed, 28 April 2010 Enabled inline instrinsic functions in non-debug builds giving a performance boost. Possible crash in IMAGESIZE during shutdown or with invalid sizes fixed. ---------------------------------------------------------------------------- Tue, 27 April 2010 Fixes some serious memory leaks. Heap scan utility reports no remaining blocks except some mutexes left by LIBXML2. Fixed a heap corruption bug in the AVL Tree removal code. Added new fast AVL Tree Kill which frees all branches in a tree with no rebalancing. This speeds up shutdown, and makes it less susceptible to corruption. Fixed stack corruption bug in FILEPUTVARIABLES. ---------------------------------------------------------------------------- Mon, 26 April 2010 Minor changes chasing a HEAP corrupt error reported by the Microsoft debug runtime. ---------------------------------------------------------------------------- Sun, 25 April 2010 Rare hang bug in layer update thread fixed. Incorrect memory access in Image variable name construction fixed (could read the byte before the first letter). Handles for threads and Mutex are now closed with CloseHandle to free up resources for when the interpreter is run multiple times such as the BHO. All variables are now correctly freed when the interpreter finishes. This fixes a large number of memory leaks and other quirks that showed up when the interpreter was run multiple times. AVL Tree code rewritten to use C style AllocMem and FreeMem instead of new/delete to fix some bugs of the same node being freed more than once. C++ style new/delete also removed from Interpreter instance creation and destruction. ---------------------------------------------------------------------------- Wed, 21 April 2010 STRHTMLTOFLASH was not handling named HTML tags like . fixed. New system variable DESKTOPPATH, gives the file path location of the desktop for the currently logged in user. Same results as using this registry command: global DESKTOPPATH regGET(CURRENT_USER,"Software\MicroSoft\Windows\CurrentVersion\Explorer\SHELL Folders","desktop")$"\\" A bunch of system error control variables are now supported: SET SCRIPTERROR SCRIPTNAME If your AG program encounters an error, this script is linked to same as the SCRIPTLINK command. If ERRORMESSAGE is ON, the error message is displayed before the SCRIPTLINK is done. @ERRORSCRIPT Contains the AG script filename that has generated an error. @ERRORNUMBER Contains the AG error number in the AG script that has generated an error. @ERRORLINE Contains the line number in the AG script that has generated an error. @ERRORTYPE Contains the AG error text message generated an error in the GLPRO script. SET ERRORCRITICAL ON/OFF When set to ON (default is OFF), windows critical errors messages are not displayed, instead the error is passed onto the AG script as a error like other system errors. For more information, look up the Windows API function "SetErrorMode" with the SEM_FAILCRITICALERRORS option. Already supported are: @ERRORLOAD Controls if loading a corrupt image file will generate a error message. SET ERRORMESSAGE ON/OFF Controls how AG handles an error. New checking in error display code to prevent multiple errors for a single error. This also prevents errors in a script linked to via SET SCRIPTERROR from generating new errors. Some stack underflow errors from IMAGELOAD and some other commands not handling an error doing a SCRIPTLINK which wipes out parameter stack are fixed, but there may be other commands that become confused by use of SCRIPTERROR. ---------------------------------------------------------------------------- Tue, 13 April 2010 When a large number of window updates accumulate in the update queue, the queue is emptied, and the entire window is updated. This eliminates some stutter issues, and performance problems from a overly large queue. Rewrote add to update queue code to not require critical section protection, this prevents stalls waiting for background drawing to finish. The queue size set to a maximum of 64 blits. Window update thread is now given a priority of THREAD_PRIORITY_HIGHEST, and affinity to all processors. Update thread disabled while layers are copied into the layerframe buffer, this eliminates the odd visual quirks in text layers caused by new window update thread code. CPU burden drastically reduced in update thread, now suspends when idle and resumes immediately when needed. ---------------------------------------------------------------------------- Sun, 11 April 2010 Critical section protection added to new window draw code. Full window draw now flushes the update queue. Window draw thread no longer suspends when not busy. This speeds up window updates, and eliminates some stutter/delay. All critical section update code sped up by using a lookup table instead of a loop with masks. ---------------------------------------------------------------------------- Thu, 08 April 2010 New multi-threaded window draw code added which builds a queue of all window updates, and uses a background thread to do the actual copies to the window. This new code is a little buggy, and causes some bugs with text layers, and occasional stutter. Not for use in production projects yet. ---------------------------------------------------------------------------- Mon, 05 April 2010 New system variable WINDOWREFRESHIDLEPERCENT defaults to 5.0. It's the percentage of the screen that has to be updated to count as not idle. Useful for forcing full updates when small changes are frequently updated like a blinking text cursor. Even thought the default value is 5.0, it has no meaning until WINDOWREFRESHIDLE is used. ---------------------------------------------------------------------------- Wed, 31 March 2010 Two systems variables, one was always a stub (WINDOWREFRESHRATE), and WINDOWREFRESHIDLE is added new. WINDOWREFRESHRATE is in numbers of frames per second, so 30 would be 30fps. The default is 0, which means disabled. If enabled all screen updates are delayed until the next frame. This really helps with heavily active screens with lots of small updates. example: SET WINDOWREFRESHRATE 60 WINDOWREFRESHIDLE is in 1/1000ths of a second after the last screen update. The default is 0, which means disabled. If enabled, a full window redraw is done after WINDOWREFRESHIDLE number of 1/1000ths of a second after the last window update. This is useful to compensate for window redraw issues in the IEAfterGRASP browser helper object where it may not be getting all repaint messages from InternetExplorer when other windows overlap. It's a crude fix, but at least it prevents glitches until a better solution is found. example: SET WINDOWREFRESHIDLE 1000 ---------------------------------------------------------------------------- Tue, 30 March 2010 Added some more error checking in keyboard flush code, and event tracking. ---------------------------------------------------------------------------- Tue, 23 March 2010 Fixed occasional hang during shutdown caused by layer update thread waiting for busy flag that never changes. ---------------------------------------------------------------------------- Mon, 15 March 2010 Fixed several hangs in EVENT critical code, and removed a bunch of extra TOKEN critical protection that was unneeded (and could cause a lock up). As part of the process I wrote a bunch of critical lock tracking code which I can use in future to detect any locks left locked (causing a hard to trace hang), or other mistakes. Also found 4 locks left locked in the WHEN processing (when a WHEN is freed as part of an event), fixed those as well. ---------------------------------------------------------------------------- Thu, 11 March 2010 Removed all the outdated critical section code which dated from before the March revisions. Changed the priority of the LAYERSBUSY thread to above normal instead of highest. Fixed a bug in the LayerCheckOne code which was returning in the middle of a critical section during very busy layer updates which would leave the system hung because no TOKEN critical section would get executed. Also removed lock on TOKEN critical section from layer check code except for reading animation arrays. ---------------------------------------------------------------------------- Wed, 10 March 2010 Protection added for EVENT queue to prevent lost/extra keystrokes or mouse clicks because of multi-threaded accesses to queue. More complete protection for active LAYERS and active WHENs lists to protect multi-threaded access. ---------------------------------------------------------------------------- Thu, 04 March 2010 Some confusion over the actual meaning of EnterCritical/LeaveCritical was allowing some errors to still occur. All the tracking of CRITICAL_SECTION objects rewritten to correct these flaws. ---------------------------------------------------------------------------- Wed, 03 March 2010 Had some hanging problems in BHO, and some other risky situations from a whole tree of code used to search the dictionary. It was doing it in a way that could not be interrupted, so it had to all be locked down, which led to the hanging risk. All that search code is rewritten to be re-entrant, fixing all the hang issues in yesterday's build. ---------------------------------------------------------------------------- Tue, 02 March 2010 Serious bug in low level dictionary add/resize which were not correctly disabling background threads during a dictionary resize. This could cause GPF faults and other strange symptoms. Fixed with new critical section support for all major token functions. There may be some infinite loop hangs if I made any mistakes in checking all the call branches since there are so many places these key functions call each other. ---------------------------------------------------------------------------- Thu, 25 February 2010 Bug in creation of new WHENs was allowing background event checker to access the list of active WHENs while it was being resized/manipulated. This could cause crashes when frequently clicking while hotspots are created/destroyed rapidly. ---------------------------------------------------------------------------- Mon, 15 February 2010 New command DEBUGEXCEPTION generates a windows exception/crash on purpose to test debugging in the field. ---------------------------------------------------------------------------- Mon, 08 February 2010 STRASC was giving negative values for ascii characters over 127. Fixed. STRASC now supports unicode (16bit) strings. ---------------------------------------------------------------------------- Thu, 04 February 2010 New function STRHTMLREPARSE based on the LIBXML2 HTML parsing and HTML writing. It takes a HTML string and outputs a reparsed HTML string. The added are removed, and any tags are removed. The LIBXML2 HTML parser does not recognize some obscure & codes such as &equal;. This means it will turn &equal; into &equal;. STRHTMLREPARSE is to give another HTML repair option in addition to STRHTMLREPAIR, STRHTMLCLEAN and the STRHTMLFILTER functions. Some minor changes to STRHTMLFILTER because of possible memory corruption. ---------------------------------------------------------------------------- Mon, 01 February 2010 If SET TEXTKERN OFF, all checks for kerning are now disabled correctly. STRTEXTTOHTML now handles all & codes including unicode special characters. May give some quirky results because of the use of right hand single quotes being too wide. Same support added to STRRTFTOHTML for all & codes. TEXTHTML ON and other HTML text functions were not supporting & codes 8 or more characters long such as &asterisk;, fixed. ---------------------------------------------------------------------------- Thu, 28 January 2010 Small fix to STRHTMLSTRIP for ascii characters >127 STRRTFTOHTML now encodes tab characters as New command CLIPBOARDGETTEXTUNICODE, works exactly like CLIPBOARDGETTEXT except the result is a 16bit per character BSTR. New command STRTEXTTOHTML, handles UNICODE strings as input, converts plain text into HTML text. It replaces: \n into
      \t into < into < > into > & into & and other characters above 127 into � format. ---------------------------------------------------------------------------- Wed, 27 January 2010 DRAWLISTLINENEXT and DRAWLISTLINEPREV were not matching an exact coordinate, only a greaterthan (for NEXT), or less than (for prev). Fixed. ---------------------------------------------------------------------------- Mon, 25 January 2010 STRHTMLSTRIP STRHTMLPOSITOON AND STRPOSITIONHTML now treat as a single STRCHR(9) character. They also treat the numbered tab tags like and so on as a single tab character. TEXTSTRPOSITIONRECTS, TEXTSTRPOSITIONRECTSFROM, TEXTLINESRECTS, and TEXTLINESRECTSFROM now support tabs. A HREF tags with tabs in the text is now supported. ---------------------------------------------------------------------------- Wed, 20 January 2010 STRHTMLPOSITION and STRPOSITIONHTML when given a position of 0 now return 1 instead of the position of the first "real" character. Bug in handling of all TABs when DRAWOFFSET is in use fixed. Bug in handling of HTML TABs using the same position for all tabs fixed. ---------------------------------------------------------------------------- Mon, 18 January 2010 Numbered tab tags and so on are now handled by the STRHTMLCLEAN/STRHTMLREPAIR commands. Problems with HTML support when TEXTHTMLTABS enabled forcing a newline are fixed. ---------------------------------------------------------------------------- Mon, 11 January 2010 CLIPBOARDGETTEXTHTML now converts UTF8 text into HTML encoded text. ---------------------------------------------------------------------------- Thu, 07 January 2010 Setup now upgraded to be compiled with InnoSetup 3.6.7 Unicode. STRHTMLCLEAN and STRHTMLREPAIR now treat
    • as a paired tag, and will insert missing
    • tags, and remove extra tags. Also they will not remove nested
    • tags like it would with other tags like or STRLEFTHTML STRRIGHTHTML STRMIDHTML no longer try to match
    • or tags. ---------------------------------------------------------------------------- Tue, 05 January 2010 STRHTMLREPAIR and STRHTMLCLEAN could crash with complex HTML that had huge tags/attributes, such as complex URLs. Fixed to handle any size tag/nested tag. STRHTMLFILTER functions will now filter out SCRIPT code and STYLE blocks if those tags are filtered out. STRHTMLFILTER functions now remove HTML comments. Limits on text lines handled by TEXT, TEXTHEIGHT and other text functions increased from 32K to 128K. ---------------------------------------------------------------------------- Wed, 30 December 2009 New option for SET VARIABLES. If the value is a string, then it is used as the match string for the VARIABLES dialog box, and VARIABLES is turned ON: SET VARIABLES VARMATCHSTRING Example: drawclear white tagarray = array(a,c,e,f) set variables tagarray set debug step ---------------------------------------------------------------------------- Tue, 29 December 2009 STRHTMLFILTER and STRHTMLFILTERVALUE now match values with quotes against values without quotes, and vis-versa. Example: drawclear white sizevalid = array("size", "#") facevalid = array("face", "*") colorvalid = array("color", "\##") fontvalid = array("font", &facevalid, &sizevalid, &colorvalid) local s "Hello
      " news = strhtmlfilter(@s, array("br", &fontvalid)) ; Gives: Hello
      messagebox @news exitnow ---------------------------------------------------------------------------- Sun, 27 December 2009 Corrected examples for STRHTMLFILTER commands, they all take arrays not multiple tag values. STRHTMLFILER code finished and tested Runable example of some STRHTMLFILTER functions: drawclear white local s "Hello
      " news = strhtmlfiltertag(@s, array("font")) ; Gives "Hello" messagebox @news local s "Hello
      " news = strhtmlfilterattrib(@s, array(array("font","size"),"br")) ; Gives "Hello
      " messagebox @news sizevalid = array("size", "#") facevalid = array("face", "*") colorvalid = array("color", "\##") fontvalid = array("font", &facevalid, &sizevalid, &colorvalid) local s "Hello
      " news = strhtmlfilter(@s, array("br", &fontvalid)) ; Gives "Hello
      " messagebox @news exitnow ---------------------------------------------------------------------------- Wed, 16 December 2009 Fixed small bug in STRHTMLTAGREMOVE, an extra space was left when removing an attribute from multiple attributes in a single tag. STRHTMLTAGREMOVE rewritten to be generalized so the same code can be used for the new STRHTMLFILTER functions. ---------------------------------------------------------------------------- Tue, 15 December 2009 STRHTMLSTRIP now takes @TEXTHTMLSPACES into account, and does not remove spaces with it's TRUE. Five new commands under development, all for filtering HTML text to remove tags not listed. None are functioning yet: STRHTMLFILTERTAG Ignores attributes/values, only considers tag name in deciding which tags to preserve: STRRESULT = STRHTMLFILTERTAG(STRVAL,ARRAY_TAG) news = strhtmlfiltertag(@s, array("b", "br", "p", "font")) STRHTMLFILTERATTRIB ignores values, only considers tag name, and attributes: STRRESULT = STRHTMLFILTERATTRIB(STRVAL,ARRAY_TAG_ATTRIB) news = strhtmlfilterattrib(@s, array("b", "br", "p", array("font", "face", "size"))) STRHTMLFILTERVALUE considers tag name, attributes, and values: STRRESULT = STRHTMLFILTERVALUE(STRVAL,ARRAY_TAG_ATTRIB_VALUE) sizevalid = array("size", "1", "2", "3", "4", "5", "6", "7", "8", "9") facevalid = array("face", "arial", "times") colorvalid = array("color", "#000000", "0", "#FFFFFF") fontvalid = array("font", &facevalid, &sizevalid, &colorvalid) news = strhtmlfiltervalue(@s, array("b", "br", "p", &fontvalid)) STRHTMLFILTERVALUE considers tag name, attributes, and values. The tag name, attribute or value can be a wildcard string using '?' to match a single character '*' to match 0 or more characters '#' to match 1 or more digits in a row If you want to accept tags with no attributes as well as with specific attributes, you will need to include "" as an attribute name. STRRESULT = STRHTMLFILTER(STRVAL,ARRAY_TAG_ATTRIB_VALUE) sizevalid = array("size", "#") facevalid = array("face", "*") colorvalid = array("color", "\##") fontvalid = array("font", &facevalid, &sizevalid, &colorvalid) news = strhtmlfilter(@s, array("b", "br", "p", &fontvalid)) ---------------------------------------------------------------------------- Thu, 10 December 2009 New function WinErrorMessage, takes a windows error code, and looks up the text message error code. RESULTSTRING = WINERRORMESSAGE(ERRORCODE) ---------------------------------------------------------------------------- Wed, 09 December 2009 SET VARIABLES ON now surpresses headings for blocks of ignored variables. For instance if you have a GLOBAL variable called "undo", and set the variables search string to "undo", even if you had no local variables named "undo" you would still get a variable number of LOCAL headers constantly growing and shrinking above the GLOBAL section. This is fixed. ---------------------------------------------------------------------------- Fri, 20 November 2009 Long standing flaw in the way the internal token dictionary (which drives the whole interpreter) was resized is fixed. In rare cases, a background task might try to access the base token list as it was being resized resulting in a memory access error. This mostly showed up with active animated layers, but could happen in other cases. Fixed. CLIPBOARDGETTEXTHTML now trims off any leading or trailing @CR and @LF characters. ---------------------------------------------------------------------------- Thu, 19 November 2009 STRRTFTOHTML no longer adds a CRLF in front of
      tags. STRRTFTOHTML now writes tags are lower case. STRRTFTOHTML now translates '<' '>' and '&' characters to HTML escape sequences. New CLIPBOARDGETTEXTHTML and CLIPBOARDPUTTEXTHTML commands, work just like CLIPBOARDGETTEXTRTF and CLIPBOARDPUTTEXTRTF commands. ---------------------------------------------------------------------------- Tue, 17 November 2009 Bug in STRHTMLCLEAN which would incorrect adjust indexes passed. It was advancing them when it should have been decreasing them. ---------------------------------------------------------------------------- Fri, 13 November 2009 Added extra error check to low memory reallocation code to prevent crashes with negative or wildly incorrect block sizes. A crash in this code showed up during some debugging, so this is to prevent that in future. ---------------------------------------------------------------------------- Tue, 10 November 2009 Serious crashing bug in STRHTMLCLEAN with multiple duplicate FONT tags, fixed. STRHTMLCLEAN was not correctly cleaning strings with overlapping font tags, fixed. Test example: drawclear white a = "Goodbye" messagebox @a strhtmlclean(@a) exitnow Added error checking to key ItemAdd and ItemAddUnique low level functions. They would crash if given a negative byte count. ---------------------------------------------------------------------------- Thu, 05 November 2009 STRHTMLTOFLASH now outputs BSTR (16bit per character) strings, it converts codepage 1252 characters into unicode characters. For instance ’ is converted into the character 0x2019. STRURLENCODE now handles BSTR (16bit per character) unicode strings, it uses UTF-8 encoding. STRURLDECODE now outputs a BSTR (16bit per character) string. It handles UTF-8 data. STRHEX now supports BSTR (16bit per character) strings, it outputs them as upper byte, lower byte pairs. A test of all this, takes a RTF rquote (right quote), converts to HTML which gives ’. Converts the HTML to flash and then UTF-8 URL encodes it to give %E2%80%99. Then it decodes the URL back to a BSTR and displays that in hex which is 2019 (unicode character for right quote). a = strrtftohtml("{\rtf1\rquote}") s = strurlencode(strhtmltoflash(@a)) messagebox @a$" "$@s strhex(strurldecode(@s)) ---------------------------------------------------------------------------- Wed, 04 November 2009 Test version: STRHTMLTOFLASH changed to generate URL style %NN sequences instead of html &#NNN; sequences. ---------------------------------------------------------------------------- Thu, 29 October 2009 New compiled script signature for 64bit compiled scripts. They use 32bit string size counts (instead of 16bit), and 64bit tokens. Signature is "AGSCRI64". Not enabled yet until further testing, and some fixes to the optimizer which combines multiple values into a single token. FILESETDATETIME now supports a combined date and time if no time is given FILESETDATETIME FILENAME DATETIME DATETIME is in the format of a 14 digit integer, YYYYMMDDHHMMSS so 9:36:15pm October 29th, 2009 would be 20091029213615 ---------------------------------------------------------------------------- Tue, 27 October 2009 Modifed script compile and load code to not be specific to TOKEN32, tested as TOKEN64, but not enabled until further testing. Replaced all comparisons with NULLTOKENS to be non-specific to token type. ---------------------------------------------------------------------------- Wed, 22 October 2009 Removed TOKEN32 references in COLOR code, and a few other minor places. ---------------------------------------------------------------------------- Tue, 21 October 2009 Removed all references to TOKEN32 from ItemFree code, only remaining references to TOKEN32 are in some TOKEN management code, and in the compiled script data (a MUCH bigger step to replace). ---------------------------------------------------------------------------- Mon, 19 October 2009 Memory leak from creating duplicate threads when LAYERS were busy with an animation or expiration time, or other update. This could accumulate rapidly with any kind of frequently update layer like a blinking cursor. Replaced dangerous TerminateThread with new cooperative shutdown code to fix the leak problems. DLL functions are now stored in a separate tree from labels. The order of precedence is DLL functions first priority, followed by script labels, followed by internal commands. ---------------------------------------------------------------------------- Wed, 14 October 2009 Lots of new error checking in cases where we are out of memory, and cannot allocate a image buffer. Internal change to use 64bit tokens for fonts and images to start move to standardize on all 64bit tokens (only using 32bit tokens for compiled script files). ---------------------------------------------------------------------------- Sun, 11 October 2009 New HOTSPOT creation code which no longer creates the hotspot as an ative variable, and then adds to it. This could cause crashes if a WHEN or other active thread freed that hotspot. Now the hotspot is entirely local within the hotspot creation code until it is fully formed and activated. Also all responses to WHENs are now disabled during a HOTSPOT creation (just in case). ---------------------------------------------------------------------------- Wed, 07 October 2009 New safe interpreter shutdown added to code which free's instance data for interpreter. New error checking on shutdown for invalid pointers to our main instance data. ---------------------------------------------------------------------------- Thu, 01 October 2009 New system variable IMAGEANTISCALE which defaults to 10. IMAGEANTISCALE controls the degree of oversampling that IMAGEANTIWARP and IMAGEANTIROTATE use. Best results were found with an oversampling of 10 which is over 6x slower than the previous fixed value of 4. Values above 10 give only minor improvements at best and get dramatically slower and consume more memory. Use of very result areas with IMAGEANTIWARP or IMAGEANTISCALE and a large IMAGEANTISCALE may cause errors. ---------------------------------------------------------------------------- Wed, 30 September 2009 Fixed crashing bug in IMAGEINDEXPUT when coordinates in index image are out of range. Disabled Index background drawing because of bugs in color choice related in PNG image load/translate problems. Is added to bug list for future fix. Also discovered that ALPHA ON with a 64bit PNG does not display correctly, also added to bug list. ---------------------------------------------------------------------------- Tue, 29 September 2009 IMAGEINDEXPUT debugged, tested and working. The results are hundreds of times faster than the test script version. imageindexnew test64map 1000 1000 imagesavepng test64map ; ; edit test64map in Photoshop ; imageload test.jpg imageload test64map.png imageindexput test64map test Internal code for IMAGEPUT and IMAGEINDEXPUT combined since they are almost identical (IMAGEINDEXPUT only adds the index image). ---------------------------------------------------------------------------- Mon, 14 September 2009 Debug data for IEAfterGRASP made into smaller PDB for transportability (Edit/Continue disabled). ---------------------------------------------------------------------------- Tue, 08 September 2009 PM Added more error checking in FILEPUTVARIABLES, and removed most outdated references to 32bit tokens (moving source code to 64bit only). ---------------------------------------------------------------------------- Tue, 08 September 2009 FILEPUTVARIABLES could crash with exception error if used with wildcards like "*" (all variables). ---------------------------------------------------------------------------- Mon, 07 September 2009 Bug in new FILEGETVARIABLES code for attributes fixed. FILEPUTVARIABLES now sorts all array indexes using ASCII order to give consistent results and correct overwritten array entries from misordered indexes. This little test creates two text files that are identical: drawclear white with filestringalways on filestringstart "¬¬" filestringend "¬¬" xmlload xmlTable.xml set filestringalways on fileputvariables "c:\a.txt" xmltable free xmltable global filegetvariables("c:\a.txt") fileputvariables "c:\b.txt" xmlTable endwith exitnow ---------------------------------------------------------------------------- Sun, 06 September 2009 FILEPUTVARIABLES now writes array attributes, for instance: drawclear white a{bob} = hello a[jane] = goodbye memnew j fileputvariables mem:j a messagebox @@j exitnow FILEGETVARIBALES now reads array attributes, uses new code to build array references that is much faster and no longer calls ARRAYREF command. ARRAYAREF rewritten to use code in common with new FILEGETVARIABLES code for creating array references. Added more error checking to FILEPUTVARIABLES to handle large array indexes, and replaced most checks for null tokens in all of AG with new type generic version (simplified code, allowed more error checking). ---------------------------------------------------------------------------- Tue, 01 September 2009 FILEPUTVARIABLES now handles arrays with mixed case indexes. This comes up with XML documents, for example an EXCEL spreadsheet. Any array index that is not all lower case is put in quotes. FILEGETVARIABLES now handles array indexes in quotes, if an index is not in quotes, it is converted to lowercase. FILEPUTVARIABLES now puts values that have a semicolon into quotes since a semicolon is used to represent a comment. Simple test: drawclear white xmlload xmlTable.xml set variables on fileputvariables "c:\a.txt" xmlTable free xmltable local filegetvariables("c:\a.txt") fileputvariables "c:\b.txt" xmlTable s = @xmltable["Worksheet"]["Table"]["Row"][0]["Cell"][2]["Data"][1] messagebox @quote$@s$@quote exitnow ---------------------------------------------------------------------------- Wed, 25 August 2009 New code in FILEPUTVARIABLES to better handle measurements. Previously a capitals prefix of "MEASURE " was put in front of the value, and it was written with a fixed 3 decimal places so this displayed "MEASURE 1.300pt". Now it displays "1.3pt". It was also treating zero values as blank, so that b would display as "MEASURE ", it now displays as "0pt". drawclear white memnew j a = 1.3pt fileputvariables mem:j a messagebox @@j memnew k b = 0pt fileputvariables mem:k b messagebox @@k exitnow ---------------------------------------------------------------------------- Tue, 25 August 2009 Detailed new debug logged code added to trace some problems with BHO message loop. Can be enabled with new SET DEBUGLOGGING ON option, creates a file C:\AGDEBUGLOG_currentdate.LOG Default is OFF BHO Exit code rewritten to correctly close down thread, and send a mouse click to the IE window which in turn triggers a CommandState message to the TrapInvoke code. This fixes the strange hanging bug where the BHO wouldn't seem to exit until the mouse was moved. Bug where BHO could never run a different signed GL fixed, any open GLs are now free'd and closed from memory correctly which also fixes some security issues. ---------------------------------------------------------------------------- Thu, 06 August 2009 Bug in STRVARNAME (and internal variable name conversion code) which would give corrupt values for short invalid variable names like "+" is fixed. ---------------------------------------------------------------------------- Wed, 29 July 2009 Crash bug in SCRIPTCOMPILE when given a blank string fixed. Bug in opening GZIP compressed files, the file handle wouldn't be closed. ---------------------------------------------------------------------------- Mon, 20 July 2009 IEAfterGRASP uninstall now deletes the %APPDATA%\IEAfterGRASP folder and it's contents. ---------------------------------------------------------------------------- Thu, 16 July 2009 Bug in TEXTSTRPOSITIONHEIGHT fixed, it was ignoring TEXTFROMSTRIP setting, never stripping. ---------------------------------------------------------------------------- Wed, 15 July 2009 SET TEXTFROMSTRIP now strips ascii characters under 8 as well (used as special markers in some text projects). SCRIPTCOMPILE has the completely new STREVAL code for testing, it will handle any expression that AGCOMP can handle: drawclear white set texthtml on text "" textln SCRIPTCOMPILE("2*128") ; displays 256 a=var var[z]=3 textln SCRIPTCOMPILE("@(@a)[z]*128") displays 384 wait exitnow It does not behave exactly the same as STREVAL, I'm testing for compatability issues before replacing STREVAL. ---------------------------------------------------------------------------- Tue, 14 July 2009 SetTimer added to window hook code for IEAfterGRASP to prevent stalls from lack of messages at exit. Fixed some of the bounds checking in AGCOMP which was not comparing against the correct end of buffer. SCRIPTCOMPILE now generates a 1st pass compile of expressions only, being used to test code for a rewrite of STREVAL to use real compiler code from AGCOMP and handle any expression. For instance messagebox scriptcompile("256*128") gives "(128 256 multiply)" messagebox scriptcompile("@(@a)[z]*128") gives (128 ((z (a at) arrayref) at) multiply) ---------------------------------------------------------------------------- Thu, 09 July 2009 Two new system variables which default to ON/TRUE SET FILESIGNED ON/OFF SET GLSIGNED ON/OFF They control whether internal cryptographic signing checks are enabled or disabled. ---------------------------------------------------------------------------- Wed, 08 July 2009 New interpreter code to process WHENs while one of these commands are busy: HTTP POST HTTP POSTFILE HTTP POSTVAR HTTP GET HTTP GETFILE HTTP GETVAR FILEUNZIP FILEUNZIPAS FILEZIP FILEZIPAS FILESHA1 FILESHA2 FILECOPY FILECRC There may be some quirky behavior if complex operations like scriptcall or exit are done from inside a WHEN processed during one of those commands. ---------------------------------------------------------------------------- Mon, 06 July 2009 Added more error checking when opening a GL to check for invalid GL files, also added more checking for unsigned vs invalid GL files to eliminate false unsigned errors. Also added check for overflow on filename length inside a GL. ---------------------------------------------------------------------------- Wed, 24 June 2009 Bug in FILEPUTVARIABLES which would convert numeric indexes into strings, making arrays inaccessable is fixed. ---------------------------------------------------------------------------- Sun, 21 June 2009 STREVAL now handles expressions with quoted values, non-numeric strings, and variables mixed in like this: drawclear white messagebox streval("a$b$\"c d\"$f$e") messagebox streval("\"1\"$\"2\"$@glprodirectory$3$4") product = "yy" version = "xxx3" application = "zzz" user = "jbridges" account = "hhhhhhhh" baseDOMAIN = "192.168.2.101" s = "\"http://\"$@baseDOMAIN$\"/\"$@product$\"/\"$@version$\"/\"$@application$\"/\"$@user$\"/\"$@account$\"/\"" r = "http://"$@baseDOMAIN$"/"$@product$"/"$@version$"/"$@application$"/"$@user$"/"$@account$"/" messagebox strlist(streval(@s),@r) @s ---------------------------------------------------------------------------- Thu, 18 June 2009 Added support for 3 more RTF character tags to TEXTRTF support: \bullet \emdash \endash ---------------------------------------------------------------------------- Mon, 15 June 2009 STRHTMLCLEAN and STRHTMLREPAIR were both mishanding single tags, either removing them, or putting in strange null tag "" at the end of the text. There were also memory leaks (small ones) in the same code. Both problems are fixed. This includes BR & LI tags. ---------------------------------------------------------------------------- Fri, 12 June 2009 New Nasty bug in the WHEN fix made on 09 June 2009. It would cause AG to hang completely when a large number of repeating whens were triggered like when quickly moving a mouse when having a mouse movement when. Fixed. WHEN and EVENT queues increased to 4096 (was 2048). ---------------------------------------------------------------------------- Thu, 11 June 2009 Fixed some small bugs in IMAGETILE command (bleed option wasn't always being read). ---------------------------------------------------------------------------- Tue, 09 June 2009 New command KEYGETCOUNT, gives a count of how many keypresses are waiting in the input buffer (which can be read with successive KEYGET commands). Syntax is similar to KEYGET. KEYSPENDING = KEYGETCOUNT() KEYGETCOUNT VARNAME Serious bug in WHEN handling which could cause a crash, invalid label or other strange errors when a large number of whens are triggered in an overlapping way. For example pounding on the keyboard when a bunch of keyboard whens are defined. This bug started when AG switched to a seperate thread to handle events. INVALID LABEL error dialog now displays the invalid label (converted to a string, so it may not be useful). ---------------------------------------------------------------------------- Thu, 04 June 2009 HTTP POST/HTTP POSTVAR/HTTP POSTFILE and HTTP GET/HTTP GETVAR/HTTP GETFILE commands now update layer animations and whens while busy, but not in realtime (there are still delays between updates). IMAGEINDEXPUT code translated from AG test code, still untested. ---------------------------------------------------------------------------- Wed, 03 June 2009 Initial code for IMAGEINDEXPUT, main translate code not written yet so it behaves just like IMAGEPUT (Index image not used yet). IMAGEINDEXPUT IMGINDEX IMGNAME IMAGEINDEXPUT IMGINDEX XPOS YPOS IMGNAME IMAGEINDEXPUT IMGINDEX XPOS YPOS IMGNAME XSIZE YSIZE ---------------------------------------------------------------------------- Tue, 02 June 2009 IMAGEINDEXNEW written, syntax is similar to IMAGENEW: IMAGEINDEXNEW VARNAME IMAGEINDEXNEW VARNAME WIDTH HEIGHT IMAGEINDEXNEW VARNAME BITS IMAGEINDEXNEW VARNAME WIDTH HEIGHT BITS RESULT = IMAGEINDEXNEW() RESULT = IMAGEINDEXNEW(WIDTH,HEIGHT) RESULT = IMAGEINDEXNEW(BITS) RESULT = IMAGEINDEXNEW(WIDTH,HEIGHT,BITS) Default BITS is 64 The resulting image is where the color of each pixel is RED is calculated by XPOS/WIDTH GREEN is calculated by YPOS/HEIGHT BLUE is 1/2 ALPHA is MAXVALUE The resulting image buffer is to be used with image manipulation calculations using IMAGEINDEXPUT. ---------------------------------------------------------------------------- Mon, 01 June 2009 IEAfterGRASP no longer loads about:blank as the background page, instead it uses the URL for the GL, replacing the GL suffix with HTML. Small bug in TOMEASURE causing a fault with some high ascii characters fixed. ---------------------------------------------------------------------------- Sun, 31 May 2009 Early code for two new commands IMAGEINDEXNEW and IMAGEINDEXPUT added. IMAGEINDEXNEW IMGINDEX SIZEX SIZEY IMAGEINDEXPUT IMGINDEX XPOS YPOS IMGNAME XSIZE YSIZE They are not functional yet. I will document better once they are working. ---------------------------------------------------------------------------- Wed, 27 May 2009 Bug in STRFORMATNUMBER not handling conditional strings correctly (it was adding up the total number of digits required for all cases). Rewritten to maintain counts for each possible case (negative, zero and positive). Example: drawclear white format = "\"$\"#,##0;[Red]\-\"$\"#,##0" s = -52720 messagebox strlist(@format,@s) strformatnumber(@format, @s) exitnow ---------------------------------------------------------------------------- Wed, 13 May 2009 Bug in CMYK to RGB lookup table fixed, was broken since Feb 19th 2009. The table is written as R,G,B values, but the color code was assuming it was written as B,G,R (as are all RGB color values are stored in AfterGRASP). As part of figuring out this problem, all the RGB to CMYK and CMYK to RGB conversion has been generalized and put in at a low level to apply to all references to a Color value. This means that operations like drawing into a CMYK image using RGB colors, and vis versa now work. ---------------------------------------------------------------------------- Sun, 10 May 2009 Bug in IMAGELOAD when loading GIFs was preventing loading of multi-image GIFs. fixed. ---------------------------------------------------------------------------- Tue, 05 May 2009 Unirary operator support in STREVAL rewritten to use same code as AGCOMP. More operator code from AGCOMP made generic to be shared to AG runtime. ---------------------------------------------------------------------------- Mon, 04 May 2009 STREVAL now handles operator precidence. So for instance: messagebox streval("3*2+1") ; both display 7 messagebox streval("1+3*2") Now uses same operator parse code from AGCOMP (adapted to be more general purpose). Parenthesis in STREVAl still do not work correctly except for function calls. ---------------------------------------------------------------------------- Sun, 03 May 2009 STREVAL now handles simple operator expressions such as: STREVAL("10-5") ; gives 5 STREVAL("12/2") ; gives 6 Operators supported are: $ % ^ & && * :( / | || != - -> + == => =< < << <> <= > >> >= ---------------------------------------------------------------------------- Mon, 27 April 2009 Series of new functions to extract/convert measurements. ASINCHES ASMILLIMETERS ASPERCENTAGE ASPICAS ASPOINTS Example: drawclear white messagebox asinches(8.5in) ;gives 8.5 messagebox asmillimeters(10cm) ;gives 100. drawregion 0 0 639 479 messagebox aspercentage(320) ;gives 50. imagedensity 50 messagebox aspoints(100) ;gives 144. messagebox aspicas(75) ;gives 9. exitnow Coversions of percentages or pixels into inches/picas/points/millimeters are done using the X axis Coversions of inches/picas/points/millimeters or pixels into percentage are done using the X axis. ---------------------------------------------------------------------------- Thu, 16 April 2009 Small fixes to IMAGESAVEJPEG when using the smaller than filesize option (would sometimes be off by 1 in quality), and allow saving higher than 32bit per pixel images. FILEZIPAS was broken, it was adding twice as many files as requested with incorrect paths. ---------------------------------------------------------------------------- Wed, 08 April 2009 Added support for: LAYNAME->LAYERIMAGE LAYNAME->LAYERANIM LAYNAME->LAYERDEPTH All were null features until now. LAYER ABOVE and LAYER BELOW were not creating blank layers, fixed. ---------------------------------------------------------------------------- Tue, 07 April 2009 LAYNAME->LAYERSHOW (also callable as ELE_LAYERSHOW(LAYNAME)) is now supported. LAYER BELOW when acting on the top most layer was not working, fixed. FILEGETVARIABLES now supports standard INI file comments. Any text after a semicolon ';' until the end of that line is ignored. This does not include semicolons inside quotes. ; test a=1;comment b="1;";comment Gives a=1 b=1; ---------------------------------------------------------------------------- Sun, 05 April 2009 Long standing bug in floating point to text conversion fixed, had to do with rounding errors when dealing with a large number of fractional digits. Bug in conversion of RGB floating point to RGB integer not handling 0 and maximum values. They were both only getting .5 of their value. ---------------------------------------------------------------------------- Wed, 01 April 2009 Added a tiny little function CONDITIONAL, takes 3 parameters. RESULT = CONDITIONAL(BOOLVALUE,USETRUE,USEFALSE) drawclear white messagebox conditional(5==6,"TRUE","FALSE") messagebox conditional(5!=6,"TRUE","FALSE") exitnow (no, it's not a April Fool's day joke, it's for use in some complex XML strings evaluated with STREVAL) ---------------------------------------------------------------------------- Tue, 31 March 2009 LAYERRECT/DRAWRECT/LAYERBOX/DRAWBOX now supports DRAWXOR with all color bit depths. LAYERRECT/DRAWRECT/LAYERBOX/DRAWBOX now supports DRAWAND and DRAWOR with all hicolor bit depths from 24 bits per pixel up. LAYERBOXROUND and LAYERRECTROUND now supported (they did nothing before now). Faster bitmap operations for beyond 32bits per pixel when the source and destination are the same bit depth. ---------------------------------------------------------------------------- Wed, 25 March 2009 Bug in TEXT RECTS commands TEXTLINESRECTS, TEXTLINESRECTSFROM, TEXTSTRPOSITIONRECTS and TEXTSTRPOSITIONRECTSFROM not handling CENTER or BOTTOM for the Y position. They were using the calculated starting Y coordinate as the top of the area. Fixed. BHO tested with Internet Explorer 8, works fine. ---------------------------------------------------------------------------- Sun, 16 March 2009 Rounding down error when converting floating point RGB values (like those created by COLORMIX) into integer RGB values (such as 24bit, 32bit) fixed. ---------------------------------------------------------------------------- Thu, 12 March 2009 ARRAYPAIR was not including the attribute for the first item in the list. Fixed. New interal only floating point color representation added: RGB192 which is 64bit floating point double red, green and blu. RGB256 which is 64bit floating point double red, green, blu and alpha. For now, these are only used by the HSV calculations including commands like ColorSaturationSet, COLORMIX and by DRAWGRADIENT which uses floating point colors for dithering and blending. Several bugs in use of UINT64 colors fixed, was accidently converting 32bit color values into 64bit RGB color values. Also removed all the sloppy old conversions from UINT to color, leaving only a few simple cases. ---------------------------------------------------------------------------- Wed, 11 March 2009 Long standing issue with FOREVER and DELAY not yielding enough, and consuming too much CPU is fixed. May make response to some active WHENs slightly slower (1/1000th of a second). All wildcard matching of variables such as the FREE command and VARMATCH commands now support the '#' special character which matches 1 or more digits only. Example: drawclear white set texthtml on text "" set texthtml off test = 1 test1 = 1 testa8 = 1 test99 = 1 textln strlist(varmatch("test#")) ; gives test1 test99 textln strlist(varmatch("test?#")) ; gives testa8 test99 textln strlist(varmatch("test*")) ; gives test test1 testa8 test99 textln strlist(varmatch("test?*")) ; gives test1 testa8 test99 forever ---------------------------------------------------------------------------- Thu, 05 March 2009 Bug in MEASUREMENTS of zero size being converted to strings is fixed. Previously it would produce a null string. Bug in conversion to MEASUREMENTS to an integer is fixed, it was giving an address of the measurement object as an integer instead of converting the measurement into an integer. When converting a measurement into an integer, it now assumes conversion on the X axis. Bug in conversion to FLOAT of integer values like measurements, was always returning 0. Fixed. ---------------------------------------------------------------------------- Fri, 27 February 2009 New functions to create color values out of seperate channel values. COLORBYTE creates a color from bytes, 8bit values, 0 to 255 each COLORWORD creates a color from words, 16bit values, 0 to 65535 each COLORLONG creates a color from longs, 32bit values, 0 to 4294967295 each COLORVAL = COLORBYTE(RED,GREEN,BLUE) COLORVAL = COLORBYTE(RED,GREEN,BLUE,ALPHA) COLORVAL = COLORWORD(RED,GREEN,BLUE) COLORVAL = COLORWORD(RED,GREEN,BLUE,ALPHA) COLORVAL = COLORLONG(RED,GREEN,BLUE) COLORVAL = COLORLONG(RED,GREEN,BLUE,ALPHA) COLORGET and IMAGECOLORGET now support an optional fourth variable name used to get the alpha channel. COLORGET X Y CVAR COLORGET X Y RVAR GVAR BVAR COLORGET X Y RVAR GVAR BVAR AVAR IMAGECOLORGET IMAGEBUF X Y CVAR IMAGECOLORGET IMAGEBUF X Y RVAR GVAR BVAR IMAGECOLORGET IMAGEBUF X Y RVAR GVAR BVAR AVAR ---------------------------------------------------------------------------- Thu, 26 February 2009 IMAGECOLORGET now supports deep colors. COLORNAME now works with color values returned from @COLORNUM DRAWRECT and DRAWBOX now support 48bit/64bit/96bit/128bit color. Default color and maxcolor mask both fixed for 48bit/64bit/96bit/128bit color. Low level bitblt operations such as IMAGEPUT now support 48bit/64bit/96bit/128bit color images as source and destination. Supports flipx and flipy. They do not yet support scaling, masking, or alpha. ---------------------------------------------------------------------------- Wed, 25 February 2009 Long standing crash on exit bug caused by freeing up the temporary images used for fonts before the font is fixed. COLORGET now supports deep colors for R,G,B variables. So for 32bit or lower images, the range for each is still 0 to 255. But for 48bit/64bit images the range is 0 to 65535, and for 96bit/128bit images the range is 0 to 4294967295. Several crashes caused by some HTML string operators when dealing with characters over ascii 127 are fixed. ---------------------------------------------------------------------------- Tue, 24 February 2009 New deep color support in place. Previously variables like @COLORNUM were just a 32bit integer. Now it's a complex value that can be 24bit, 32bit, 48bit, 64bit, 96bit, or 128bit. This required changes to anywhere in AfterGRASP that a color is used, which is ALL over the place. I've run some test scripts, but because of the nature of these extensive changes there may be bugs in some more obscure color conversions, like CMYK, or with flood/mask routines. IMAGESAVEPNG byte order when saving 48bit/64bit images fixed. IMAGELOADPNG byte order when saving 48bit/64bit images fixed. Commands that are tested with 48bit color and working are DRAWPIXEL and COLOR with RGB values. Here is a simple test script: drawCLEAR white color black imagenew test48 100 100 48 imageset test48 for y from 0 count @drawheight for x from 0 count @drawwidth color (@x*65535)/(@drawwidth-1) (@y*65535)/(@drawwidth-1) 32768 drawpixel @x @y next next imageset imagesavepng test48.png exitnow IMAGESAVETIFF and IMAGELOADTIFF tested with 48bit/64bit images, and working. But 96bit/128bit are still not working. ---------------------------------------------------------------------------- Wed, 18 February 2009 Long standing bug with Webnavigate and other DLL specific features not working in ReleaseDLL version fixed. Had to do with some missing/conflicting settings in the ReleaseDLL properties. ---------------------------------------------------------------------------- Mon, 16 February 2009 New setable option controls whether HTML Links are active. Defaults to ON, if OFF no Hotspot is created by HTML
      <= or >= fixed. It was defaulting to a string comparison. Now it only defaults to a string comparison if both sides are a string, or for equal and not equal comparisons. Bug in IMAGEANTIWARP which would change the value of IMAGEFASTSCALE is fixed. ---------------------------------------------------------------------------- Thu, 12 February 2009 LIBXML upgraded to 2.7.3 All files are now compiled with VS 2008. Modular compiler still needs some work to work with the new VS 2008 object files. ---------------------------------------------------------------------------- Sun, 08 February 2009 Line spacing calculation now ignores the height of space, tab and non-printable characters (like tags). This fixes odd line spacing bugs with trailing spaces or tags. Bug in spacing and rendering of fonts that start with character cell 1 fixed. Showed up with Monsoon script font having truncated spacing, fixed. ---------------------------------------------------------------------------- Thu, 05 February 2009 LIBPNG updated to verion 1.2.34. More changes to prepare for >32bit colors. ---------------------------------------------------------------------------- Wed, 04 February 2009 The extra suffix of ".invalid" is now supported in URLs and in GL filenames. It's automatically removed as if it wasn't at the end of the GL filename/URL. This allows creation of URLs that won't open the GL in the browser as a plain file if the BHO isn't installed. Extensive changes as start of plan to support color values larger than 32bits. IMAGESAVETIFF now works fully, including reversing Alpha channel, and dropping alpha on images with IMAGEALPHA OFF. Has experimental support for saving 48, 64, 96, and 128bit images as well. 48bit and 64bit working 96bit and 128bit do not produce valid files. IMAGELOADTIFF now working. It forces all images with fewer than 24bits into a 32bit image buffer. It has experimental support for larger than 32bit images added. IMAGESAVEPNG has experimental support for 48, 64, 96 and 128bit images added. 48bit and 64bit working, 96bit and 128bit may never work (appears unsupported by PNG). IMAGESAVETIFF IMAGELOADTIFF IMAGESAVEPNG and IMAGELOADPNG now all save and load Alpha channel correctly. Here is a test script to prove it: drawclear white color white imagenew cirmask imageset cirmask drawclear white color black drawcirclefilled 200 200 100 100 imageset imagenew test 32 imageset test set texthtml on textln "Hello" color red textln "RED" color green textln "GREEN" color blue textln "BLUE" imageset imagealphaset test cirmask imagesavepng test.png imagesavetiff test.tif appshell open test.png drawclear yellow imageput test wait free test imageload test.png imagealpha on test drawclear yellow imageput test wait free test imageload test.tif imagealpha on test drawclear yellow imageput test appshell open test.tif wait exitnow ---------------------------------------------------------------------------- Tue, 03 February 2009 IMAGESAVEPNG had the Red and Blue values reversed, fixed. PNG Image load code had Red and Blue values reversed, fixed. Experimental support for 48, 64, 96 and 128bit images added to IMAGENEW, IMAGEPIECE, WINDOWSIZE and IMAGECONVERT commands. Images can be allocated but little else works since it appears no Windows API calls support more then 32bits per pixel. A lot of changes to try and make TIFF saving work, still writes unreadable files. I'll be upgrading the LibTIFF code tomorrow to see if that helps. WINSENDMESSAGE now supported, syntax is: WINSENDMESSAGE HWND MESSAGE WINSENDMESSAGE HWND MESSAGE WPARAM WINSENDMESSAGE HWND MESSAGE WPARAM LPARAM LRESULT = WINSENDMESSAGE(HWND,MESSAGE) LRESULT = WINSENDMESSAGE(HWND,MESSAGE,WPARAM) LRESULT = WINSENDMESSAGE(HWND,MESSAGE,WPARAM,LPARAM) HWND is a window handle MESSAGE is one of these strings, or an integer value: CLEAR CLOSE COPY CUT DESTROY PASTE PRINT PRINTCLIENT ---------------------------------------------------------------------------- Sun, 01 February 2009 Minor changes to WHEN processing. ---------------------------------------------------------------------------- Thu, 29 January 2009 Bug in DRAWLISTINSIDE which was matching zero size character cells. DRAWLISTINSIDE now has two additional optional parameters which control a seed point. Useful for when creating a text selection region that may start before the current drag point. ARRAYINDEX = DRAWLISTINSIDE(RECTARRAY, XPOS, YPOS) ARRAYINDEX = DRAWLISTINSIDE(RECTARRAY, XPOS, YPOS, SEEDX, SEEDY) ARRAYINDEX = DRAWLISTINSIDE(RECTARRAY, XPOS, YPOS, MINX, MINY, MAXX, MAXY) ARRAYINDEX = DRAWLISTINSIDE(RECTARRAY, XPOS, YPOS, MINX, MINY, MAXX, MAXY, SEEDX, SEEDY) ---------------------------------------------------------------------------- Tue, 27 January 2009 Added more error checking to ARRAYDELETE and ARRAYINSERT to handle a negative count. TEXT RECTS commands TEXTLINESRECTS, TEXTLINESRECTSFROM, TEXTSTRPOSITIONRECTS and TEXTSTRPOSITIONRECTSFROM now have the RECTARRAY continue all the way to the end of the text, even with zero values. ---------------------------------------------------------------------------- Mon, 26 January 2009 Measurements done in points, like 12pt are now preserved as type "point" when converted back to a string so for instance drawclear white messagebox 72pt/2 exitnow Will display as 36pt instead of 0.5in When combining points and metric measurements, the result will be provided as mm, not points. ---------------------------------------------------------------------------- Sun, 25 January 2009 Long standing bug in FILEZIP and FILEZIPAS which was using a date with the month one month ahead of time. Turns out that ZIP files use a month numbered from 0 to 11, not 1 to 12!! But still uses a day value from 1 to 31. Crazy! and, it's fixed. Same problem also affected FILEUNZIP, FILEUNZIPLIST and FILEUNZIPAS in reverse (date one month behind). Fixed. ---------------------------------------------------------------------------- Tue, 20 January 2009 Bug in use of the tag at the start of a line with multiple size fonts, the height was being lost. Bug in aligning multiple size fonts when the text wraps because of a newline instead of word wrap fixed (line height was being lost in 2nd pass of text format code). Bug in aligning multiple size fonts if the last character before a word wrap is the largest, the line height would be too short. Support added to track the character height above the baseline, this allows multiple sized fonts on the same line to align on the baseline. For example: drawclear white set texthtml on text "" set texthtmlantifont off testsub set texthtmlantifont on testsub wait exitnow testsub: fontfree "*" teststr = "" z = 7.2 for 35 teststr = @teststr$"A" z = @z*1.05 next teststr = @teststr$"
      " for 15 teststr = @teststr$"B" z = @z*1.05 next teststr = @teststr$"
      " text @teststr teststr = "" z = 72 for 35 teststr = @teststr$"C" z = @z*.95 next teststr = @teststr$"
      " text @teststr return FONTSAVE and FONTSAVECOMPRESSED now produce a AGF type 5 font which has a baseysize variable which is derived from the Ascent type property. It's the height of the character above the baseline. This AGF type 5 font will only load in this and future builds of AfterGRASP. Here is the layout structure for the AGP type 5 header: typedef struct { char id[4]; // 'A' 'G' 'F' 5 DWORD fontbytes; // bytes of font data (not including header size) INT32 xsize; INT32 ysize; INT32 logpixelsx; // dpi (pixels per inch) on x axis INT32 logpixelsy; // dpi (pixels per inch) on y axis INT32 topwidth; INT32 ascoff; INT32 fnumchars; INT32 gap; INT32 sgap; INT32 vgap; INT32 rotation; // normally 0 INT32 bits; // bits per pixel, normally 1. Use 8 for antialias BOOL32 anti; INT32 winfirstchar; INT32 winlastchar; INT32 iantiscale; // scale value for width values (original integer value used for older AGF files) INT32 averagewidth; INT32 yoffset; // value to add to Y coordinate before drawing each character // used for superscript/subscript fonts INT32 originalysize; // original y size from FONTDEFINE double fantiscale; // floating point scale value for width values INT32 baseysize; // height of character above the baseline (from Ascent) // AGFONTHEADERWIDTHS fwidths[]; // UINT16 fontindexcount; // UINT16 fontindex[]; // unsigned char fontdata[]; } AGFONTHEADER5, *LPAGFONTHEADER5; typedef struct { INT32 start; // starting pixel to draw from INT32 end; // ending pixel to draw from INT32 leftofs; // add before drawing (can be negative) INT32 rightofs; // add after drawing (can be negative) INT32 total; // total character width } AGFONTHEADERWIDTHS; ---------------------------------------------------------------------------- Thu, 15 January 2009 Bug in modular compiler not including WINDOWUPDATE when used in the old SET WINDOWUPDATE style fixed. ---------------------------------------------------------------------------- Tue, 13 January 2009 TEXT RECTS commands TEXTLINESRECTS, TEXTLINESRECTSFROM, TEXTSTRPOSITIONRECTS and TEXTSTRPOSITIONRECTSFROM now have entries for new lines (with html that's
      tags). The width is 1 pixel wide to avoid a null entry. Multi-character sequences like HTML bullet points still don't correctly add RECT entries, the code has been added to expand the width of multiple character width entries, but there needs to be some more code added to the bullet point draw code to handle this. AGCOMP script compiler now has checks to avoid RETURN or WHENRETURN from inside a active WITH/ENDWITH block. ---------------------------------------------------------------------------- Sun, 11 January 2009 DEBUG display of HOTSPOTs now includes whether the hotspot is enabled or disabled. VARIABLES debug display now updates even when DEBUG STEP has stopped script execution. ---------------------------------------------------------------------------- Thu, 08 January 2009 When running the BHO version of AfterGRASP, the WINDOWRESIZE system variable now defaults to ON/TRUE since the BHO doesn't control IE's window sizing. Redundant window re-draws caused by WM_ERASEBKGRD are fixed. In BHO, allowing IE to update the window when invalid handle or AG pointer is now prevented. But there are still white flicker problems from some untrapped draw messages when resizing the window. ---------------------------------------------------------------------------- Tue, 06 January 2009 WINDOWUPDATE changed to add a few options, and new @WINDOWUPDATECOUNT variable: @WINDOWUPDATECOUNT ; Current WINDOWUPDATECOUNT, if greater than zero ; changes to the window are drawn to the desktop WINDOWUPDATE ; Update entire window, doesn't change @WINDOWUPDATECOUNT WINDOWUPDATE ALL ; Update entire window, sets WINDOWUPDATECOUNT to 1 WINDOWUPDATE ON ; sets WINDOWUPDATECOUNT to 1 WINDOWUPDATE OFF ; sets WINDOWUPDATECOUNT to 0 WINDOWUPDATE SAVE ; decrements WINDOWUPDATECOUNT WINDOWUPDATE RESTORE ; increments WINDOWUPDATECOUNT WINDOWUPDATECOUNT can be used with WITH to make for easy save restore in drawing routines: with windowupdatecount off textln @str1 textln @str2 textln @str3 endwith ---------------------------------------------------------------------------- Sun, 04 January 2009 Bug in compiler which prevented any kind of IF statement inside a WITH block is fixed. New system variable which controls whether WINDOWRESIZE re-scales the window contents to fit the new window size. Defaults to ON. Has no effect if WINDOWRESIZE is OFF. SET WINDOWRESIZESCALE ON/OFF The effect is similar to: set windowresize on when testscale winresize windowscale @windowscalex @windowscaley endwhen But is done in realtime without any scripting required. ---------------------------------------------------------------------------- Tue, 30 December 2008 WHENRETURN was accidently leaving a _TAIL on the parameter stack which would accumulate and eventually give a stack overflow error or possibly a crash. Fixed. Three new system variables: SET WINDOWRESIZE ON @WINDOWRESIZEX @WINDOWRESIZEY WINDOWRESIZE defaults to OFF (0), when enabled window resizing is allowed, and WHEN WINRESIZE whens can be triggered. The @WINDOWRESIZEX and @WINDOWRESIZEY variables are never modified until a WHEN WINRESIZE is triggered. If no such when is defined, they will never be updated. WHEN RESIZETEST WINRESIZE ENDWHEN Runable example: drawclear white set texthtml on text "" set texthtml off set windowresize on when testresize winresize windowsize @windowresizex @windowresizey drawclear white drawregion color black textln @windowresizex$" "$@windowresizey endwhen forever ---------------------------------------------------------------------------- Mon, 29 December 2008 DRAWOFFSETCLIP now supports multiple offset areas. DRAWOFFSET, DRAWOFFSETCLIP, and DRAWOFFSETRESET all treat multiple offset areas as relative to each previous one given on a command line. This is so that the behavior matches separate commands. Example of using WITH with DRAWOFFSETSTACK: drawclear white drawoffset 200 300 400 500 drawoffset 20 30 40 50 messagebox strlist(@@drawoffsetstack) with drawoffsetstack array(0,0,100,200) messagebox strlist(@@drawoffsetstack) endwith messagebox strlist(@@drawoffsetstack) wait exitnow ---------------------------------------------------------------------------- Sun, 28 December 2008 The STACK system variable is now supported, it's read only. It gives the same value you see in the DEBUG window for the system parameter stack. Two new system variables DRAWOFFSETSTACK and DRAWREGIONSTACK, they give the current entire list of DRAWOFFSETs or DRAWREGIONS as an array. They are both readable and writable, for instance: local drawoffsetsave @drawoffsetstack drawoffsetreset drawclear white set drawoffsetstack @drawoffsetsave When setting DRAWOFFSETSTACK or DRAWREGIONSTACK, values should be in sets of 4 integers or an array of integers. No measurements or relative positions are supported to ensure saving and restoring a list of offsets or regions will always work. DRAWOFFSET and DRAWOFFSETRESET now support multiple offset areas in a single command. For instance these two lines drawoffsetreset @ax1 @ay1 @ax2 @ay2 drawoffset @bx1 @by1 @bx2 @by2 Can now be written as: drawoffsetreset @ax1 @ay1 @ax2 @ay2 @bx1 @by1 @bx2 @by2 Bug fixed in the handling of accessing arrays or system variables with multiple return values. For example: drawclear white set texthtml on text "" set texthtml off drawoffsetsave = @drawoffsetstack n = "drawoffsetsave" b = "n" local v strreplace(strlist(@@@b),@crlf,@quote$","$@quote) textln "("$@quote$strleft(@v,strlen(@v)-2)$")" wait exitnow ---------------------------------------------------------------------------- Thu, 18 December 2008 FILEPUTVARIABLES now handles a wide range of object types for informational purposes, like images, layers, and hotspots. Useful when using FILEPUTVARIABLES to create a debug message or log. For example: m = "CurrentDirectory:"$@quote$dirgetcurrent()$@quote$@crlf$@crlf for zn from 0 count @(editfields.length-1) memnew jj 1 fileputvariables mem:jj editfields[@zn][fieldtype] editfields[@zn][varname] @editfields[@zn][varname] m = @m$@@jj$@crlf free jj next messagebox @m editfields Or to dump all variables to a file (similar to the GLPRO DEBUGSAVEVARS command): fileputvariables c:\varlist.txt varmatch("*") ---------------------------------------------------------------------------- Tue, 16 December 2008 Bug in Layer free code which could crash during shutdown fixed, it was attempting to update a no longer existant window, and trying to access a non-existant instance as part of that process. A new system variable, and two new commands for WHENs: ENDWHEN does a WHENFINISH WHENFINISH WHENRETURN SET WHENFINISHREQUIRED ON (default is OFF) New support for controlling overlapping WHENs. The new SET WHENFINISHREQUIRED ON option forces whens to never allow another when to be triggered until the previous WHEN is complete. This applies to all the whens created by HOTSPOT as well. The commands which control when a WHEN is finished are WHENFINISH which sigals the when processing has finished, and WHENRETURN which functions just like RETURN except it does a WHENFINISH as part of the RETURN code. WHENRETURN is more than just a WHENFINISH followed by a RETURN command because WHENRETURN will not allow a when to be triggered before the RETURN has happened. The ENDWHEN command automatically does a WHENFINISH for you. WHENFINISH takes no parameters. WHENRETURN functions exactly like RETURN (it accepts optional values to return, although this doesn't make much sense for WHEN or HOTSPOT since they have no support for return values). ---------------------------------------------------------------------------- Mon, 15 December 2008 Changed the way TOKEN32 and TOKEN64 operator overloads work trying to track down endless loop in use with AVLtree. ---------------------------------------------------------------------------- Thu, 11 December 2008 Start of new tag handling in STRHTMLCLEAN (required to fix tags that need reordering like "ABCDEF". Internal use of GetSetIntegerVar and GetSetStringVar simplified. ---------------------------------------------------------------------------- Wed, 10 December 2008 WHENENABLED System variable now supported, defaults to ON, when turned OFF all response to WHENs is stopped until re-enabled. SET WHENENABLED OFF Changed to internal DynamicArray class to fix some initialization errors. Removed some extra checking from internal DEBUG version (was making debugging painfully slow). ---------------------------------------------------------------------------- Tue, 09 December 2008 STRHTMLREPAIR and STRHTMLCLEAN were decrementing string positions they returned, fixed. These system variables fixed to not crash when accessed with no valid window available: drawand drawdensityx drawdensityy drawfilter drawor drawtint drawxor imageregionmask textcenter texthtml texthtmlantifont texthtmlspaces texthtmltabs texthtmlwinfont textindent textjustified textkern textkernsize textleft textmonospace textposx textposy textquick textright textscroll textshadowfilter texttabsize textwrap textwrappunct ---------------------------------------------------------------------------- Sun, 07 December 2008 New keyboard trap code in BHO which prevents IE from getting Ctrl-B, Backspace, Ctrl-I or Ctrl-U keys. May expand to all controls keys depending on usefulness of other default key bindings in IE. Most important this prevents Backspace from reseting a running BHO session. ---------------------------------------------------------------------------- Thu, 04 December 2008 Several bugs in filename handling overflow are fixed. This prevents several crash conditions when trying to use very long filenames. All version numbers are now shifted over so that instead of 1.2008.12.04 It's now 2008.12.04.01 And in the BHO, BHOobj.Version which used to give 120081204, now gives 2008120401. This is to solve the multiple release in one day problems with version numbers. ---------------------------------------------------------------------------- Wed, 03 December 2008 The default IMAGEDENSITY for an image created with IMAGENEW is now the same as the current IMAGEDENSITY. Previously it was always being set to 96. The parsing of the URL in the BHO looking for a GL name now ignores anything after the first '?'. ---------------------------------------------------------------------------- Tue, 02 December 2008 BHO ActiveX now tagged via IObjectSafetyImpl for INTERFACESAFE_FOR_UNTRUSTED_CALLER and INTERFACESAFE_FOR_UNTRUSTED_DATA. This fixes a bunch of warnings and errors. ---------------------------------------------------------------------------- Fri, 21 November 2008 IEAfterGRASP Version property now returns a integer value making comparisons much easier. About dialog boxes updated to use File version info (reduces work for me each time I product a new version). APPMUTEX for IEAfterGRASP changed to "Digi-products". Object name for ActiveX is now "Object" Test code to get version of BHO is now: ---------------------------------------------------------------------------- Tue, 18 November 2008 STRHTMLCLEAN is complete and tested. It removes any meaningless tags, doing a STRHTMLREPAIR first to repair any problem tag pairs, then removes all duplicate tags and empty tags CLEANSTRING = STRHTMLCLEAN(STRING) Runable test example: drawclear white set texthtml on textln "" set texthtml off teststrhtmlclean "Hello","Hello" teststrhtmlclean "Hello","Hello" teststrhtmlclean "Hello","Hello" wait exitnow teststrhtmlclean: declare s1 s2 textln "original: "$@quote$@s1$@quote textln "repair: "$@quote$strhtmlrepair(@s1)$@quote textln "clean: "$@quote$strhtmlclean(@s1)$@quote textln "correct: "$@quote$@s2$@quote textln return ---------------------------------------------------------------------------- Tue, 11 November 2008 IEAfterGRASP has new SetSite code which correctly returns the the base class implementation. This fixes the problems with ActiveXObject use from Javascript in IE always failing. IEAfterGRASP Invoke method rewritten to check for null pointers, and to call the base Invoke COM class to handle the Version property (and other future methods/properties). The IEAfterGRASP Version property now gives the version of the IEAfterGRASP.dll (was giving the version of Internet Explorer). These three fixes mean the example from yesterday now works correctly. ---------------------------------------------------------------------------- Mon, 10 November 2008 Registry settings for IEAfterGRASP fixed to match Microsoft example, this also includes a entry for the App's CLSID. ATL now used for the IEAfterGRASP startup. IEAfterGRASP reading of window dimensions are fixed in IE7 (was including toolbar height). IEAfterGRASP no longer loads if called from EXPLORER.EXE (prevents slowdowns and waste). IEAfterGRASP ActiveX object now provides a Version property: ---------------------------------------------------------------------------- Wed, 22 October 2008 When using a non-unicode font, or font with no unicode characters, or when translating HTML to plain text or Flash text, the unicode base & codes are now translated into these characters: '¢', ¢ '©', © '°', ° '?',   '?',   'Ð', Ð 'ð', ð '€', € '«', « '“', “ '‘', ‘ '—', — 'µ', µ '–', – '¬', ¬ '¶', ¶ '»', » '”', ” '’', ’ '®', ® '§', § 'Þ', Þ 'þ', þ '™', ™ STRTRIMDOMAIN fixed to accept a STARTPOS (was screwing up). STRRESULT = STRTRIMDOMAIN(STRVAL) STRRESULT = STRTRIMDOMAIN(STRVAL, STARTPOS) STRSEARCHEMAIL STRSEARCHURL STRTRIMEMAIL STRTRIMURL are now all written, working and tested. STRPOS = STRSEARCHEMAIL(STRVAL) STRPOS = STRSEARCHEMAIL(STRVAL, STARTPOS) STRPOS = STRSEARCHURL(STRVAL) STRPOS = STRSEARCHURL(STRVAL, STARTPOS) STRRESULT = STRTRIMEMAIL(STRVAL) STRRESULT = STRTRIMEMAIL(STRVAL, STARTPOS) STRRESULT = STRTRIMURL(STRVAL) STRRESULT = STRTRIMURL(STRVAL, STARTPOS) drawclear white set texthtml on textln "" s = "hello there http://www.test.com and more" textln strtrimurl(@s) textln strsearchurl(@s) s = "hello there email@gmail.com and more" textln strtrimemail(@s) textln strsearchemail(@s) wait ---------------------------------------------------------------------------- Thu, 16 October 2008 Some of the new string tree code added yesterday made use of the c++ runtime which pulled in a lot of extra runtime code, and caused some problems. This was also making the runtime slightly larger, and caused the modular compiler to fail when the FILEUNZIP or FILEUNZIPAS commands were used. ---------------------------------------------------------------------------- Wed, 15 October 2008 FILEUNZIP and FILEUNZIPAS will now created nested directories as needed with no limitations on order or depth. They keep a tree index of which directories were created to prevent trying to re-create directories for each file. DIRCREATE will now create multiple depth directories in a single command. For instance these sequence of dircreates: dircreate "f:\a" dircreate "f:\a\b" dircreate "f:\a\b\c" dircreate "f:\a\b\c\d" Can now be done with a single dircreate dircreate "f:\a\b\c\d" ---------------------------------------------------------------------------- Tue, 14 October 2008 STRTRIMDOMAIN and STRSEARCHDOMAIN are now finished and working. New commands for unzipping and listing ZIP files. FILEUNZIP FILEUNZIPAS and FILEUNZIPLIST. FILEUNZIP ZIPFILENAME FILEUNZIP ZIPFILENAME WILDMATCH NAMEARRAY = FILEUNZIP(ZIPFILENAME) NAMEARRAY = FILEUNZIP(ZIPFILENAME, WILDMATCH) FILEUNZIPAS ZIPFILENAME SOURCENAME DESTNAME LISTARRAY = FILEUNZIPLIST(ZIPFILENAME) windowsize 800 800 drawclear white set texthtml on textln "" list = array(strsplit(drivefilelist(0, "*.gls"),@crlf)) filezip test.zip @list listarray = fileunziplist(test.zip) for a from 0 count listarray->size textln strpad(@listarray[@a][compressed],12)$" "$@listarray[@a][name] next dircreate temp filedelete "temp\*" dirchange temp result = fileunzip("..\test.zip") textln textln "FILEUNZIP Extracted result" for a from 0 count result->size textln @result[@a] next textln textln "Directory list" textln strreplace(drivefilelist(0, "*"),@crlf,"
      ") dirchange ".." filedelete "temp\*" dirchange temp for a from 0 count listarray->size namelist[@a*2] = @listarray[@a][name] namelist[@a*2+1] = strreplace(@listarray[@a][name],".gls",".txt") next result = fileunzipas("..\test.zip",@namelist) textln textln "FILEUNZIPAS Extracted result" for a from 0 count result->size textln @result[@a] next textln textln "Directory list" textln strreplace(drivefilelist(0, "*"),@crlf,"
      ") dirchange ".." filedelete "temp\*" set variables on wait exitnow ---------------------------------------------------------------------------- Mon, 13 October 2008 "Happy Columbus Day!" PNGSAVE fixed, was not working for a long time. Now writes 32bit images as 24bit unless IMAGEALPHA is enabled in that image. Also supports writing 1, 4 and 8 bit per pixel images. Here is a simple test: drawclear white color white imagenew cirmask imageset cirmask drawclear black color white drawcirclefilled 200 200 100 100 imageset imagenew test 32 imageset test set texthtml on textln "Hello" color red textln "RED" color green textln "GREEN" color blue textln "BLUE" imageset imagealphaset test cirmask imagesavepng test.png appshell open test.png exitnow ---------------------------------------------------------------------------- Thu, 09 October 2008 Bug in DRAWGRADIENT which would get confused if multiple numeric values were used for color and percentage is fixed. Bug in detecting hex numeric strings that have a '#' prefix is fixed. TEXTHTML now supports these additional tags (some require unicode fonts): Å 0x212B ¢ 0x00A2 © 0x00A9 ‡ 0x2021 † 0x2020 ° 0x00B0   0x2003   0x2002 Ð 0x00D0 ð 0x00F0 € 0x20AC ½ 0x00BD « 0x00AB “ 0x201c ‘ 0x2018 — 0x2014 µ 0x00B5 · 0x00B7 – 0x2013 ¬ 0x00AC   0x2007 ¶ 0x00B6 ‰ 0x2030   0x2008 » 0x00BB ” 0x201d ’ 0x2019 ® 0x00AE § 0x00A7 Þ 0x00DE þ 0x00FE ™ 0x2122 Stubs for new commands for searching for, and trimming down domain names, email addresses, and URLs. NOT WORKING YET (Also, STRHTMLCLEAN is still not working). STRPOS = STRSEARCHDOMAIN(STRVAL) STRPOS = STRSEARCHDOMAIN(STRVAL, STARTPOS) STRPOS = STRSEARCHEMAIL(STRVAL) STRPOS = STRSEARCHEMAIL(STRVAL, STARTPOS) STRPOS = STRSEARCHURL(STRVAL) STRPOS = STRSEARCHURL(STRVAL, STARTPOS) STRRESULT = STRTRIMDOMAIN(STRVAL) STRRESULT = STRTRIMDOMAIN(STRVAL, STARTPOS) STRRESULT = STRTRIMEMAIL(STRVAL) STRRESULT = STRTRIMEMAIL(STRVAL, STARTPOS) STRRESULT = STRTRIMURL(STRVAL) STRRESULT = STRTRIMURL(STRVAL, STARTPOS) ---------------------------------------------------------------------------- Fri, 03 October 2008 Bug in IEAfterGRASP which prevented DEBUG and VARIABLES dialogs is fixed. The internal HInstance variable wasn't being setup correctly, which kept those dialogs from being found. ---------------------------------------------------------------------------- Thu, 02 October 2008 NULL Pointer Crashing bug in IEAfterGRASP (BHO Specific runtime) fixed. Had to do with an empty command line parsing. IEAfterGRASP in addition to parsing the URL for variable names, it also creates a @urldomainname variable which is the domain name parsed from the url. ---------------------------------------------------------------------------- Wed, 01 October 2008 Two new system variables: @SYSBHO @SYSBROWSER SYSBHO defaults to 0 in the normal AfterGRASP engine, and to 1 (TRUE) when running in the Browser Helper Object version of AfterGRASP (also called IEAfterGRASP). SYSBROWSER is blank in the normal AfterGRASP engine, and has a string containing the browser type and version when running in IEAfterGRASP. ---------------------------------------------------------------------------- Mon, 29 September 2008 Bug in STRLEFTHTML, STRLEFTRIGHTHTML, STRRIGHTHTML and STRMIDHTML which was putting trailing tags in reverse order is fixed. This has been in there ever since these functions were introduced. Also the case of added trailing tags now matches the case (upper vs lower) of the leading tags. DRAWOFFSETCLIP was clipping to the current DRAWREGION instead of DRAWOFFSET. Fixed. It now clips to the current active DRAWOFFSET. STRHTMLREPAIR now working: drawclear white color black s = "biuHeyThere" textln @s textln strhtmlrepair(@s) wait exitnow For example given this test string "biuHeyThere" STRHTMLREPAIR produces: "biuHeyThere" ---------------------------------------------------------------------------- Thu, 25 September 2008 New command DRAWOFFSETCLIP, works exactly like DRAWOFFSET except the coordinates are clipped to the previous DRAWOFFSET. This means you can use DRAWOFFSETCLIP to contract a drawing area, but not expand it. DRAWCLIPX and DRAWCLIPY rewritten to work better with DRAWOFFSET. All TEXT commands now correctly crop inside a DRAWOFFSET even if the draw region goes outside the draw area. ---------------------------------------------------------------------------- Tue, 23 September 2008 Limits in STRLEFTHTML, STRRIGHTHTML, STRMIDHTML and STRLEFTRIGHTHTML that prevented them from working with large numbers of tags, or complex cross nested tags are fixed by replacing fixed array code with new dynamic code used in STRHTMLTAGREMOVE. This also simplifies the codebase somewhat. ---------------------------------------------------------------------------- Thu, 18 September 2008 New crashing bug in STRHTMLTAGS fixed (was introduced in previous build since STRHTMMLTAGS uses the same underlying code as STRHTMLTAGREMOVE). Bug in STRLEFTHTML, STRRIGHTHTML, STRMIDHTML and STRLEFTRIGHTHTML where the end of a block is inside a tag would give an extra closing tag is fixed. ---------------------------------------------------------------------------- Tue, 16 September 2008 New function STRHTMLTAGREMOVE strips out specific tags, and can remove specific attributes. RESULTSTR = STRHTMLTAGREMOVE(STR, TAGNAME) RESULTSTR = STRHTMLTAGREMOVE(STR, TAGNAME, "") RESULTSTR = STRHTMLTAGREMOVE(STR, TAGNAME, ATTRIBNAME) RESULTSTR = STRHTMLTAGREMOVE(STR, TAGNAME) Removes any instance of TAGNAME with any attribute RESULTSTR = STRHTMLTAGREMOVE(STR, TAGNAME, "") Removes any instance of TAGNAME with no attributes. If the tag has any attributes, it is not removed. RESULTSTR = STRHTMLTAGREMOVE(STR, TAGNAME, "") Removes any instance of ATTRIBUTE that occurs under tags that match TAGNAME. If a tag has no remaining attributes, the empty tag is not removed. This example shows removing different font tags: drawclear white color black t1 = "Arial" t2 = strhtmltagremove(@t1, font, face) t3 = strhtmltagremove(@t2, font, size) t4 = strhtmltagremove(@t3, font, "") t5 = strhtmltagremove(@t1, font) set variables on wait exitnow ---------------------------------------------------------------------------- Wed, 10 September 2008 New function STRHTMLTAGARRAY returns an array of tags, the numerical index for each tag is the string position in the HTML string. The attribute for that array value is the string position of the terminating tag. For example: tagarraya = strhtmltagarray("hello") ; tagarraya[1] = "b" ; tagarraya{1} = 9 tagarrayb = strhtmltagarray("Arial") ; tagarrayb[1] = "i" ; tagarrayb{1} = 33 ; tagarrayb[4] = "font" ; tagarrayb{4} = 26 STRHTMLTAGS and STRHTMLTAGARRAY will not include
      and

      tags that have no closing tag. A note on clipboard use in AfterGRASP. In AfterGRASP the clipboardGET commands all return the clipboard, they don't set a variable. drawclear white color black clipboardCLEAR ;clear the Windows clipboard clipboardPUTTEXT "Hello there" textln clipboardGETTEXT() ;displays "Hello there" wait This applies to RTF text and images as well: drawclear white set texthtml on text "" text strrtftohtml(clipboardgettextrtf()) wait And here is a more complete example that checks a string if it's a valid URL or valid eMail address: drawclear white color black messagebox ValidURLCheck("http://www.google.com/test?") "http://www.google.com/test?" messagebox ValidURLCheck("http://www.1google.com/test?") "http://www.1google.com/test?" messagebox ValidURLCheck("http://www.google.c1om/test?") "http://www.google.c1om/test?" messagebox ValidURLCheck("http://www.g_oogle.com/test?") "http://www.g_oogle.com/test?" messagebox ValidURLCheck("www.google.com/test?") "www.google.com/test?" messagebox ValidURLCheck("http://192.168.2.2@admin:test") "http://192.168.2.2@admin:test" messagebox ValidEmailCheck("rob.howarth@eu.jll.com") "rob.howarth@eu.jll.com" messagebox ValidEmailCheck("john.hello@ibm.com") "john.hello@ibm.com" messagebox ValidEmailCheck("john.hello@ibm.coma") "john.hello@ibm.coma" messagebox ValidEmailCheck("john.hello@ibm.c1om") "john.hello@ibm.c1om" messagebox ValidEmailCheck("john.@hello@ibm.com") "john.@hello@ibm.com" messagebox ValidEmailCheck("john.@hello@ibm.co.uk") "john.@hello@ibm.co.uk" messagebox ValidEmailCheck("john.@hello@ibm.co.k") "john.@hello@ibm.co.k" exitnow ValidEmailCheck: declare emailstr local atcount 0 for i count strlen(@emailstr) c = strmid(@emailstr, @i, 1) if @c=="@"&&!@atcount inc atcount continue endif if strsearch("_%+-.0123456789",@c) continue if strupper(@c)==strlower(@c) failemail next domainstr = strleftright(@emailstr, strsearch(@emailstr, "@")+1) return ValidDomainCheck(@domainstr) failemail: return @FALSE ValidURLCheck: declare urlstr for i count strlen(@urlstr) c = strmid(@urlstr, @i, 1) if strsearch("-_.!~*'()a-zA-Z0-9;/?:@&=+$,%#0123456789",@c) continue if strupper(@c)==strlower(@c) failurl next urlstr = strlower(@urlstr) if strleft(@urlstr,4)=="www." else if strleft(@urlstr,7)=="http://" urlstr = strleftright(@urlstr, 8) else if strleft(@urlstr,8)=="https://" urlstr = strleftright(@urlstr, 9) else if strleft(@urlstr,6)=="ftp://" urlstr = strleftright(@urlstr, 7) else goto failurl endif domainstr = @urlstr if strsearch(@domainstr, "/") domainstr = strleft(@domainstr, strsearch(@urlstr, "/")-1) endif if strsearch(@domainstr, "@") domainstr = strleft(@domainstr, strsearch(@urlstr, "@")-1) endif if strsearch(@domainstr, ":") domainstr = strleft(@domainstr, strsearch(@urlstr, ":")-1) endif return ValidDomainCheck(@domainstr) failurl: return @FALSE ValidDomainCheck: declare domainstr if !strsearch(@domainstr, ".") faildomain if strleft(@domainstr,1)=="."||strright(@domainstr,1)=="." faildomain local anyletter @FALSE for i count strlen(@domainstr) c = strmid(@domainstr, @i, 1) if strsearch(".0123456789",@c) continue anyletter = @TRUE if strupper(@c)==strlower(@c) faildomain next if @anyletter domainsuffix = strlower(strleftright(@domainstr, strsearchreverse(@domainstr, ".")+1)) for i count strlen(@domainsuffix) c = strmid(@domainsuffix, @i, 1) if strupper(@c)==strlower(@c) faildomain next if strlen(@domainsuffix)<2 faildomain if strlen(@domainsuffix)>2 local domains array("com","org","net","gov","mil","biz","info","mobi","name","aero","jobs","museum") if !arraysearch(&domains, @domainsuffix)->size faildomain endif endif return @TRUE faildomain: return @FALSE ---------------------------------------------------------------------------- Mon, 08 September 2008 STRHTMLTAGS changed to return an array, not a list of seperate values. This is because the index of the array is the string position where each tag is found in the string. TAGLISTARRAY = STRHTMLTAGS(STRING, POSITION) The count for STRMID now defaults to 1 if none given, for example this routine checks a string to see if it's a valid email address: drawclear white color black messagebox ValidEmailCheck("john.hello@ibm.com") "john.hello@ibm.com" messagebox ValidEmailCheck("john.hello@ibm.coma") "john.hello@ibm.coma" messagebox ValidEmailCheck("john.hello@ibm.c1om") "john.hello@ibm.c1om" messagebox ValidEmailCheck("john.@hello@ibm.com") "john.@hello@ibm.com" messagebox ValidEmailCheck("john.@hello@ibm.co.uk") "john.@hello@ibm.co.uk" messagebox ValidEmailCheck("john.@hello@ibm.co.k") "john.@hello@ibm.co.k" exitnow ValidEmailCheck: declare emailstr local atcount 0 for i count strlen(@emailstr) c = strmid(@emailstr, @i) if @c=="@"&&!@atcount inc atcount continue endif if strsearch(".0123456789",@c) continue if strupper(@c)==strlower(@c) fail next domainstr = strleftright(@emailstr, strsearch(@emailstr, "@")+1) if !strsearch(@domainstr, ".") fail domainsuffix = strlower(strleftright(@domainstr, strsearchreverse(@domainstr, ".")+1)) for i count strlen(@domainsuffix) c = strmid(@domainsuffix, @i) if strupper(@c)==strlower(@c) fail next if strlen(@domainsuffix)<2 fail if strlen(@domainsuffix)>2 local domains array("com","org","net","gov","mil","biz","info","mobi","name","aero","jobs","museum") if !arraysearch(&domains, @domainsuffix)->size fail endif return @TRUE fail: return @FALSE ---------------------------------------------------------------------------- Wed, 20 August 2008 STRHTMLREPAIR and STRHTMLCLEAN now have one or more optional position options. SET RESULT STRHTMLREPAIR(STR) SETS RESULT NEWPOS1 STRHTMLREPAIR(STR, POS1) SETS RESULT NEWPOS1 NEWPOS2 STRHTMLREPAIR(STR, POS1, POS2) SET RESULT STRHTMLCLEAN(STR) SETS RESULT NEWPOS1 STRHTMLCLEAN(STR, POS1) SETS RESULT NEWPOS1 NEWPOS2 STRHTMLCLEAN(STR, POS1, POS2) POS is a string position from 1 to the length of STR Any number of string positions are supported (not just 1 or 2). Useful for tracking a position in a HTML string after it's been repaired or cleaned, for instance: rstr = "Hello There" rstrstart = strsearch(@rstr, "Hello") rstrend = strsearch(@rstr, "There")-1 sets rstr rstrstart rstrend strhtmlclean(@rstr, @rstrstart, @rstrend) messagebox @rstr strmidhtml(@rstr, @rstrstart, @rstrend-@rstrstart) ; shows "Hello" ---------------------------------------------------------------------------- Sun, 10 August 2008 Fixed several crashing bugs with IMAGEPUT and other image operations when DRAWOFFSET is set to coordinates outside valid coordinates. All the TEXTRECTS commands now have the RIGHT edge value stored at the start of the list corrected. It was too large, having the left position added to it twice by accident. DRAWLISTIMAGE has been expanded to have 3 more (optional) options. IMAGEBUF = DRAWLISTIMAGE(DRAWLIST) IMAGEBUF = DRAWLISTIMAGE(DRAWLIST, STARTPOS) IMAGEBUF = DRAWLISTIMAGE(DRAWLIST, STARTPOS, COUNT) IMAGEBUF = DRAWLISTIMAGE(DRAWLIST, STARTPOS, COUNT, COLOR) DRAWLIST is the array of rectangles, generally created by TEXTLINESRECTS. STARTPOS is the offset to start drawing from the list from, default is 1 COUNT is the number of RECTS to draw from the list, default is all. COLOR is a color to draw the RECTS in, default is to use index as color value. These options make it possible to use DRAWLISTIMAGE to create a mask used to show a selected body of text. For instance, something like this: drawclear white color black rectarray = textlinesrects("Hello There") rectimage = drawlistimage(rectarray, 2, 4, white) with drawxor on imageput rectimage wait New WHEN option "OTHER" used in the same circumstances as INSIDE and OUTSIDE. WHEN name MOUSE[DOWN|UP][1|2|3] OTHER It is triggered if no other defined whens are triggered by the MOUSEUP or MOUSEDOWN eventid. This is useful for handling the case where someone clicks outside all active hotspots or other WHEN INSIDE whens. ---------------------------------------------------------------------------- Thu, 07 August 2008 Three new commands, STRHTMLTAGS, STRHTMLREPAIR and STRHTMLCLEAN. STRHTMLCLEAR and STRHTMLREPAIR are still under development and do not work correctly yet. STRHTMLTAGS gives a list of active tags at that string position. It returns multiple values, so you would commonly use functions like ARRAY or STRLIST on the return values. TAGLIST = ARRAY(STRHTMLTAGS(STRING, POSITION)) For instance strhtmltags("
      Hello
      ",4) gives "b". Tags are converted to all lower case. STRHTMLREPAIR removes any duplicate/redundant tags, fixes mismatched trailing tags, and adds any missing trailing tags. REPAIRSTRING = STRHTMLREPAIR(STRING) For instance: strhtmlrepair("Hello") gives "Hello" strhtmlrepair("Hello") gives "Hello" strhtmlrepair("Hello") gives "Hello" strhtmlrepair("Hello") gives "Hello" strhtmlrepair("Hello There") gives "Hello There" strhtmlrepair("Hello There") gives "Hello There" STRHTMLCLEAN removes any meaningless tags. It does a STRHTMLREPAIR first to repair any problems. CLEANSTRING = STRHTMLCLEAN(STRING) For instance: strhtmlclean("Hello") gives "Hello" strhtmlclean("Hello") gives "Hello" strhtmlclean("Hello") gives "Hello" ---------------------------------------------------------------------------- Mon, 28 July 2008 Bug in FONTDEFINE and WINFONT which would give no character spacing with all characters run together fixed. It would only happen with very old or quirky fonts that did not support the GetCharABCWidths API call. Fixed some minor exceptions in FILEGETVARIABLES and a few other commands having to do with signed conversion of characters being passed to some library functions like isalnum(). ---------------------------------------------------------------------------- Wed, 16 July 2008 The VARIABLES debug dialog now has a "Expand LgArrays" checkbox which defaults to OFF. When OFF only the first four elements of any arrays are displayed in the VARIABLES dialog. This is because large arrays are so cumbersome to read in the variables display, they are not expanded to their full view unless you check this checkbox. ---------------------------------------------------------------------------- Mon, 14 July 2008 The VARIABLES debug dialog now has a input field, it's a wildcard match for variable names. It allows you to only show variables which match whatever string you type. Syntax is identical to wildcards in the FREE commands. You may need to use the REFRESH button to update the view. Bug in DRAWLISTLINEPREV and DRAWLISTLINENEXT which could crash if ROOTINDEX was out of bounds is fixed. ---------------------------------------------------------------------------- Thu, 10 July 2008 DRAWLISTLINEBEGIN and DRAWLISTLINEEND fixed at start and end of text. More error checking added to DRAWLISTEND DRAWLISTBEGIN DRAWLISTNEXT and DRAWLISTPREV. DRAWLISTLINENEXT and DRAWLISTLINEPREV now try to preserve the horizontal position. DRAWLISTLINENEXT and DRAWLISTLINEPREV now support an optional root index used to preserve the horizontal position from a root position. Useful for maintaining a relative position when arrowing serveral lines up or down at once. ARRAYINDEX = DRAWLISTLINENEXT(RECTARRAY, INDEX) ARRAYINDEX = DRAWLISTLINENEXT(RECTARRAY, INDEX, ROOTINDEX) ARRAYINDEX = DRAWLISTLINEPREV(RECTARRAY, INDEX) ARRAYINDEX = DRAWLISTLINEPREV(RECTARRAY, INDEX, ROOTINDEX) ---------------------------------------------------------------------------- Wed, 09 July 2008 The WHENTRIGGER command is now supported. It activates a WHEN even if the required action has not happened (keypress, mouse click, countdown timer or whatever). It supports wildcards like WHENENABLE and WHENDISABLE. DRAWLISTIMAGE now fills each rectangle to the edge of the image, this means there will be no pixels in the image that are not filled. DRAWLISTINSIDE now gives the next character position if the xpos/ypos is to the right of the center of a cell. This simulates the way text click/selection works in most GUIs, when clicking on a character, if you click on the left side, the cursor is placed before the character, if clicking on the right side, the cursor is placed after the character. DRAWLISTLINEBEGIN and DRAWLISTLINEEND now working. Crashing bug in TEXTSTRPOSITIONRECTS and TEXTLINESRECTS fixed. TEXT RECTS commands TEXTLINESRECTS, TEXTLINESRECTSFROM, TEXTSTRPOSITIONRECTS and TEXTSTRPOSITIONRECTSFROM have the RECTARRAY updated so that the left edge is no longer offset by a character. Coordinate fill code rewritten to fix multiple problems like this. ---------------------------------------------------------------------------- Mon, 07 July 2008 New command to help with DRAWLISTS, DRAWLISTIMAGE. It returns an image created as large as the DRAWLIST area. It's 32bits per pixel filled with rectangles for each item in the list. The color of each rectangle is the position in DRAWLIST (with 1 being the first). This allows instant translation from coordiantes into DRAWLIST position (and thereby string position). RECTARRAY = TEXTLINESRECTS(TEXTSTRING) RECTIMAGE = DRAWLISTIMAGE(RECTARRAY) STRINGPOSITION = IMAGECOLORGET(RECTIMAGE,@XPOS,@YPOS) TEXT RECTS commands TEXTLINESRECTS, TEXTLINESRECTSFROM, TEXTSTRPOSITIONRECTS and TEXTSTRPOSITIONRECTSFROM have the RECTARRAY updated so that it now has the full width of each character cell including any gap between characters. ---------------------------------------------------------------------------- Wed, 02 July 2008 Bug recently introduced in the size of a space character in newly defined fonts created with WINFONT or created with the "" tag. The space size was zero (no spacing at all), fixed. Added two new commands CLIPBOARDGETTEXTRTF and CLIPBOARDPUTTEXTRTF, they work exactly like the CLIPBOARDGETTEXT and CLIPBOARDPUTTEXT commands except they operate on RTF formatted text. Simple example: drawclear white set texthtml on text "" text strrtftohtml(clipboardgettextrtf()) wait exitnow ---------------------------------------------------------------------------- Tue, 01 July 2008 ERRORLOAD OFF was not working for missing files, fixed. Fixed some mismatched declarations for AGIMAGE vs LPAGIMAGE which were causing some odd debug issues. ---------------------------------------------------------------------------- Mon, 30 June 2008 IMAGEPUT with a DRAWREGION outside a DRAWOFFSET was drawing outside the DRAWOFFSET area, fixed. MEMSCAN commands, FILEPUTCHARIABLES, FILEPUTARRAY and FILEPUTARRAYNAMED commands updated for 64bits. Internal source update, all TOKEN pointers now use a new LP type, same with AGMEASURE. ---------------------------------------------------------------------------- Sun, 29 June 2008 All the coordinate elements are now compatible with DRAWOFFSET (they adjust for it). ->X1 ->Y1 ->X2 ->Y2 ->XPOS ->YPOS ->LEFT ->TOP ->RIGHT ->BOTTOM All the X and Y based elements now support measurements and percentages when being set. ---------------------------------------------------------------------------- Sat, 28 June 2008 All the coordinate/size elements now support HOTSPOTs and WHENs ->X1 ->Y1 ->X2 ->Y2 ->SIZEX ->SIZEY ->XPOS ->YPOS ->LEFT ->TOP ->RIGHT ->BOTTOM ---------------------------------------------------------------------------- Thu, 26 June 2008 Bug in low level font width calculations that was accidently trying to calculate the width of control characters like linefeed strchr(10). FONTSTYLE ANTI OFF now works (previously the only way to turn off font anti-aliasing was with FONTSTYLE INIT). FONTSTYLE ANTI when enabled no longer messes up WINFONT. Previously it would create huge 8x larger letters all run together overlapping. Strange spacing and screenupdate problems for WINFONT defined fonts when using characters between 128 and 255. Several strange bugs when using characters between 128 and 255 in fonts created with FONTDEFINE are fixed. This includes blank missing characters, incorrect spacing, and small black marks instead of characters. ---------------------------------------------------------------------------- Mon, 23 June 2008 The VARREFERENCE command used on an array with a non-existant zero index was broken. This showed up when trying to access part of a loaded XML with only a single value. Here is an example that failed in previous builds: drawclear white a[hello]{red} = one messagebox strlist(arrayattrib(&a[hello])) ; displays red messagebox strlist(arrayattrib(&a[hello][0])) ; should display red (wasn't) exitnow ---------------------------------------------------------------------------- Thu, 19 June 2008 AGCOMP Modular now correctly handles SET WINDOWUPDATE, it needed to call the WINDOWUPDATE command (variable and command are identical). AGCOMP Modular now directly references LIBCMT.LIB and OLDNAMES.LIB to eliminate lib path problems(linker could not always find libraries). ---------------------------------------------------------------------------- Mon, 16 June 2008 The ->SIZE element was not working with array subindexes and arrays passed by address. For example: messagebox array(a,b,c)->size ; was displaying 0, should be 3 a[0][0] = x a[0][1] = y messagebox a[0]->size ; was displaying 0, should be 2 Some small performance optimizations made when accessing arrays, some unused parameters being passed around were eliminated. This also simplified a large number of array reference calls (making the code simpler). ---------------------------------------------------------------------------- Sun, 15 June 2008 New setable global option TEXTHTMLSPACES, default is OFF: SET TEXTHTMLSPACES ON SET TEXTHTMLSPACES OFF When ON, extra space characters are drawn, for instance: drawclear white set texthtml on text "" text "a b" ; displays a b set texthtmlspaces on text "a b" ; displays a b wait ---------------------------------------------------------------------------- Tue, 10 June 2008 A new function, STRRTFTOHTML. Takes a RTF string, and returns a HTML one. Only BOLD, ITALIC, UNDERLINE and LINEBREAK tags are supported at this time. Two new commands ARRAYINDEX0 and ARRAYATTRIB0, they functions exactly the same as ARRAYINDEX and ARRAYATTRIB except that it will return a single "0" result when there are no numeric indexes. This is mainly for use when reading XML files, for example: drawclear white set texthtml on text "" set textwrap off set texthtml off aexample[fred][0][zed] = a aexample[fred][1][zed] = b aexample[fred][2][zed] = c bexample[fred][zed] = z textln strlist(arrayindex(&aexample[fred])) ; shows 0 1 2 textln strlist(arrayindex0(&aexample[fred])) ; shows 0 1 2 textln strlist(arrayindex(&bexample[fred])) ; shows zed textln strlist(arrayindex0(&bexample[fred])) ; shows 0 wait exitnow ---------------------------------------------------------------------------- Mon, 02 June 2008 AGCOMP Modular compiler now includes the APPSHELL (required for MAILTO: links) and NETOPENWEBPAGE (required for HTTP: links) commands if HTMLLINK is ON. ---------------------------------------------------------------------------- Fri, 30 May 2008 Problem with FONTSTYLE messing up a previously defined font with FONTDEFINE that had not been used is fixed. ASCII 0 was being treated as a chracter with an actual width, this was messing up bullets and other indented text. Fixed (was broken in 22 May 2008 onward). ---------------------------------------------------------------------------- Thu, 29 May 2008 Problem with font settings not "sticking" fixed. This showed up as FONTSTYLE ALLVARIATIONS not working. This also showed up when defining fonts and saving them. Bug recently introduced in AGCOMP which kept LAYER FILTER from working is fixed. ---------------------------------------------------------------------------- Wed, 28 May 2008 Bullet points and any use of   was broken since the May 7th build. Fixed. ---------------------------------------------------------------------------- Tue, 27 May 2008 Size of SPACE character in new fonts defined with WINFONT or FONTDEFINE is fixed. Problem with character spacing when using multiple size Unicode fonts defined with WINFONT at once is fixed. ---------------------------------------------------------------------------- Sun, 25 May 2008 AGCOMP 32bit, and non-BHO builds of AGPLAY now use the NEDMALLOC memory allocation routines to reduce fragmentation, and speed up virtually all routines. You can find more on NEDMALLOC here: http://www.nedprod.com/programs/portable/nedmalloc/index.html I originally was interested in JEMALLOC since it's being used in the next FIREFOX release, and has made substantial improvements to FIREFOX's memory overhead and performance. But NEDMALLOC was much simpler to integrate at this point. FONTLOAD with GLPRO style GLF fonts now works (it was creating blank character sets). FONTSAVE/FONTLOAD with AGF4 (latest format with Unicode index) now working. ---------------------------------------------------------------------------- Thu, 22 May 2008 More error checking added as part of a diagnostic including rewriting part of the AVL trees template used in several parts of AG. EXTREME changes to all font load, save and draw code to support unicode fonts. Previously Unicode was only functional in a very limited way with no anti-aliasing, saved fonts or bitmap font support. It really was really only for printing, and in fact was broken in recent builds. Because FONTLOAD and FONTSAVE have been completely rewritten, expect bugs. In particular the loading of older font formats, GLF from GLPRO, and AGF (variations 0, 1, 2 and 3) had to be rewritten. FONTSAVE and FONTSAVECOMPRESSED now produce a AGF type 4 font which has a variable size font widths table, and a index of which character bitmaps are included. FONTSAVE and FONTSAVECOMPRESSED now use the same underlying code (the old fontsave was so simple it wasn't worth making a more generalized version). This AGF type 4 font will only load in this and future builds of AfterGRASP. Known issues in this copy include overly large space character sizing. Example of Unicode text: windowsize 1000 800 32 drawclear white color black ; set texthtmlwinfont on ; set texthtmlantifont off fontstyle init 512 set texthtml on text "şi Oferă consultanţă tehnică şi o gamă variată de sigilanţi şi." wait exitnow ---------------------------------------------------------------------------- Thu, 08 May 2008 STRFORMATNUMBER now uses this format string for "Standard" "###,###,###,###,###.00" XMLLOAD handling of HTML tags (any section with a HTML only namespace) is fixed, it was only doing the child, not the actual node. Showed up when loading Excel XML spreadsheets with html tagged text. Fixed Crashing bug in FILEPUTVARIABLES when FILESTRINGALWAYS is enabled, and variable has a NULL value. ---------------------------------------------------------------------------- Wed, 07 May 2008 XMLLOAD now encodes non-ascii characters using HTML encoding. TEXTHTML now supports a more complete set of special character names including "–". ---------------------------------------------------------------------------- Fri, 02 May 2008 Minor changes to INPUT code, use of input objects directly is now allowed by all INPUT commands (useful for arrays of input). Small bug in INPUT related to reuse of string objects fixed, could have causes strange problem with input fields having text changed. ---------------------------------------------------------------------------- Wed, 30 April 2008 MEMNEW fixed to allow creating zero length memory buffers. New system variable, FILESTRINGALWAYS which affects the FILEPUTVARIABLES command. The default is for FILEPUTVARIABLES to not include the quote string around variable values which do not require it. If FILESTRINGALWAYS is set to ON/TRUE, then the quote string will always be used. SET FILESTRINGALWAYS ON SET FILESTRINGALWAYS OFF Example: drawclear red a = 1 b = 2 c = 3 d = "Hello there" set filestringalways on memnew teston fileputvariables mem:teston a b c d set filestringalways off memnew testoff fileputvariables mem:testoff a b c d with texthtml on text "" color white set textwrap off textln "ON" textln @@teston textln textln "OFF" textln @@testoff set variables on wait exitnow ---------------------------------------------------------------------------- Tue, 29 April 2008 New command INPUTUPDATEVAR, used to force an active input to store any edit results into the input variable. Useful for showing complex form results/preview without ended all the active inputs. Passed one or more active inputs. INPUTUPDATEVAR INPUTNAME ... ---------------------------------------------------------------------------- Mon, 28 April 2008 @DRAWOFFX and @DRAWOFFY fixed to match @DRAWOFFMINX and @DRAWOFFMINY STRLINECOUNT was not handling strings with trailing NULL characters correctly, it was returning a count one less than the correct value. STRSORT was including extra NULL characters at the end of the result, sometimes a single NULL, sometimes 3 NULL characters. Fixed. FILEPUTVARIABLES now supports wildcard variable names. FILEPUTVARIABLES now supports filehandles as well as filenames, so you can do this: drawclear white set a 1 b 2 c 3 x 99 y 98 z 97 hello xx goodbye yy fileputvariables test.ini hello goodbye fs = fileappend(test.ini) fileseek @fs 0 2 fileputvariables @fs a b c fileputvariables @fs x y z fileclose @fs messagebox fileget(test.ini) exitnow ---------------------------------------------------------------------------- Wed, 23 April 2008 SET DRAWMINX, DRAWMINY, DRAWMAXX and DRAWMAXY were broken. HOTSPOT command now supports measurements. HOTSPOT command now supports DRAWOFFSET. All the anti-aliased drawing commands now support DRAWOFFSET. These fixes particularly affect these commands which were completely incompatible with DRAWOFFSET: DRAWANTIBOX DRAWANTIBOXROUND DRAWANTICIRCLE DRAWANTICIRLCEFILLED DRAWANTIRECT DRAWANTIRECTROUND ---------------------------------------------------------------------------- Thu, 17 April 2008 Use of Rectangle to draw fill rectangles replaced with FillRect which is faster. ---------------------------------------------------------------------------- Fri, 11 April 2008 Small change in STRFORMATNUMBER on the handling of ',' with trailing digits. ---------------------------------------------------------------------------- Thu, 10 April 2008 Fixed bug in STRFORMATTIME not correctly handling time formats. Simple test example of STRFORMATDATETIME: drawclear red color white set texthtml on text "" textln strformatdatetime("Short Date",@date,0) textln strformatdatetime("Short Time",0,@time) textln strformatdatetime("Long Date",@date,0) textln strformatdatetime("Long Time",0,@time) textln strformatdatetime("General",@date,@time) textln strformatdatetime("HHmmss",0,@time) textln strformatdatetime("yyyyMMdd",@date,0) wait exitnow Simple test example of STRFORMATNUMBER: windowsize 1000 700 drawclear red color white set texthtml on text "" set texthtml off testformat "General" testformat "#" testformat "#.#;[red]#.#" testformat ".#" testformat "#.##" testformat "#.####" testformat "000.0000" testformat "000,000" testformat "#,000" wait exitnow testformat: declare formatstr text @quote$@formatstr$@quote textln 400 @textposy " -1234.567 "$strformatnumber(@formatstr, -1234.567) text @quote$@formatstr$@quote textln 400 @textposy " 99.8 "$strformatnumber(@formatstr, 99.8) return ---------------------------------------------------------------------------- Wed, 09 April 2008 The AppMutex for AGPLAY.EXE is now only created when the standalone runtime is running as AGPLAY.EXE. When part of a built EXE, the Mutex is no longer created. This fixes the problem where the AG install would fail if any apps created with AG are running. ---------------------------------------------------------------------------- Tue, 08 April 2008 Severe bug in FILEICONSET which was failing badly when using an ICON with more than 1 image. Fixed. Two new commands, STRFORMATDATETIME and STRFORMATNUMBER. Both use EXCEL style formatting strings. Neither is complete and will be ehanced over time. STRFORMATNUMBER is particular still needs work for some basic functionality. I'm uploading this new build now to document the new commands, and get the FILEICONSET bug fix uploaded. STRRESULT = STRFORMATDATETIME(DATEFORMATSTR, DATE, TIME) STRRESULT = STRFORMATDATETIME(DATEFORMATSTR, DATETIMESTR) DATEFORMATSTR can be either a fixed name, or a Excel style date format string: "General" "General Date" "Long Date" "Long Time" "Medium Date" "Medium Time" "Short Date" "Short Time" "Standard" The style string supports these options, you cannot mix date and time options in the same format string, results will be unpredictable since STRFORMATDATETIME uses the GetDateFormat and GetTimeFormat WIN32 API calls. d Day of month as digits with no leading zero for single-digit days. dd Day of month as digits with leading zero for single-digit days. ddd Day of week as a three-letter abbreviation. dddd Day of week as its full name. M Month as digits with no leading zero for single-digit months. MM Month as digits with leading zero for single-digit months. MMM Month as a three-letter abbreviation. MMMM Month as its full name. y Year as last two digits, but with no leading zero for years less than 10. yy Year as last two digits, but with leading zero for years less than 10. yyyy Year represented by full four digits. gg Period/era string. h Hours with no leading zero for single-digit hours; 12-hour clock. hh Hours with leading zero for single-digit hours; 12-hour clock. H Hours with no leading zero for single-digit hours; 24-hour clock. HH Hours with leading zero for single-digit hours; 24-hour clock. m Minutes with no leading zero for single-digit minutes. mm Minutes with leading zero for single-digit minutes. s Seconds with no leading zero for single-digit seconds. ss Seconds with leading zero for single-digit seconds. t One character time-marker string, such as A or P. tt Multicharacter time-marker string, such as AM or PM. DATE and TIME are standard AG date and time values, yyyyMMdd and HHMMSS. Such as 20080403 and 221605. DATETIMESTR is a Excel format datetime string YYYY-MM-DDTHH:MM:SS. such as "2008-04-03T00:00:00.000" STRRESULT = STRFORMATNUMBER(NUMBERFORMATSTR, NUMBER) NUMBERFORMATSTR can be either a fixed name, or an Excel style number format string. Conditionals are not supported. "Currency" "Euro Currency" "Fixed" "General" "General Number" "Percent" "Scientific" "Standard" The style string supports these options: 0 Digit placeholder. This code pads the value with zeros to fill the format. # Digit placeholder. This code does not display extra zeros. ? Digit placeholder. This code leaves a space for insignificant zeros but does not display them. . Decimal number. % Percentage. Multiplies by 100 and adds the % character. , Thousands separator. A comma followed by a placeholder scales the number by a thousand. $ - + / ( ) : space These characters are displayed in the number. To display any other character, enclose the character in quotation marks or precede it with a backslash. \character This code displays the character you specify. _ This code skips the width of the next character. This code is commonly used as "_)" (without the quotation marks) to leave space for a closing parenthesis in a positive number format when the negative number format includes parentheses. This allows the values to line up at the decimal point. @ Text placeholder. "text" This code displays text. * This code repeats the next character in the format to fill the column width. Only one asterisk per section of a format is allowed. ---------------------------------------------------------------------------- Wed, 02 April 2008 Long standing bug in Postscript printing detection fixed. Was related to using a different function for detection and injection detect. Bug in combinting link regions created with
      tags fixed. It was creating multiple hotspots or PDFMARK links which could cause problems, particular for some Postscript interpreters. Some small refinements to date/time routines. XML array write reference code updated. It takes a array and a filename, and writes a standard XML file (although a big sparse with excessive whitespace). Here is the updated example: XMLwrite: declare a fname filedelete @fname filesendln @fname "" filesendln @fname local depth -1 writeone &a a->root "" filesendln @fname return FixXmlStr: declare s return strreplace(@s, "¦","¦") FixXmlQuotes: declare s return strreplace(@s, @quote, """, "<", "<", ">", ">") writeattrib: declare a depth local result "" local list strlist(arrayattrib(a)) strsort list strsort "#" list for j in @list result = @result$strrepeat(@depth,strchr(9))$@j$"="$@quote$FixXmlQuotes(@a{@j})$@quote$@crlf next return strleft(@result, strlen(@result)-2) writeone: declare a j parent if @j==strpad0(@j+0,0) ; if number local name @parent local indentdepth @depth-1 else local name @j local indentdepth @depth endif if a->dim1==0 filesendln @fname strrepeat(@indentdepth,strchr(9))$"<"$@name$">" filesendln @fname strrepeat(@indentdepth,strchr(9))$@a filesendln @fname strrepeat(@indentdepth,strchr(9))$""$@crlf return endif local attribcount array(arrayattrib(&a))->dim1 local aidx array(arrayindex(&a)) local indexcount aidx->dim1 if @attribcount filesendln @fname strrepeat(@indentdepth,strchr(9))$"<"$@name filesend @fname FixXmlStr(writeattrib(&a,@indentdepth+1)) if @indexcount filesendln @fname ">" if @indentdepth<0 filesendln @fname endif writewalk &a @indentdepth+1 @name filesendln @fname strrepeat(@indentdepth,strchr(9))$""$@crlf else filesendln @fname " />"$@crlf endif else if @indexcount local firstindex @aidx[0] local isnumber @firstindex==strpad0(@firstindex+0,0) ; if number if !@isnumber filesendln @fname strrepeat(@indentdepth,strchr(9))$"<"$@name$">" endif writewalk &a @indentdepth+1 @name if !@isnumber filesendln @fname strrepeat(@indentdepth,strchr(9))$""$@crlf endif else filesendln @fname strrepeat(@indentdepth,strchr(9))$"<"$@name$" />" endif endif return writewalk: declare a depth parent for j inarray array(arrayindex(a)) writeone &a[@j] @j @parent next return ---------------------------------------------------------------------------- Thu, 27 March 2008 Update yesterday for XMLLOAD was not inserting the HTML parsed content at the correct array depth. Fixed. Bug in internal ArrayAdd which would created corrupt array index values when adding to arrays with non-numeric index values is fixed. Bug in XMLLoad which could create incorrect attribute array indexes fixed. ---------------------------------------------------------------------------- Wed, 26 March 2008 New code in XMLLOAD which looks for use of a HTML namespace, if used then the tags are built into any content. It identifies that it is an HTML namespace by looking for the letters "html" without a period in the XML NameSpace URL. For instance, Microsoft when saving Excel XML spreadsheets uses the URL "http://www.w3.org/TR/REC-html40". An crude example of what it did before, vs now: New C30 Car Previously, this would have been loaded as test["Data"][0] = "New " test["Data"][1]["B"] = "C30" test["Data"][2] = " Car" Now it's loaded as: test["Data"] = "New C30 Car" This code required some modification to the LIBXML2 library (to expose the Node writing function, and call it), which will reduce the likelyhood (or at least frequency) of future updates to the LIBXML2 source code used in AfterGRASP. ---------------------------------------------------------------------------- Tue, 25 March 2008 LAYER TO and LAYER CURVE were both broken recently, the X coordinate was lost. Fixed. ---------------------------------------------------------------------------- Thu, 20 March 2008 INPUT commands were not handling high-ascii characters like £, fixed. Keyboard input was not allowing high-ascii characters to be entered via the numeric keypad and alt key. Fixed. This means alt-end, alt-home, alt-pgup, alt-pgdn, alt-up, alt-down, alt-right, alt-left are no longer allowed. Direct keyboard input on non-USA keyboards of high-ascii characters was sometimes wrong, fixed. Command name change, text commands previously listed as XY are now RECTS, they return an array of boxes with LEFT, TOP, RIGHT, BOTTOM. All the DRAWLIST commands now expect an array of RECTs, not an XY array. Why do the TEXT RECTS commands return a flat array, and DRAWLIST commands expect a flat array? Design limits of AfterGRASP make is a poor idea to create large numbers of 2 dimensional arrays, or arrays of thousands of seperate objects (I looked into using a built in type, RECT). So I've abandoned all the code I was researching, and I'm sticking with a simple single dimensional array of integers. Four elements per character position. I realize this makes for ugly direct access to individual coordinates (having to multiply the string position by 4). The next update may switch this to using a memory buffer (like that created with MEMNEW) since it will be smaller, faster and slightly easier to use. Over time I expect all this to grow into some new functions for rich text editing that will be painless to use. Some assorted new functions used for internal testing only: AREAITEM = TOAREA(X1, Y1, X2, Y2) RECTITEM = TORECT(LEFT, TOP, RIGHT, BOTTOM) ->BOTTOM ->LEFT ->RIGHT ->TOP ->XPOS ->YPOS ---------------------------------------------------------------------------- Tue, 18 March 2008 New commands TEXTLINESRECTSFROM and TEXTSTRPOSITIONRECTSFROM. They are identical to TEXTLINESFROM and TEXTSTRPOSITIONFROM except they also return a character XY position array exactly like TEXTLINESRECTS and TEXTSTRPOSITIONRECTS. The XY positions in the result are relative to the current drawregion. This makes the results identical to those provided by TEXTLINESRECTS and TEXTSTRPOSITIONRECTS which have no idea of window coordinates since they do not draw anything, just calculate text positions relative to a starting point of 0,0. RECTARRAY = TEXTLINESRECTSFROM(TEXTSTRING, STARTLINE) RECTARRAY = TEXTLINESRECTSFROM(TEXTSTRING, STARTLINE, LINECOUNT) RECTARRAY = TEXTSTRPOSITIONRECTSFROM(TEXTSTRING, STARTSTRPOSITION) RECTARRAY = TEXTSTRPOSITIONRECTSFROM(TEXTSTRING, STARTSTRPOSITION, ENDSTRPOSITION) ---------------------------------------------------------------------------- Mon, 17 March 2008 Crashing bugs in XMLSAVE fixed, but it still does not write changes made to the loaded data. Many new commands TEXTLINESRECTS, TEXTSTRPOSITIONRECTS, DRAWLISTINSIDE, DRAWLISTBEGIN, DRAWLISTEND, DRAWLISTNEXT, DRAWLISTPREV, DRAWLISTLINEBEGIN, DRAWLISTLINEEND, DRAWLISTLINENEXT, DRAWLISTLINEPREV, ARRAYINSERT and ARRAYDELETE. ARRAYINSERT and ARRAYDELETE are for numericly indexed arrays only. Insert is used to insert new members into an array, renumbering upward members which follow. Delete to remove members, and renumber downward members which follow. ARRAYINSERT ARRAY START INSERTCOUNT ARRAYINSERT ARRAY START INSERTARRAY ARRAYDELETE ARRAY START DELETECOUNT INSERTCOUNT and DELETECOUNT both default to 1. Runable Example: drawclear test = array(a,b,c,d) arrayinsert test 2 3 test[2] = x test[3] = y test[4] = z arraydelete test 3 arrayinsert test 3 array(i,j,k) messagebox strlist(@test) ; displays a, x, i, j, k, z, b, c, d exitnow TEXTLINESRECTS and TEXTSTRPOSITIONRECTS work like TEXTLINESHEIGHT and TEXTSTRPOSITIONHEIGHT in that they calculate spacing. But instead of returning height, they return an array of X Y positions, one coordinate for every character in the TEXTSTRING. The first two elements in the array are reserved for the width/height of the text area. Each pair of integer elements which follow are the X, Y coordinates. RECTARRAY = TEXTLINESRECTS(TEXTSTRING, WIDTH, STARTLINE) RECTARRAY = TEXTLINESRECTS(TEXTSTRING, WIDTH, STARTLINE, LINECOUNT) RECTARRAY = TEXTSTRPOSITIONRECTS(TEXTSTRING, WIDTH, STRPOSITION) RECTARRAY = TEXTSTRPOSITIONRECTS(TEXTSTRING, WIDTH, STRPOSITION, ENDSTRPOSITION) DRAWLISTINSIDE works a little like DRAWINSIDE, but it is given a array of coordinates, and a region. It returns the index of which is the first coordinate pair that is the upper left hand corner of a box which contains the coordinate. DRAWLISTINSIDE returns 0 for no match. This is most useful for determining which character someone clicked on in a block of complexly formatted text. ARRAYINDEX = DRAWLISTINSIDE(RECTARRAY, XPOS, YPOS) ARRAYINDEX = DRAWLISTINSIDE(RECTARRAY, XPOS, YPOS, MINX, MINY, MAXX, MAXY) DRAWLISTBEGIN searches backward from INDEX for the first coordinate identical to the coordinate at INDEX. DRAWLISTEND finds the last coordinate identical to the coordinate at INDEX. ARRAYINDEX = DRAWLISTBEGIN(RECTARRAY, INDEX) ARRAYINDEX = DRAWLISTEND(RECTARRAY, INDEX) The code for both is the same as this script code: drawlistbegin: declare index index = @index*4 local xpos @RECTARRAY[@index] local ypos @RECTARRAY[@index+1] local result @index/4 for i from @index-4 to 4 step -4 if (@xpos==@RECTARRAY[@i])&&(@ypos==@RECTARRAY[@i+1]) local result @i/4 endif next return @result drawlistend: declare index index = @index*4 local xpos @RECTARRAY[@index] local ypos @RECTARRAY[@index+1] local result @index/4 for i from @index+4 to @RECTARRAY->dim1-4 step 4 if (@xpos==@RECTARRAY[@i])&&(@ypos==@RECTARRAY[@i+1]) local result @i/4 endif next return @result DRAWLISTPREV searches backward from INDEX for the first coordinate different from the coordinate at INDEX. DRAWLISTNEXT finds the next coordinate different from the coordinate at INDEX. ARRAYINDEX = DRAWLISTPREV(RECTARRAY, INDEX) ARRAYINDEX = DRAWLISTNEXT(RECTARRAY, INDEX) The code for both is the same as this script code: drawlistprev: declare index index = @index*4 local xpos @RECTARRAY[@index] local ypos @RECTARRAY[@index+1] local result 1 for i from @index-4 to 4 step -4 if (@xpos!=@RECTARRAY[@i])||(@ypos!=@RECTARRAY[@i+1]) local result @i/4 break endif next return @result drawlistnext: declare index index = @index*4 local xpos @RECTARRAY[@index] local ypos @RECTARRAY[@index+1] local result @RECTARRAY->dim1/4 for i from @index+4 to @RECTARRAY->dim1-4 step 4 if (@xpos!=@RECTARRAY[@i])||(@ypos!=@RECTARRAY[@i+1]) local result @i/4 break endif next return @result DRAWLISTLINENEXT searches RECTARRAY for next index which changes Y position down, but has the same X position. If Y changes again, use furthest right X. DRAWLISTLINEPREV searches RECTARRAY for previous index which changes Y position up, but has the same X position. If Y changes again, use furthest right X. ARRAYINDEX = DRAWLISTLINENEXT(RECTARRAY, INDEX) ARRAYINDEX = DRAWLISTLINEPREV(RECTARRAY, INDEX) DRAWLISTLINEBEGIN searches RECTARRAY for start of line. DRAWLISTLINEEND searches RECTARRAY for end of current line. ARRAYINDEX = DRAWLISTLINEBEGIN(RECTARRAY, INDEX) ARRAYINDEX = DRAWLISTLINEEND(RECTARRAY, INDEX) Notes on use for cursor keys: Left arrow does DRAWLISTNEXT Right arrow does DRAWLISTPREV Down arrow does DRAWLISTLINENEXT Up arrow does DRAWLISTLINEPREV Home does DRAWLISTLINEBEGIN End does DRAWLISTLINEEND Selecting a block of text, DRAWLISTBEGIN on start, and DRAWLISTEND on selection end. ---------------------------------------------------------------------------- Sat, 08 March 2008 In AfterGRASP.iss setup script this Mutex check added: AppMutex=AfterGRASP,Global\AfterGRASP In IEAfterGRASP.iss setup script this Mutex check added: AppMutex=IEAfterGRASP,Global\IEAfterGRASP Custom image files removed from IEAfterGRASP setup since they are no longer used/displayed. ---------------------------------------------------------------------------- Fri, 07 March 2008 AfterGRASP and IEAfterGRASP now create a AppMutex useful to detect if they are already running for Setup scripts. ---------------------------------------------------------------------------- Tue, 04 March 2008 Crashing bug in FILECOPY when the destination filename is NULL is fixed. HTTP POSTFILE has some more error checking added. ---------------------------------------------------------------------------- Wed, 27 February 2008 Bug in modular compiler not linking because of FLOAT function, and new alpha blending code, fixed. Flaw in AGCOMP compiler designed which would combine CALL and POP commands into a single token is fixed. This could cause subroutines which return a value to have that value accumulate on the parameter stack, or other odd bugs. The interpreter still supports the CALLPOP token to allow older compiled scripts to run, but AGCOMP no longer generates it. Fixed Bug in ARRAYINDEX and ARRAYATTRIB, when used on a non-array variable it was providing the variable contents instead of an no result (empty). Example of the bug: drawclear white hello = 1 for n inarray array(arrayindex(hello)) messagebox "ERROR" next exitnow ---------------------------------------------------------------------------- Sun, 24 February 2008 New functions to directly force conversions: FLOATRESULT = FLOAT(VALUE) FLOATRESULT = FLOATCOORDINATEX(XVALUE) FLOATRESULT = FLOATCOORDINATEX2(X1VALUE, X2VALUE) FLOATRESULT = FLOATCOORDINATEY(YVALUE) FLOATRESULT = FLOATCOORDINATEY2(Y1VALUE, Y2VALUE) FLOATRESULT = FLOATNUMBERX(XVALUE) FLOATRESULT = FLOATNUMBERY(YVALUE) INTRESULT = INTCOORDINATEX(XVALUE) INTRESULT = INTCOORDINATEX2(X1VALUE, X2VALUE) INTRESULT = INTCOORDINATEY(YVALUE) INTRESULT = INTCOORDINATEY2(Y1VALUE, Y2VALUE) INTRESULT = INTNUMBERX(XVALUE) INTRESULT = INTNUMBERY(YVALUE) FLOAT(v) is the simplist, it's basically the same as adding 0.0 to force a value to be floating point. The COORDINATEX and COORDINATEY functions convert a value to integer/float number with understanding of measurements and left/right/top/bottom/center values. The COORDINATEX2 and COORDINATEY2 functions handle size measurements like: x2 = intcoordinatex2(50,(10pct)sizex) NUMBERX and NUMBERY are for values that are not coordinates, generally sizes of things like the height of a font, or thickness of a box. Normally these conversions are done by AfterGRASP internally and you wouldn't need any of these functions (except FLOAT() which is generally useful). But in a few special cases I've found them needed. I also did a internal code cleanup to remove direct references to GetXCoordinate2 and GetYCoordinate2. A handy example of how to read a Excel XML spreadsheet: drawclear white windowsize 1280 720 set texthtml on text "" xmlload sortres.xml test for j inarray array(arrayindex(test["Worksheet"]["Table"]["Row"])) for n inarray array(arrayindex(test["Worksheet"]["Table"]["Row"][@j]["Cell"])) text @test["Worksheet"]["Table"]["Row"][@j]["Cell"][@n]["Data"] text "," next textln next set variables on wait exitnow WHEN INSIDE and WHEN OUTSIDE now handle SIZE measurements (for X2 and Y2). ---------------------------------------------------------------------------- Tue, 19 February 2008 The FILEPUTARRAY and FILEPUTARRAYNAMED commands were not putting quotes around text which did not have a comma, but did cross lines. It now puts quotes around text with any control character including CR, LF and TAB. Code example/documentation on arrays: Given a CSV file where one of the fields looks like "Collection:19/04/2008", sort the CSV and write it back out. drawclear white set texthtml on text "" textln "starting" ; Read the csv into an array global newres filegetarray("newres.csv") global res0 strlist(@newres[0]) ; Searche for which field is the collections field global collections strlinenumber(@res0,strsearch(@res0, "Collection:"))-1 for i inarray array(arrayindex(newres)) cdate = strreplace(@newres[@i][@collections], "Collection:", "") ; Parses the date lpos = strsearch(@cdate, "/") rpos = strsearchreverse(@cdate, "/") cday = strleft(@cdate,@lpos-1) cmonth = strleft(strleftright(@cdate,@lpos+1), (@rpos-@lpos)-1)*100 cyear = strleftright(@cdate,@rpos+1)*10000 ; Create a YYYYMMDDIIIIII index cdate = (@cyear+@cmonth+@cday)*100000+@i resindex[@cdate] = @i next count = 0 ; Create an array sorted on that YYYYMMDDIIIII index for i inarray array(arrayindex(resindex)) sortres[@count] = &newres[@resindex[@i]] inc count next count = resindex->size ; Create an array sorted in reverse on that same YYYYMMDDIIIII index for i inarray array(arrayindex(resindex)) dec count reversesortres[@count] = &newres[@resindex[@i]] next ; resindex is no longer needed at this point and can be freed free resindex fileputarray sortres.csv sortres textln "done" set variables on wait exitnow ---------------------------- AfterGRASP supports what are called sparse arrays, so you can do this: a[10] = a a[50] = b a[2000] = c This array has only 3 items in it. If you did strlist(arrayindex(a)) you would get 10 50 2000 If you did for i inarray array(arrayindex(a)) textln @a[@i] next you would get a b c So if you do a[2008012300001] = 1 a[2007010100002] = 2 a[2008012200003] = 3 You would get strlist(arrayindex(a)) displaying 2007010100003 2008012200002 2008012300001 if you did this loop to the date indexed array for i inarray array(arrayindex(a)) textln @a[@i] next you would get 3 2 1 What is the difference between array(arrayindex(a)) and strlist(arrayindex(a)) ? array(arrayindex(a)) returns an array, for example: global hello array(arrayindex(a)) textln @hello[2] strlist(arrayindex(a)) returns a string, where each item is seperated by a CR LF In the example above, you could use for i in strlist(arrayindex(a)) but it's less efficient, and forces everything to be converted to a string and back to a number multiple times. Using for i inarray array(arrayindex(a)) leaves everything as a number leaving out all the string conversions and string searches. ---------------------------------------------------------------------------- Mon, 04 February 2008 IMAGECOMPRESSED ON with RGB JPEG images now works on PostScript printers. ---------------------------------------------------------------------------- Thu, 31 January 2008 IMAGEALPHA with IMAGEPUT is now over double the speed as in the past. The performance different is only on successive IMAGEPUTs. The first IMAGEPUT is slower because it generates a premultiplied copy of the image with all RGB values multipied by alpha as is required by the windows AlphaBlend API call. This new code is only enabled when IMAGEFASTSCALE is ON. If it is reliable enough for scaling, then it will be used in place of most of the past scaling code. ---------------------------------------------------------------------------- Tue, 29 January 2008 Some divide by zero errors when scaling images are now handled correctly. Serious memory leak in IMAGEANTIWARP and IMAGEANTIROTATE fixed. ---------------------------------------------------------------------------- Wed, 24 January 2008 INPUT commands were broken when a DRAWOFFSET was active. Fixed. Two new LAYER commands which control the DRAWOFFSET used for a layer. LAYER OFFSET LAYER OFFSETRESET They have the same syntax as DRAWOFFSET and DRAWOFFSETRESET. ---------------------------------------------------------------------------- Thu, 17 January 2008 LAYERs now preserve the original DRAWOFFSET from when the LAYER was first created, and use that DRAWOFFSET from then on. Use of LAYER REGION updates the LAYER's DRAWOFFSET to the currently active one. FILESIZE and FILEREAD for files inside a GL or EXE were broken. This also showed up in commands that make use of the FILESIZE code such as FILECOPY. Fixed. FILESIZE code rewritten to use GetFileSize API call instead of FileSetPosition API. Typo in name of HTTPPOSTFLAGS variable was causing a link error in modular compiler. ---------------------------------------------------------------------------- Wed, 16 January 2008 FILEDATE and FILETIME rewritten to handle BSTRING (Unicode) filenames, and work with unusual paths. FILESIZE now works with either a file handle provided by FILEOPEN/FILEAPPEND (as it always did), or a filename. It will also accept a BSTRING filename (Unicode). This means you can now get the size of a file without actually opening it. SuperScript and SubScript fonts are now approximately 2/3rds the size of the original font. Previously they were half. SubScript vertical offset is reduced to 1/4 of the height difference to move the SubScript away from the next line of text. ---------------------------------------------------------------------------- Sun, 13 January 2008 New bug introduced in the Thursday build when in accessing multiple files inside an EXE or GL is fixed (would give data corrupt or missing file errors). Bug in DATABASE code which was overwriting the header with record labels is fixed. Extensive changes made to use templates to eliminate duplicate code for TOKEN32 vs TOKEN64 modules. ---------------------------------------------------------------------------- Thu, 10 January 2008 Serious crashing bug in FILECLOSE is fixed. It would leave a variables containing the file handle with an invalid value that would corrupt memory. The way FILECLOSE works is rewritten to keep the FILE object around, and just clean it up and close the device stream. The DEBUG/VARIABLES display for FILE objects is updated to show the device number, and the original filename. As a side note, there really is little use for FILECLOSE since FILEOPEN, FILEAPPEND and FILECREATE actually create an object that will automatically be closed when no longer in use or free'd. For instance: size = FileSize(FileOpen("example.exe")) This actually is valid, and will not leave "example.exe" open. And a note on IMAGESET. In March 2005, I made IMAGESET and PRINTSET nestable up to 64 levels deep. It allows you to do things like create an image buffer and fill it in the middle of printing. Or write a general subroutine that creates a arrow image, and returns the image for use, then call that subroutine to putup a bunch of arrows inside an image. Also IMAGESET when given no parameters returns a reference to the image buffer that was set, so for instance you can do this: drawclear red imageset imagenew(@drawwidth,@drawheight) imageput left top CreateXImage(@drawwidth/2) imageput right bottom CreateXImage(@drawheight/2) imagefade blend imageset() wait exitnow CreateXImage: declare Xsize imageset imagenew(@Xsize,@Xsize) drawclear black color white drawantiline 0 0 @drawmaxx @drawmaxy 4 drawantiline 0 @drawmaxy @drawmaxx 0 4 return imageset() Notice in this example I never actually store the image buffers in a variable, they are freed when they are no longer needed. ---------------------------------------------------------------------------- Wed, 09 January 2008 Crashing bug when using FILEPUTARRAYNAMED with an array with missing members is fixed. New system variable @SYSTIMEUTC. Defaults to OFF/FALSE (0). When set to ON/TRUE (1) the @TIME, @DATE, SETFILEDATETIME and GETFILEDATETIME features all work in UTC time instead of local time. Here is an example that shows the current timezone offset: drawclear white set systimeutc off set localtime @time set localdate @date set systimeutc on set utctime @time set utcdate @date set timediff round((@localtime-@utctime)/10000.0) if @localdate<@utcdate set timediff @timediff-24 endif if @localdate>@utcdate set timediff @timediff+24 endif set variables on messagebox @timediff timeoffset exitnow ---------------------------------------------------------------------------- Mon, 07 January 2008 Bug in MEM: which was not seeking to the end correctly. Filenames with the MEM: prefix previously only applied to memory buffers created with MEMNEW or MEMLOAD. MEM: now works with string variables as well, for instance the results of the DRIVEFILELIST command. drawclear white set listing drivefilelist(0,"*") local test filegetarray(mem:listing) set variables on wait exitnow ---------------------------------------------------------------------------- Thu, 03 January 2008 HTTP GETFILE and HTTP GETVAR were broken in previous build. HTTP GET now written and tested. Returns the results as a string. For example: drawclear white messagebox http(get,"http://www.google.com/index.html") A reminder, unlike GLPRO, the HTTP OPEN command is not required by HTTP GET, HTTP GETFILE and HTTP GETVAR. ---------------------------------------------------------------------------- Wed, 19 December 2007 Added a bunch of new HTTP commands: HTTP POST URL STRING HTTP POSTFILE URL FILENAME HTTP POSTVAR URL VARNAME HTTP POSTMETHOD MIMETYPESTRING HTTP VERSION VERSIONSTRING HTTP PUT URL STRING HTTP PUTFILE URL FILENAME HTTP PUTVAR URL VARNAME HTTP VERSION sets the HTTP protocol version transmitted by the HTTP PUT/GET/POST commands. HTTP POSTMETHOD sets the mimetype for HTTP POST commands. For example: HTTP POSTMETHOD "application/octet-stream" More info on how POST works can be found here: http://developers.sun.com/mobility/midp/ttips/HTTPPost/ New system status variable for HTTP PUT and HTTP POST. It is @HTTPRESULT, and it contains any messages sent back from the web server at completion of a PUT/POST. For example: drawclear white http open "192.168.2.101" result = http(postfile,"/Scripts/ReadAll.asp",test.txt) messagebox @httpresult "bytes written "$@result exitnow A new system variable @HTTPPOSTFLAGS. It controls the HTTP POST* commands. The options are the same as with the HTTPPUTFLAGS and HTTPGETFLAGS variables: Default value is: SET HTTPPOSTFLAGS NO_CACHE_WRITE ---------------------------------------------------------------------------- Thu, 06 December 2007 Bug added in previous build with WHENs not being triggered in the correct order, and multiple triggered WHENs being lost. Fixed, internal WHEN queue simplified and made more robust. ---------------------------------------------------------------------------- Tue, 04 December 2007 Crashing bug when creating and removing a large number of WHENs is fixed. Bug in the use of 0.0 constant fixed, it was being compiled as "." which broke code that added 0.0 to a integer to force floating point. ---------------------------------------------------------------------------- Mon, 19 November 2007 Bug in IMAGESIZE and IMAGESIZEFIT which would incorrectly scale images that had IMAGEALPHA enabled. Fixed. Reading of system variables using a variable is now supported, for example: var = "drawmaxx" textln @@var This is not supported for system variables that return more than a single value. Bug in use of superscript text at the start of a line not increasing the line height to include space for the superscript text. Fixed. ---------------------------------------------------------------------------- Thu, 15 November 2007 The ->DBRECORDS feature was not taking into account indexes (including search results). Fixed. AGCOMP now displays an error dialog with the error information. This is because AGCOMP is normally run from a GUI application like AGEDIT which was not displaying error codes. Numerous problems with Modular compiler related to Visual Studio fixed. The modular compiler now requires the Microsoft Visual Studio Runtime be installed: http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q=visual+studio+runtime+download I'm using a Google search link because Microsoft has been notorious about changing links making URLs invalid with alarming frequency. AGCOMP now does much more extensive error checking when doing a modular compile. Tools for modular compile expanded to include all the assorted little DLLs that Microsoft now requires just to run LINK.EXE. ---------------------------------------------------------------------------- Mon, 05 November 2007 64bit build of AGCOMP built and tested, results of a large compile are identical. There is no "need" for a 64bit bit build of AGCOMP, it's just a stepping stone in creating a 64bit bit build of AGPLAY since they share a large number of source files. Problem with first command line parameter being lost when running a compiled EXE is fixed (was related to switch to Visual Studio 2005). Problem with Modular compiler related to placement of NO_*.OBJ files fixed. ---------------------------------------------------------------------------- Thu, 01 November 2007 Bug in calling of WINFONT from code which sets the default font was causing errors in Modular compiler, fixed. Project files for IEAfterGRASP BHO (DLL) and regular AfterGRASP (EXE) are split up to eliminate some crazy problems with Visual Studio 2005 profiles. ---------------------------------------------------------------------------- Wed, 31 October 2007 Modular compiler updated for Visual Studio 2005. Unfortunately, the smallest runtime has grown from around 300k to 400k. This is because in the old Visual Studio 6 build of AG, I was able to stub out some startup runtime routines that we don't need. But in the Visual Studio 2005 runtime, those stubs were causing crashes. Updates to HTTP PUT code (not working yet). ---------------------------------------------------------------------------- Tue, 30 October 2007 Porting to Visual Studio 2005 almost complete, only remaining issue is collecting the modular compiler toolset. XMLLIB2 upgraded from 2.6.22 to 2.6.30 to correct some porting issues. ---------------------------------------------------------------------------- Sat, 27 October 2007 All of AG recompiled using Visual Studio 2005 SP1. Extensive small syntax changes required to eliminate compiler warnings and errors. For instance the VS 2005 compiler changed the scope of variables declared in a for() statement. This broke code all over the place in AfterGRASP. Bug found in XMLSEARCH, was not returning multiple matches (revealed in fixing code for VS 2005). Bug found in ARRAYPAIRS, it was always hanging with a stack overflow (another bug found by upgrade to VS 2005). ---------------------------------------------------------------------------- Fri, 26 October 2007 Serious bug in the GLOPEN code which was using uninitialized data space at the end of a filename is fixed. Bug in hex decode caused by switch to using size_t (which is unsigned) instead of int. Fixed by creating ssize_t (signed version) now used in numerous places (avoiding other hidden bugs). GLOPEN of an EXE file no longer needs a "resource:" prefix. It is now automatically added whenever the file extension is EXE. This also applies to the filename passed to the runtime (useful for debuggin). The MEMADDADR command now converts it's results to a POINTER even if all the values passed to it are not a POINTER. This has the useful side effect of converting a integer into a pointer which is needed by some Windows API calls that will accept a constant value. For example, this code snippet from AGEXE now uses memaddadr(10) to create the POINTER value of 10 used for the UpdateResource DLL call. dllsetup @kernel32 HANDLE "BeginUpdateResource" STRING BOOL dllsetup @kernel32 BOOL "UpdateResource" HANDLE PTR STRING WORD PTR DWORD RT_RCDATA = memaddadr(10) memload @theglname glbuf filecopy @runtimename @exename hUpdateRes = BeginUpdateResource(@exename, @FALSE) result = UpdateResource(@hUpdateRes, @RT_RCDATA, "GL", 0, @glbuf, glbuf->dim1) ---------------------------------------------------------------------------- Tue, 23 October 2007 Early prep being done to port AG to 64bits (primarily for server side tasks such as printing which do not run well on Win2003 x64). Because AfterGRASP only uses 62bits for integers, it is not safe for 64bit addresses used in x64 code. To correct this, all commands in AG that use memory addresses such as MEMNEW, SET, and DLL calls now use a internal POINTER type. All references to buffers created with MEMNEW now return a POINTER type which knows the original buffer size. This allows internal bounds checking to prevent overwriting before or after the allocated buffer. All MEMSET and MEMGET commands rewritten to use an internal pointer type. This means you cannot just pass an integer as the address to write to, it must be a pointer either gotten from a buffer created with MEMNEW or MEMLOAD, or passed as a return value from a DLL, or read from memory using MEMGETPOINTER. DLLSETUP and calling code modified to handle x64 code. New type you can pass or have returned from a DLL call "PTR". Behaves exactly the same as "FARPTR" (the prefix "FAR" is a legacy concept from the bad old 16bit Windows days). DLLSETUP still allows FARPTR even though there is nothing "FAR" about it. @NUMBER where number is a memory address used to read a string from memory. It will now only accept a POINTER as the address. Two new commands MEMSETPOINTER and MEMGETPOINTER have been added. They have the same syntax as MEMSETLONG and MEMGETLONG. MEMSETPOINTER only accepts POINTERs to be written to memory, and MEMGETLONG returns POINTERs. The @NULL system variable is now of type POINTER. Whenever using a POINTER as a number or string, it will be converted to integer first. For instance: memnew hello 100 set @hello "Test" msg = "At "$@hello$" Address" ; pointer is converted to integer text @msg$" "$@@hello wait ---------------------------------------------------------------------------- Thu, 11 October 2007 DRAWMOVE wasn't updating the window, fixed. Debug/Variables display of MEMBUF improved to show the size of the memory buffer, and the address in HEX. First code for HTTP DELETE added (untested) ---------------------------------------------------------------------------- Wed, 03 October 2007 Serious BUG fixed in BHO when exiting a script. It was not correctly unhooking it's self from the IE window, this was preventing any further updates to that IE window. The problem was related to where the unhook API is called, apparently it must be called from the same thread that originally hooked the window. New command WEBNAVIGATE, only functional inside the BHO version of AfterGRASP. Used to navigate to a new webpage, either in a new window, or in the current active window. RESULT = WEBNAVIGATE(URLSTRING) RESULT = WEBNAVIGATE(URLSTRING, TARGETSTRING) The default value for TARGETSTRING is "_self". If TARGETSTRING is "_self" (or leftout or blank), then the new webpage is loaded into the current active window. But not until the script exits. The return value is 0 since the actual navigation hasn't taken place yet. If TARGETSTRING has a other value, then the webpage is loaded into a new window immediately, and the return code from the IE goNavigate method is returned. ---------------------------------------------------------------------------- Wed, 26 September 2007 If thestarting GL filename passed to AGPLAY.EXE, or IEAfterGRASP BHO is a URL, then any suffix parameters are trimmed off the GL path, and are setup as default variables. For security reasons, system variables are blocked via this method. http://www.datadump.com/test.gl?page=57&title=Hello URLs with the "file://" prefix work with this in AGPLAY.EXE, but not in the IEAfterGRASP BHO since InternetExplorer pre-parses the URL and removes and suffix before it's made available to the BHO. ---------------------------------------------------------------------------- Wed, 19 September 2007 A couple crashing bugs in the AVL Trees template library when rebalancing trees fixed (AVL Tree template code is being used in more parts of AG which is bringing the less common problems to light). A couple problems with AGCOMP when dealing with files in a relative path like "..\example\startup.ags" are fixed. A surprisingly long term memory leak has been discovered. The ARRAYINDEXs which are created whenever you reference an array were shockingly not being freed correctly! This came to light as more arrays loaded from XML (which don't use numeric indexes) were showing odd symtoms. Fixed. Fixed obscure (but very annoying) bug in array indexes, example where the value of mylay[item1][1] was being destroyed (now fixed): drawclear white set variables on set mylay[item1][1] logo pageitem = mylay[item1] messagebox @mylay[item1][1] pageitem = "" messagebox @mylay[item1][1] exitnow ---------------------------------------------------------------------------- Thu, 13 September 2007 HUGE performance problem in BHO version of AG is fixed! It was repainting the screen after every FREE command, and in other inconvenient places. This gives easily a 10x boost in speed to typical applications. After some extensive low level profiling, I've made some general speed ups in all of AG by replacing a couple key functions with faster versions. One in comparing 64bit values, when comparing for equal or not equal. Another in handling of labels and gotos. Several glaring bugs in the AVL TemplateLibrary used for AG have been fixed (that's what I get for using some free sample code as a starting example!). This allows me to finally enable the code which prevents crashes from multiple scripts running at once in a BHO in different windows. New system variable created as part of the debugging process which may be useful in high performance situations. It prevents screen redraws from happening as a result of a FREE command. The default is @TRUE, redraws are enabled: SET SYSFREEREDRAW @TRUE SET SYSFREEREDRAW @FALSE ; disable redraws after FREE commands. Normally, when freeing a layer, or image used in a layer, or scrollbox, or other active object, the screen is automatically updated. Setting SYSFREEREDRAW to @FALSE will prevent this. The SET DEBUGPROFILE feature is now available in AG. It generates reports in the same directory the original source files were in when compiled. The reports have the file extension .PRO. They will not be generated if the original source file is unavailable because the source is included in the profile output. Some example output might look like this: 773 774 41.16 0.02 0.97% for var inarray array(arrayattrib(vars)) 775 93.53 0.01 2.20% local value @vars{@var} 776 ; local oldvalue @value 777 13.03 0.00 0.30% if @replacecount 778 10.40 0.00 0.24% value = strreplace(@value, @replacelist) 779 endif 780 781 942.79 0.11 22.27% if vardef(macros[@var]) 782 1038.03 0.82 24.52% ivars = ¯os[@var] 783 857.01 0.68 20.24% setupvars ¯os[@var] @value @depth+1 784 1.78 0.01 0.04% continue 785 endif First column is the line number Second column is the total time in 1000ths of a second Third column is the average time for each execution of this line Fourth column is the percentage of the total profile execution time Lines with low values have no stats written, so adding up all the total execution times will not give you an accurate total for the entire program. Also the actual time required to process the profile data is not included in the timing. Notice all lines from the source are included, even comments. ---------------------------------------------------------------------------- Mon, 03 September 2007 Fixed a data corruption bug in the use of HTTP: prefixed filenames. Mostly had to do with FileSeek not working correctly, particularly affecting a GL file read via HTTP access. Changed file buffering for HTTP to use a smaller buffer to work around possible bugs in networking API. Added checks to GL open to check for read errors or a corrupt/empty header. ---------------------------------------------------------------------------- Fri, 31 August 2007 Numerous crashing/wierd bugs associated with XML support are fixed. Had to do with the default LIBXML config enabling multi-threaded support, yet not being setup for multi-threads. All the XML multi-threading is now disabled, and those problems are gone. This was mainly an issue with the IEAfterGRASP BHO. ---------------------------------------------------------------------------- Thu, 30 August 2007 Serious bug in both FILECRYPTVERIFY and FILESIGNVERIFY was creating incorrect signatures on files larger than 64k. Fixed. ---------------------------------------------------------------------------- Wed, 22 August 2007 Bug in FILECRYPTVERIFY crashing on an invalid signature is fixed. New command FILESETEND, sets the end of a file to the current file position set by the last FILESEEK, FILEREAD or FILEWRITE. Only works on writable files, not read only files. So a file opened with FILEOPEN cannot be truncated with FILESETEND. The return value is 0 for failure, and 1 for success. FILECRYPTSIGN now correctly truncates after a replacement signature is written. This fixes a problem where if the original signature was larger than the new signature, the newly written signature would be invalid. ---------------------------------------------------------------------------- Tue, 21 August 2007 The MIN, MAX and INT commands were causing the modular compiler to fail if they were not used. This has to do with reserved keywords in C/C++ (which AG is written in). Corrected so that the internal (longer) naming now works in the modular compiler. The FILECRYPTSIGN command now writes the signature to the end of the file, so to sign a GL it's a single simple command, for example: filecryptsign fileget("c:\digilib\digiprivatekey.txt") project.gl The FILECRYPTSIGN command now ignores any existing signature when calculating the new signature, and will overwrite any existing signature. If the original signature is longer than the new one, they new signature will not be valid. ---------------------------------------------------------------------------- Mon, 20 August 2007 FILECRYPTSIGN and FILECRYPTVERIFY were not properly closing the file after running. Fixed. Some additional error checking added to CRYPTSIGN code. ---------------------------------------------------------------------------- Thu, 16 August 2007 New commands: INTEGER32 = FILECRC32(FILENAME) BINARYSTRING = FILEMD5(FILENAME) BINARYSTRING = FILESHA1(FILENAME) BINARYSTRING = FILESHA2(FILENAME) SIGNSTRING = FILECRYPTSIGN(PRIVATEKEY, FILENAME, OPTIONALEXTRATEXT) FAILURECODE = FILECRYPTVERIFY(PUBLICKEY, FILENAME, SIGNSTRING) FAILURECODE = FILECRYPTVERIFY(PUBLICKEY, FILENAME) FAILURECODE = FILECRYPTVERIFY(FILENAME) FAILURECODE is -1 for not a valid signature, 0 for correct match, and 1 for a mismatch. They all function just like the STR versions of the same commands, except they function on a file, and do not buffer the entire file in memory, they work off small chunks read one at a time instead. This allows verification of files on disk without managing memory buffers, and possibly running out of memory on large strings read into memory. ---------------------------------------------------------------------------- Wed, 15 August 2007 Two new font styles supported, they are SUPERSCRIPT and SUBSCRIPT. They work with both the WINFONTSTYLE and FONTSTYLE commands. FONTSTYLE SUPERSCRIPT FONTSTYLE SUBSCRIPT This also applies to fontstyle variations like this: drawclear white fontstyle render allvariations superscript allvariations subscript allvariations fontdefine arial9 arial 32 set variables on ; shows 45 fonts have been defined! color black textln textln font arial9 text arial9 font arial9sup text arial9sup font arial9sub text arial9sub wait exitnow WINFTONTSTYLE/FONTSTYLE VARIATIONS now supports up to 60 variations, the previous limit was 20. ---------------------------------------------------------------------------- Wed, 01 August 2007 Bug in handling of "" tags which would sometimes cause the color text color to switch to black is fixed. Bugs in handling of text color in HTML text near line wraps and other complex tags was sometimes causing the text color to not change correctly. Seen most often in A HREF links that are near line crossings. Fixed. ---------------------------------------------------------------------------- Tue, 31 July 2007 IEAfterGRASP (The Internet Explorer plug-in version) now creates an application directory and sets that as the current directory at startup. On a WinXP system where you are logged in as Administrator would use this directory: "C:\Documents and Settings\Administrator\Application Data\IEAfterGRASP" The next build will likely extend that directory to include a coded version of the URL the GL is loaded from. For example: http://www.aftergrasp.com/Test.gl "C:\Documents and Settings\Administrator\Application Data\IEAfterGRASP\http\www.aftergrasp.com\Test.gl" This URL to path code is not enabled yet because of security concerns, and will take some more path analysis before it is enabled. ---------------------------------------------------------------------------- Thu, 11 July 2007 Fixed two serious bugs in arrays looping back upon themselves when used with variables references, and array references. You won't be preventing from creating a loop back index, but at least it will no longer crash with a stack overflow, or hang in an infinite loop. Example that would crash: testc = testz[test] testz = testc[1] text @testc[0] ---------------------------------------------------------------------------- Mon, 09 July 2007 New command VARTYPE, you pass it a variable name (or variable names), and it returns the variable type as a uppercase string. If the variable is undefined the result is "". Possible variable types are: INTEGER FLOAT INVALID STRING LABEL INSTANCE PROGRAM STACK ARRAY ARRAYINDEX IMAGE FONT UNUSED TIMER DLL DLLFUNC MEMBUF MEMDATA FILE FILEDATA GL AREA BITMASK LAYER WHEN HOTSPOT VECTORDATA MEASURE INPUT IMAGEFADE SOUND DATABASE DBFIELDNAME DBINDEX DBCACHE DBRECORDCACHE SCROLLBOX BSTRING WEB The VARSHIFT command is now supported. It works much like in GLPRO, default value is -1 if none is given. -1 removes the @1 parameter and renumbers all successive parameters downward by 1. -2 would remove @1 and @2, renumbering downward by 2. Use of a positive value for VARSHIFT (inserting parameters) is not functional yet. ---------------------------------------------------------------------------- Tue, 03 July 2007 Bug where previous build would frequently give missing signing key error is fixed. Hanging bug in incorrectly formed HTML tags is fixed. "Hello there
      " text "Size 6
      " text "Size 24pt
      " text "Size 24
      " text "Points 6
      " text "Points 24pt
      " text "Points 24
      " wait exitnow ---------------------------------------------------------------------------- Thu, 28 June 2007 Updated error messages for corrupt or missing signatures in GL files, they now include the URL/Filename for the GL. Added restart on replace option to CAB install so that replacing a running IEAG BHO will work (although it will prompt for a reboot). ---------------------------------------------------------------------------- Wed, 27 June 2007 ROOT and Digi-products keys regerated, signed and replaced because of a couple security flubs I made. Ooops! Fixed memory free in balanced AVL trees template which will be used for new label management code. Unfortunately there are still problems, so this AVL code is disabled. ---------------------------------------------------------------------------- Mon, 25 June 2007 The STRPUBLICPRIVATEKEYS command has two extra options added: SETS PUBLICKEY PRIVATEKEY STRPUBLICPRIVATEKEYS() SETS PUBLICKEY PRIVATEKEY STRPUBLICPRIVATEKEYS(BITS, EXTRA) SETS PUBLICKEY PRIVATEKEY STRPUBLICPRIVATEKEYS(BITS, EXTRA, SIGNINGPRIVATEKEY) SETS PUBLICKEY PRIVATEKEY STRPUBLICPRIVATEKEYS(BITS, EXTRA, SIGNINGPRIVATEKEY, EXTRASIGN) BITS is the number of key bits (default 4096), valid values are 1024, 2048 and 4096 EXTRA is extra comment text to be included in the key. Each line in the extra text must be preceeded by a "# " (unless blank), and terminated by a @CRLF. SIGNINGPRIVATEKEY is a private key used to sign both of the produced keys, the signature is the same as using the STRCRYPTSIGN command and appending the result to the key string. EXTRASIGN is the extra text for the signing process IEAG no longer supports AGC files in a URL, it only watches for GL files, and will only open one that has been signed with the Digi-products key (which is signed with the IEAG root key). STRCRYPTVERIFY will now accepts a single string, and will find the signature appended to the end: Example: extra = "# Sublicense: Toady Cakes Inc."$@crlf extra = @extra$"# Libya"$@crlf extra = @extra$@crlf extrasign = # Digi-products Ltd."$@crlf sets publkey privkey strpublicprivatekeys(1024, @extra, @digirootprivatekey, @extrasign) messagebox strcryptverify(@digirootpublickey, @publkey) messagebox strcryptverify(@digirootpublickey, @privkey) ---------------------------------------------------------------------------- Wed, 20 June 2007 Added PreApproved registry key for IEAfterGRASP Browser Add-on to correct problems with non-administrators not being able to use the DLL. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Ext\PreApproved Added IE enable 3rd Party Extensions registry setting to IEAG Setup. This is what a signature created by STRCRYPTSIGN looks like before it has been encrypted with the private key: # Begin AfterGRASP Signature # 1024 bits, Wed Jun 20 13:33:40 2007 Bytes: 11 SHA256: 0xabf5dacd019d2229174f1daa9e62852554ab1b955fe6ae6bbbb214bab611f6f5 MD5: 0x32b170d923b654360f351267bf440045 # End AfterGRASP Signature You can extract this information out of a key with STRDECRYPTPUBLIC like this: textln strdecryptpublic(@publkey, strunbase64(strline(@sign, 2))) ---------------------------------------------------------------------------- Tue, 19 June 2007 Updated RSA encryption code to correct some security problems in the older version, also fixes some C++ compatability. Fixed a bug in STRUNBASE64 which would append an extra zero byte at the end of some even length strings. Rewrote key RSA math functions, NN_DigitMult and NN_DigitDiv in assembly language to speed up the STRPUBLICPRIVATEKEYS command (which is very slow with 4096 bit keys). They still can take minutes to calculate a single key pair, but the time has been reduced. The 1024 bit key generation is now nearly instant (a few seconds on a Core2 DUO E6600). All RSA public key encrypt and decrypt commands did not work on strings longer than (KEYBITS/8)-11. Which is 117 bytes for a 1024 bit key. Fixed. Two new commands STRCRYPTSIGN and STRCRYPTVERIFY: SIGNSTRING = STRCRYPTSIGN(PRIVATEKEY, STRING, OPTIONALEXTRATEXT) FAILURECODE = STRCRYPTVERIFY(PUBLICKEY, STRING, SIGNSTRING) FAILURECODE is -1 for not a valid signature, 0 for correct match, and 1 for a mismatch. sets publkey privkey strpublicprivatekeys(1024) teststr = "Hello There" textln sign = strcryptsign(@privkey, @teststr, "# John Bridges"$@crlf) textln @sign textln textln strdecryptpublic(@publkey, strunbase64(strline(@sign, 2))) textln matchstr[-1] = "Invalid Signature" matchstr[0] = "Signature Matches" matchstr[1] = "Signature Mismatch" textln @matchstr[strcryptverify(@publkey, @teststr, @sign)] textln ---------------------------------------------------------------------------- Mon, 18 June 2007 New commands added for public key cryptography (using RSA algorithm). They support key sizes from 1024 bits up to 4096 bits. They are not intended to be used to encrypt or decrypt large blocks of data, they are NOT secure when used for that purpose. The correct way to use public key encryption for anything large is to encrypt a traditional cryptography key (like AES or Blowfish) using the public key system, and use the traditional cryptography key for the actual data. The new STRPUBLICPRIVATEKEYS command is used to create a public/private key pair. The keys are written as human readable ascii in standard IPSEC format. SETS PUBLICKEY PRIVATEKEY STRPUBLICPRIVATEKEYS() SETS PUBLICKEY PRIVATEKEY STRPUBLICPRIVATEKEYS(BITS) An example set of keys written using this script: sets public private strpublicprivatekeys(1024) filesend "c:\publickey.txt" @public filesend "c:\privatekey.txt" @private I've truncated the long lines to fit normal margins in this document, and the lines preceeded with '#' are comments that can be removed. privatekey.txt # 1024 bits, Mon Jun 18 13:37:59 2007 # for signatures only, UNSAFE FOR ENCRYPTION Modulus: 0xbc4ec7c03be91b8329b731ea1cf90666ce9707c020984007bf3e34f...9cc0cad5041e8f19e96e42403df6c6b809d5bf PublicExponent: 0x010001 # everything after this point is secret PrivateExponent: 0x110cd90d50df647c55d49e926219323930cf8006276d61ae...fcd1c464bd1e947bec0d729491039efd50b31 Prime1: 0xee724755dd7560267f303f822e8f6603beb63...5cedb4a84c219a500e6c1d583 Prime2: 0xca2b98bda66e1747c50e2e4b9b0cb9e2...a82880202552bb33442cb77500c615 Exponent1: 0x49a1163008836f1e541604f661043cbf194bd24a2e518...1c67f771a08630595f1c1c95108cb0171521931ff59b Exponent2: 0x7b41e1399f0277c715e8f368bcfb214982e44e594ae80...9397357215d69d9260cc7e750a793624566ef332a991 Coefficient: 0xa38a36fc5cf4d4bfa430c17abd8dd25617d6339583...c3ed57559457b24f6e3413acf771c12a46c8c7c220bd925 publickey.txt # 1024 bits, Mon Jun 18 13:37:59 2007 # for signatures only, UNSAFE FOR ENCRYPTION Modulus: 0xbc4ec7c03be91b8329b731ea1cf90666ce9707c020984007bf3e34f...9cc0cad5041e8f19e96e42403df6c6b809d5bf PublicExponent: 0x010001 You can also use a copy of the IPSEC program on Linux machines to generate a private/public key: ipsec rsasigkey --verbose 1024 > privatekey The public/private cryptographic commands are used in alternate pairs. So for instance you encrypt using a private key, and decrypt using a public key. Such as: result = strencryptprivate(@private, "Hello There") dresult = strdecryptpublic(@public, @result) textln strhex(@result) textln @dresult ENCRYPTEDRESULT = STRENCRYPTPUBLIC(PUBLICKEY,STRING) ENCRYPTEDRESULT = STRENCRYPTPUBLIC(STRING) ENCRYPTEDRESULT = STRENCRYPTPRIVATE(PRIVATEKEY,STRING) ENCRYPTEDRESULT = STRENCRYPTPRIVATE(STRING) DECRYPTEDRESULT = STRDECRYPTPUBLIC(PUBLICKEY,ENCRYPTEDSTRING) DECRYPTEDRESULT = STRDECRYPTPUBLIC(ENCRYPTEDSTRING) DECRYPTEDRESULT = STRDECRYPTPRIVATE(PRIVATEKEY,ENCRYPTEDSTRING) DECRYPTEDRESULT = STRDECRYPTPRIVATE(ENCRYPTEDSTRING) Encrypted results are larger than the original, and the size is rounded up to the blocksize required for the given key size. Two new string commands, STRBASE64, and STRUNBASE64. They work just like STRHEX and STRUNHEX except they encode binary data in BASE64 ascii encoding instead of hexidecimal. BASE64 is much more efficient taking only 4 bytes in the encoded string for each 3 bytes in the original string. HEX takes up double the original number of bytes. ENCODEDSTRING = STRBASE64(@LARGESTRING) Last build of AfterGRASP had all input/messaging broken (was using incorrect place to store window instance information). Crashing bug introduced with new erasebackground support added for IEAG fixed. Web/CAB install for IEAG finished with InnoSetup, and Olive skin. All parts are now digitally signed to eliminate warnings and "(not verified)" notices. ---------------------------------------------------------------------------- Thu, 31 May 2007 Problem with IEAG not responding unless the URL is passed on the command line is fixed. Also typing in successive URLs now works. Multiple tabs or windows opened with IEAG URLs will fail! (needs new code to spawn different token dictionary for each IEAG window). ---------------------------------------------------------------------------- Wed, 30 May 2007 Crashing bug when feeding a HTTP: filename with .GL suffix as the startup filename (common with IEAG) fixed. Added more error checking, and changed the order in which the interpreter instance is created (is now created before a GL is opened). New command, BROWSER with subcommands like HTTP. Used to control the BROWSER host when IEAG is being used. Possible options may include CLOSE (close browser), EXITURL (set URL to link to when current AG Script exits), NAVIGATE (links to URL with AG Script still running). ---------------------------------------------------------------------------- Mon, 28 May 2007 Completely removed all code for debug dialog. This corrects crashes in IExplore when debugging. Fixed Input messages and missing paint messages, it now hooks both GetMessage and CallWndProc, and processes the events slightly differently. ---------------------------------------------------------------------------- Tue, 22 May 2007 Corrected a bunch of development settings tfor precompiled headers that were changed to build IEAG correctly. All versions now build much much faster, about 5 minutes vs the over 10 minutes it took before. IEAG Bugs in when to allow window paint, in filtering messages, and in preserving the window handle are all fixed. These fixes resolved most of window paint issues for IEAG. ---------------------------------------------------------------------------- Thu, 17 May 2007 IEAG now finds the correct window handle to draw in. This fixes all the overwriting tab buttons, and other border elements. Hanging problem of IEAG stealing messgaes from browser fixed. There is some mysterious problem of messages not making it into IEAG's hooked message handler. Until that is resolved, window paint, and input (keyboard and mouse) are still broken. ---------------------------------------------------------------------------- Wed, 16 May 2007 IEAG BHO's interpreter now runs as a new thread, numerous new checks added to avoid corruption and to correctly shutdown IEAG. Draw area still too large, window not updated correctly and input still not working. ---------------------------------------------------------------------------- Tue, 08 May 2007 First running test of IEAfterGRASP BHO worked. Painted too large an area, and hung on input. ---------------------------------------------------------------------------- Thu, 03 May 2007 Fixed crashing bug when no DEFAULT.GLF is included in a project. This has been in there for a long time. Use of HTML text without any defined fonts was giving blank results. Fixed. If no DEFAULT.GLF is included, AfterGRASP now does a default FONTDEFINE to create a default Arial font. Large changes in startup and shutdown code in AfterGRASP as part of the creation of the IEAfterGRASP BHO (Browser Helper Object). This may cause unusual bugs in this release of AfterGRASP. Use of "file:///" as a prefix on a filename is now supported, the rest of the filename will have %DD characters translated (such as %20 into ' '), and '/' into '\'. This is to support URL filenames for local files (part of testing of IEAfterGRASP BHO). ---------------------------------------------------------------------------- Wed, 28 March 2007 ActiveX simple project merged into AfterGRASP code including resources. The IAfterGRASP ActiveX is 2.519MB in size. REGSVR32 IAFTERGRASP.DLL does not work (something is broken). ---------------------------------------------------------------------------- Sun, 04 March 2007 All IAfterGRASP object code rewritten as real C++ classes (was originally written in C hybrid). The C hybrid code is still in place (but not enabled) until the C++ classes code has been tested more. As part of this process, several memory leaks and incorrect declarations are fixed. ---------------------------------------------------------------------------- Thu, 22 February 2007 Return VARIANT type for IAfterGRASP Methods that have no return value is now VT_VOID. Was VT_EMPTY. When converting arrays passed to IAfterGRASP Methods, any type not directly handled is now converted to a string (for example VT_DATE). ---------------------------------------------------------------------------- Wed, 21 February 2007 Passing arrays into IAfterGRASP Methods is now supported, all single dimensional array types are automatically converted into AG arrays including: VT_I1 VT_I1+VT_BYREF VT_I2 VT_I2+VT_BYREF VT_I4 VT_I4+VT_BYREF VT_R4 VT_R4+VT_BYREF VT_R8 VT_R8+VT_BYREF VT_BSTR VT_BSTR+VT_BYREF VT_BOOL VT_BOOL+VT_BYREF VT_UI1 VT_UI1+VT_BYREF VT_UI2 VT_UI2+VT_BYREF VT_UI4 VT_UI4+VT_BYREF VT_I8 VT_I8+VT_BYREF VT_UI8 VT_UI8+VT_BYREF VT_INT VT_INT+VT_BYREF VT_UINT VT_UINT+VT_BYREF VT_VARIANT VT_VARIANT+VT_BYREF This is a large amount of new code, so there are likely bugs. Working, tested example that uses multiple return values from an IAfterGRASP function: set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run "agplay /r", 6, True set myObj = CreateObject("IAfterGRASP.object") deck = myObj.random(1,52,52) hand = "" for each card in deck hand = hand&card&" " next hand = left(hand, len(hand)-1) msgbox hand msgbox myObj.random(0,255,3)(0), 0, "random(0,255,3)(0) function call" wshshell.run "agplay /u", 6, True ---------------------------------------------------------------------------- Thu, 15 February 2007 Up until now, all the command methods for the IAfterGRASP object were broken or barely working. I've finally rewritten all of them use vararg which allows any number of parameters or any type to be passed to any command. I've also completely rewritten the return value code to use a VARIANT return value. For commands that have multiple return values the new return code will create a SAFEARRAY of VARIANTs. There are still problems, for instance MsgBox accepts a return value, but set gives an error when testing with vbscript like this: set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run "agplay /r", 6, True set myObj = CreateObject("IAfterGRASP.object") MsgBox myObj.abs(-999), 0, "abs(-999) function call works!" set blah = myObj.abs(-999) MsgBox blah, 0, "never gets here" wshshell.run "agplay /u", 6, True Bug in tab formatting of text when using WINFONT, this was showing up in little empty box characters at each tabstop. Fixed. ---------------------------------------------------------------------------- Tue, 13 February 2007 New command line option '/w' used only for debugging purposes, it's the same as '/r' but does not exit. All SET/GET objects in IAfterGRASP object are now VARIANT, and will accept integers, reals (floating point), bool and strings. All other types either passed or returned are converted to strings. Runable test: set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run "agplay /r", 6, True set myObj = CreateObject("IAfterGRASP.object") MsgBox myObj.aftergrasp, 0, "aftergrasp variant variable" myObj.aftergrasp = "Hello" MsgBox myObj.aftergrasp, 0, "aftergrasp variant variable" wshshell.run "agplay /u", 6, True ---------------------------------------------------------------------------- Wed, 07 February 2007 Bug in use of numeric colors in some commands (like IMAGENEW). It was using some seemly random value instead of the number you passed. This bug first appeared in the Jan 11th 2007 build. Example of this bug (now fixed): drawclear white color green imageput 0 0 imagenew(100,200,32,0) wait exitnow ---------------------------------------------------------------------------- Mon, 05 February 2007 Text wrapping with some anti-aliased fonts (corpoS for example) was allowing the last pixel to be cropped in some rare cases. This had to do with the calculation for the extra blank pixels beyond a character cell before the next character rounding up instead of down. Fixed. ---------------------------------------------------------------------------- Wed, 31 January 2007 WEBNEW extended to allow setting a default position and size: WEBNEW VARNAME WEBNEW VARNAME XSIZE YSIZE WEBNEW VARNAME XPOS YPOS XSIZE YSIZE WEBOBJVAR = WEBNEW() WEBOBJVAR = WEBNEW(XSIZE,YSIZE) WEBOBJVAR = WEBNEW(XPOS,YPOS,XSIZE,YSIZE) Two crashing bugs when using more than one WEBNEW at once are fixed. WEB series of commands rewritten to no longer create a new window handle for each browser object. Instead they use the current AG window. This fixes many of the eventid problems, for instance this test now works (if you click outside the browser area): windowsize 800 600 drawCLEAR red color black webnew testg (800-640)/2 (600-480)/2-10 640 240 webnew testy (800-640)/2 (600-480)/2+260 640 240 weburl testg "http://www.google.com" weburl testy "http://www.yahoo.com" wait messagebox "removed" exitnow ---------------------------------------------------------------------------- Tue, 30 January 2007 NETCONTROL test command removed. New commands that interface to InternetExplorer object added: WEBNEW VARNAME WEBLOAD HTMLFILENAME VARNAME WEBPOSITION VARNAME XPOS YPOS WEBSIZE VARNAME XSIZE YSIZE WEBTEXT VARNAME HTMLTEXTSTRING WEBURL VARNAME URLSTRING [FLAGS TARGETFRAMENAME POSTDATA HEADERS] WEBFREE VARNAME WEBCONTROL VARNAME OPTION GOBACK GOFORWARD GOHOME SEARCH REFRESH Small test example: drawclear red color black webnew test weburl test "http://www.google.com" delay 500 free test messagebox "removed" exitnow There are messaging and eventid problems, this is still in the testing phase. ---------------------------------------------------------------------------- Tue, 23 January 2007 New NETCONTROL command, creates a Browser Helper Object for testing. No parameters yet. New XMLSEARCH command, searches one or more XML Arrays loaded with XMLLOAD, or provided by previous XMLSEARCHs. Returns one or more array references. RESULTARRAY = ARRAY(XMLSEARCH SEARCHSTRING XMLBUF [XMLBUF2 ...]) A runable example: drawclear white color black xmlstr = " Alabama Republican Alabama Democrat Alaska Republican Alaska Democrat Arizona Republican Arizona Democrat Arkansas Republican Arkansas Democrat California Republican California Democrat Colorado Republican Colorado Democrat " memnew buf strlen(@xmlstr) set @buf @xmlstr set variables on xmlload "mem:buf" xmltest results = array(xmlsearch("Donkey", xmlsearch("Hello", xmltest))) set textwrap off text strlist(@results) wait exitnow ---------------------------------------------------------------------------- Sun, 21 January 2007 XMLLOAD now supports CDATA (treated the same as text). ---------------------------------------------------------------------------- Mon, 15 January 2007 The support for finding the zero'th element in arrays automatically to help with XML access with duplicate tags is revised to only work on reading an array, not when writing to an array (setting values). This corrects bugs when you would do something like this: drawclear white color black test = array() ; this was setting "test = hello" instead of "test[0] = hello" test[0] = hello test[1] = goodbye textln strlist(@test) textln @test[0] wait exitnow ---------------------------------------------------------------------------- Thu, 11 January 2007 To avoid conflicts with identically named variables and commands the following syntax changes are made to AG: DRAWFILTER command renamed to IMAGEDRAWFILTER INPUTBEGIN variable renamed to INPUTBEGINPOS WINDOWSCALED command renamed to WINDOWSCALE The AfterGRASP methods for the following variables have been removed to make space for command methods: ANIMABORT APPUSESHELL32 DATACOUNT DBUSEASCII DEBUGEXIT DEBUGMP3 DEBUGNET DEBUGPROFILEt DEBUGSYSTEMLIST DEBUGTRACK DEBUGWAV EMAILBYTES EMAILCOUNT EMAILDNSERROR EMAILDNSSERVER EMAILERROR EMAILFROM EMAILMAILER EMAILPRIORITY EMAILPROXY EMAILREPLY EMAILTO ERRORCRITICAL ERRORLINE ERRORNUMBER ERRORSCRIPT ERRORSTACK ERRORTYPE FILELONGNAME FILESHARE FONTOFFSETLEFT FONTSCANWIDTH FTPCOUNT FTPPROXY GLHANDLE GLMERGEREVERSE GLNAME GLNAMEPREV GLPROFOCUS GLPROMULTIPLE GLPROUSER GLPROVERSION GLPROWIN32 HTTPCOUNT HTTPPATH HTTPPROXY HTTPTEMPDIR IMAGEDITHER IMAGEEDGECOLOR IMAGEEDGEENABLED IMAGEFADEBARSIZE IMAGEFLOATLAST IMAGEPRELOAD IMAGEREGIONMASK IMAGETRANENABLED INIINTERNAL KEYABORTDELAY KEYCLEAR LAYERHOTSPOT LAYERSEPARATE LAYERSKIPFRAMES LOOP MEMAVAILABLE MEMNEAR MOUSEALWAYS MOUSEMOVED NETPROXYTYPE PALETTEACCURATE PALETTEEND PALETTEENDEXCLUDE PALETTEREMAP PALETTESTART PALETTESTARTEXCLUDE PRINTCMYK SCRIPTBUFFER SCRIPTERROR SCRIPTSHUTDOWN SCRIPTSIZE SOUNDBLOCKSIZE SOUNDCACHEBITS SOUNDCACHECHANNELS SOUNDCACHEHEAD SOUNDCACHERATE SOUNDCACHESIZE SOUNDCACHETAIL SOUNDCLOCK SOUNDDEVICE SOUNDELAPSED SOUNDLEVEL SOUNDLEVELLEFT SOUNDLEVELRIGHT SOUNDMIXLEADTIME SOUNDPLAYING SOUNDVOLUME SOUNDVOLUMELEFT SOUNDVOLUMERIGHT STACK SYSCPUMMX SYSCPUTYPE SYSCTRLALTDEL SYSDISKMAX SYSDPMS SYSLOCKINPUT SYSMESSAGEDELAY SYSOS2 SYSRUNBACK SYSSLEEP SYSSPACE SYSSWAPPATH SYSYIELD TEXTCOLORCODES TEXTFONTCODES TEXTQUICK VIDEOBENCHMARK VIDEOSCALE VIDEOSCALEX VIDEOSCALEY WHENBACKGROUND WHENENABLED WHENFIRSTONLY WHENLASTFIRST WHENOFFSCREEN WIN31 WIN32 WIN32FILEACCESS WINDOWBACKPOSX WINDOWBACKPOSY WINDOWBACKSIZEX WINDOWBACKSIZEY WINDOWREFRESHRATE WINFRAMEADR WINFRAMEDIB WINFRAMEDIBHDC WINFRAMEHDC WINFRAMEHDIB WINFRAMELEN WINSYSTEMDIRECTORY WINYTOPORIGIN The Set methods are removed for these variables: COLORMAX CR CRCR CRLF DATE DEBUGLINE DEBUGLINES DEBUGSCRIPT DEBUGSCRIPTS DRIVECDROM DRIVECDROMS LF LFLF LOGE PI TIME These commands are not supported by AfterGRASP object methods (they are duplicates of standard windows API calls): WINABORTPATH WINANGLEARC WINARC WINARCTO WINBEGINPATH WINBITBLT WINCHORD WINCLOSEFIGURE WINCREATEBRUSHINDIRECT WINCREATEDIBPATTERNBRUSHPT WINCREATEFONTINDIRECT WINCREATEPALETTE WINCREATEPATTERNBRUSH WINCREATEPENINDIRECT WINDELETEOBJECT WINELLIPSE WINENDPATH WINEXCLUDECLIPRECT WINEXTCREATEPEN WINEXTFLOODFILL WINEXTSELECTCLIPRGN WINEXTTEXTOUT WINFILLPATH WINFILLRGN WINFLATTENPATH WINFRAMERGN WINGETSTOCKOBJECT WININTERSECTCLIPRECT WININVERTRGN WINLINETO WINMASKBLT WINMODIFYWORLDTRANSFORM WINMOVETOEX WINOFFSETCLIPRGN WINPAINTRGN WINPIE WINPOLYBEZIER WINPOLYBEZIERTO WINPOLYDRAW WINPOLYGON WINPOLYLINE WINPOLYLINETO WINPOLYPOLYGON WINPOLYPOLYLINE WINPOLYTEXTOUT WINREALIZEPALETTE WINRECTANGLE WINRESIZEPALETTE WINRESTOREDC WINROUNDRECT WINSAVEDC WINSCALEVIEWPORTEXTEX WINSCALEWINDOWEXTEX WINSELECTCLIPPATH WINSELECTOBJECT WINSELECTPALETTE WINSETARCDIRECTION WINSETBKCOLOR WINSETBKMODE WINSETBRUSHORGEX WINSETCOLORADJUSTMENT WINSETDIBITSTODEVICE WINSETMAPMODE WINSETMAPPERFLAGS WINSETMETARGN WINSETMITERLIMIT WINSETPALETTEENTRIES WINSETPIXELFORMAT WINSETPIXELV WINSETPOLYFILLMODE WINSETROP2 WINSETSTRETCHBLTMODE WINSETTEXTALIGN WINSETTEXTCOLOR WINSETVIEWPORTEXTEX WINSETVIEWPORTORGEX WINSETWINDOWEXTEX WINSETWINDOWORGEX WINSETWORLDTRANSFORM WINSTRETCHBLT WINSTRETCHDIBITS WINSTROKEANDFILLPATH WINSTROKEPATH WINWIDENPATH ---------------------------------------------------------------------------- Wed, 03 January 2007 Big trimming done on COM methods for commands that cuts down on the fluff code that was bloating the last AG runtime posted. In order to simplify using arrays created with XMLLOAD where the XML text has duplicate tags, you can now reference a single item in an array with [0]. For example: drawCLEAR white color black set hello[fred] "Goodbye" textln @hello[fred] textln @hello[0][fred] textln @hello[0][fred][0] set hobble "Hello" textln @hobble textln @hobble[0] textln @hobble[0][0] set atest[0][0] "A" set atest[1] "B" set atest[2] "C" set atest[3] "D" set atest[0][1] "Z" textln strcat(@atest[0]) textln @atest[1] textln @atest[0][1] wait exitnow ---------------------------------------------------------------------------- Wed, 20 December 2006 FONTSAVECOMPRESSED was broken on November 12th. There was a bug introduced as part of the "INS:" support. Fixed. Code added to access all commands from COM object, but there are problems because of the 1024 method limit for DCOM support in windows. Because of this and other problems, the commands methods are inaccessable in this build. ---------------------------------------------------------------------------- Mon, 18 December 2006 New modular option "OBJECT" to disable linking in any COM object support. If IAfterGRASP is not registered (using AGPLAY /R), then none of the COM startup or respond code is executed anymore. This means if you run AGPLAY.EXE with no command line options, it now normally exits immediately instead of waiting for COM calls that will never come. IAfterGRASP object now supports all AfterGRASP Setable and Getable variables (I added all the AfterGRASP variables, even unsupported stubs). Example: set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run "agplay /r", 6, True set myObj = CreateObject("IAfterGRASP.object") MsgBox myObj.aftergrasp, 0, "aftergrasp integer variable" MsgBox myObj.time, 0, "time integer variable" MsgBox myObj.pi, 0, "pi floating point variable" MsgBox myObj.glpropath, 0, "glpropath string variable" wshshell.run "agplay /u", 6, True List of all variables: aftergrasp animabort appuseshell32 colorback colormax colornum colortran commandline cr crcr crlf datacount date dbskipdeleted dbuseascii debug debugexit debugline debuglines debugmp3 debugnet debugprofile debugscript debugscripts debugsystemlist debugtrack debugwav desktopbits desktopbitsreal desktopsizex desktopsizexreal desktopsizey desktopsizeyreal drawand drawdensityx drawdensityy drawfilter drawheight drawmaxx drawmaxy drawminx drawminy drawoffheight drawoffmaxx drawoffmaxy drawoffminx drawoffminy drawoffwidth drawoffx drawoffy drawor drawtint drawwidth drawxor drivecdrom drivecdroms emailbytes emailcount emaildnserror emaildnsserver emaildnstimeout emailerror emailfrom emailmailer emailpriority emailproxy emailreply emailto errorcritical errorline errorload errormessage errornumber errorscript errorstack errortype false filedialogdefext filedialogpath filegzip fileindexopen fileindexsave filelongname filepath fileshare filestringend filestringstart floatdegrees floatdigits floateuropean floatround fontaddress fontgapchar fontgapline fontgapspace fontname fontoffsetleft fontscanwidth fontshadowpos fontshadowx fontshadowy fontsizex fontsizey ftpbytes ftpcount ftperror ftpproxy glhandle glmergereverse glname glnameprev glprodirectory glprofocus glpromultiple glproname glpropath glproplatform glproruntime glprouser glproversion glprowin32 httpbytes httpcount httperror httpgetflags httppath httpproxy httpputflags httptempdir imagecompressed imageconverttablecmyk imageconverttablergb imagedither imageedgecolor imageedgeenabled imageemfpercent imageemftextwidths imagefadebarsize imagefastscale imagefloatlast imageloadcmyk imagepreload imageregionmask imagetranenabled iniinternal inputabort inputbegin inputchange inputfullexit inputinsert inputpassword inputposition inputrestore inputstring inputtimeout inputwrap keyabortdelay keyclear keydownalt keydownctrl keydownshift keyhotdelay keypressed keyupalt keyupctrl keyupshift layerhotspot layerseparate layerskipframes lf lflf loge loop memavailable memnear memused mouse mousealways mousedown mousedown1 mousedown2 mousedown3 mousedownx1 mousedownx2 mousekey mousemoved mousepressed mouseup mouseup1 mouseup2 mouseup3 mouseupx1 mouseupx2 netconnected netproxytype nettimeout null paletteaccurate paletteend paletteendexclude paletteremap palettestart palettestartexclude pi printcmyk printcolorres printdriver printfilename printmetric printname printpixelsx printpixelsy printport printresx printresy printsizex printsizey quote scrabort screnabled scriptbuffer scripterror scriptname scriptshutdown scriptsize scrpassword scrpreview scrsettings scrsmall soundblocksize soundcachebits soundcachechannels soundcachehead soundcacherate soundcachesize soundcachetail soundclock sounddevice soundelapsed soundlevel soundlevelleft soundlevelright soundmixleadtime soundplaying soundvolume soundvolumeleft soundvolumeright stack syscpummx syscpuraw syscpuspeed syscputype sysctrlaltdel sysdiskmax sysdpms sysesc syslockinput sysmessagedelay sysmessageskip sysos2 sysrunback syssleep sysspace sysswappath sysyield textcenter textclip textcolorcodes textdraw textdrawback textfontcodes textfromstrip texthtml texthtmlantifont texthtmltabs texthtmlwinfont textindent textjustified textkern textkernsize textleft textmonospace textposx textposy textquick textright textrtf textscroll textshadowfilter texttabsize textwrap textwrappunct time timer timeraw true variables videobenchmark videoscale videoscalex videoscaley whenbackground whenenabled whenfirstonly wheninsub whenlastfirst whenoffscreen win31 win32 win32fileaccess win95 win98 win2000 winbuild winclassname windirectory windowbackposx windowbackposy windowbacksizex windowbacksizey windowbitdepth windowposx windowposy windowrefreshrate windowscaled windowscaledx windowscaledy windowsizex windowsizey winframeadr winframedib winframedibhdc winframehdc winframehdib winframelen winhandle wininstance wininstanceprev winnt winshowstyle winstyle winsystemdirectory winversion winytoporigin ---------------------------------------------------------------------------- Wed, 13 December 2006 Three new command line options for AGPLAY.EXE /R which registers AGPLAY.EXE as a COM component, and will prevent AGPLAY.EXE from remaining in memory waiting for COM requests. /U which unregisters AGPLAY.EXE as a COM component, and will prevent AGPLAY.EXE from remaining in memory waiting for COM requests. -Embedding is normally provided by windows when AGPLAY.EXE is run as a COM component. It makes AGPLAY.EXE exit once the last COM object it creates is destroyed. If AGPLAY.EXE is run with no command line parameters, and it will remain in memory until killed with task manager. If AGPLAY.EXE is launched with the "-Embedding" option The only feature available via COM is a simple set/get string buffer to ensure that everything is working correctly. Next build will have more "real" functions enabled. A crude example would be: ' A VBscript example of using AGPLAY.EXE set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run "agplay /r", 6, True set myObj = CreateObject("IAfterGRASP.object") myObj.Buffer = "Hello world" MsgBox myObj.Buffer, 0, "GetString return" wshshell.run "agplay /u", 6, True A "AfterGRASP.TLB" file is now included with AGPLAY for ease of COM access to AGPLAY. ---------------------------------------------------------------------------- Mon, 11 December 2006 XMLLOAD changed to created a numeric array for duplicate tagged entries, this will break previous projects that duplicate tags. For instance: AUTOEXEC.BAT CONFIG.MSI CONFIG.SYS ph.dll Previously would look like this when loaded with XMLLOAD (notice the missing duplicate tag records): FILES[Exclude][REC] = "CONFIG.SYS" FILES[Exclude][REC] = "ph.dll" And, now looks like this: FILES[Exclude][REC][0] = "AUTOEXEC.BAT" FILES[Exclude][REC][1] = "CONFIG.MSI" FILES[Exclude][REC][2] = "CONFIG.SYS" FILES[Exclude][REC] = "ph.dll" Large number of internal changes to AGPLAY runtime on the road to it working as a AfterGRASP COM Object Server when run a standalone (no script, or GL). Running AGPLAY.EXE with no command line parameters no longer brings up an empty window, instead it activates the COM server module. ---------------------------------------------------------------------------- Wed, 15 November 2006 New internal data type BSTR, matches the Microsoft OLE BSTR data type. It is a string that is 16bits per character, with a 32bit length before the first character, and a 16bit null after the last character. New command BSTR converts any value into a BSTR, the result is an pointer to the first character in the BSTR. ---------------------------------------------------------------------------- Sun, 12 November 2006 Coding for COM support started. Internal FileOpen FileAppend and FileCreate functions now look for a optional prefix that specifies the instance address. This is added so that outside libraries linked into AfterGRASP can still function correctly with AG's file I/O even with multiple instances of the AG's primary object. The syntax of the prefix is: "INS:ADDRESS:FILENAME" The address can be decimal or hex. Like this: "INS:0x3825F22A:example.txt" or "INS:9967239:bitmap.bmp" The "INS:" must be uppercase. FONTSAVECOMPRESSED, all Print commands, and a few other modules rewritten to stop using any kind of static instance data so that they won't crash if more than one instance of the primary AfterGRASP object is created. ---------------------------------------------------------------------------- Tue, 07 November 2006 HOTDISABLE changed so that is now removes any pending rollover, clickdown images, and hotcursor for that hotspot. This is to fix a problem with lingering rollover, clickdown, and hotspot cursors that wouldn't go away until another hotspot was activated.. ---------------------------------------------------------------------------- Wed, 01 November 2006 Bug in SYSTRAYCLICK where return values from subroutines would be left on the stack. Fixed. ---------------------------------------------------------------------------- Tue, 31 October 2006 Happy Halloween! PNG Load was mistakenly inverting the Alpha channel masks, corrected. Creating a PNG with alpha channel mask in Photoshop will now correctly load and display in AfterGRASP (if you enable IMAGEALPHA). Example: drawCLEAR red color black imageload "logo-ps.png" imagealpha on "logo-ps.png" imageput "logo-ps.png" wait exitnow You can find the logo-ps.png image here: http://www.axialis.com/tutorials/sample/logo-ps.png IMAGEALPHA ON (no image buffer) was crashing. Fixed. ---------------------------------------------------------------------------- Fri, 06 October 2006 Bug in COLORHUE which could return a invalid value (divide by zero result). Fixed. This could cause COLORSATURATIONSET (which calls COLORHUE) to hang. NEGATE (function that handles negative sign) fixed for some cases on measurements. ABS now works on measurements. ---------------------------------------------------------------------------- Wed, 04 October 2006 Labels passed to SYSTRAYMENU can now include parameters like: label:(parm1,parm2) Corrected autorun problem in AGSETUP caused by upgrading most recent release of WINRAR (used to compress the AGSETUP distribution). Updated to InnoSetup v5.1.7 in creation of AGSETUP. ---------------------------------------------------------------------------- Tue, 26 September 2006 New option in the " tag sometimes not restoring the previous font size is fixed. New code added for preserving the temporary state inside the HTML parser at the end of word wrapped lines. ---------------------------------------------------------------------------- Thu, 14 September 2006 Added STRLINEREPLACE and STRLINEINSERT commands, rewrote STRLINECLEAR and STRLINEREMOVE syntax for all is: RESULT = STRLINEREPLACE(STRING, LINENUMBER, LINESTRING1, [LINESTRING2], ...) RESULT = STRLINEINSERT(STRING, LINENUMBER, LINESTRING1, [LINESTRING2], ...) RESULT = STRLINECLEAR(STRING, LINENUMBER, LINECOUNT) RESULT = STRLINEREMOVE(STRING, LINENUMBER, LINECOUNT) All handle strings that use either CR, CRLF or just LF as the end of line terminator. Bug in STRLINE fixed where it was not working with strings that use LF alone as the end-of-line. ---------------------------------------------------------------------------- Wed, 13 September 2006 Crashing bug in FILESEND and FILESENDLN fixed. Caused when using a constructed filename (not a constant one, or one read from a variable). STRLINENUMBER was broken, it was always returning 0. Fixed. ---------------------------------------------------------------------------- Tue, 12 September 2006 New FOR option, INARRAY, functions much like IN except that it reads values from an array instead of a string list. for value inarray array(a,b,c,d,e,f) textln @value next The performance of FOR/INARRAY is quite a bit faster than FOR/IN since no string searching or building is required. FOR/INARRAY also allows loops with values other than strings, such as picture arrays arrays of arrays. Three new commands added, ARRAYSINGLEITEM ARRAYSINGLEINDEX and ARRAYSINGLEATTRIB used to walk through an array reading single items, indexs, or attributes. ARRAYSINGLEINDEX was added to support the FOR INARRAY feature, the others were added for future use. example = array(a,b,c,d,e,f) for n from 1 to example->dim1 value = arraysingleitem(example,@n) textln value next Quirk in handling of scaling anti-aliased fonts in FONTDEFINE fixed. ---------------------------------------------------------------------------- Sun, 10 September 2006 You can now use a loaded font as the face name in FONTDEFINE, and it will scale that font to whatever size you specify. The resulting font is always anti-aliased. FONTSAVE changed to create fonts which include 2 more fields, the original font height used in FONTDEFINE, and the width table scaling in floating point (previously only an integer value was permitted) . Fonts saved with this version of AfterGRASP will not load into previous builds of AfterGRASP. FONTLOAD will still load older fonts. Example of using a single large non-anti-aliased font for many smaller sizes: windowsize 960 724 32 drawclear white sizelist = array(36,24,18,14,12,10,8) fontstyle init bold render fontdefine cs72b "corpoS" 72 fontsavecompressed cs72b free cs72b fontload cs72b newscaledtestsingle cs72b fontstyle init underline render fontdefine cs72u "corpoS" 72 fontsavecompressed cs72u free cs72u fontload cs72u newscaledtestsingle cs72u wait exitnow newscaledtestsingle: declare sourcefont for newsize in strlist(@sizelist) fontstyle init anti fontdefine cs$@newsize @sourcefont @newsize font cs$@newsize color black textln "Scaled from non-anti-aliased 72pt to fontsize "$@newsize endloop return ---------------------------------------------------------------------------- Wed, 06 September 2006 Crashing bug in WINFONT and FONTDEFINE when an incorrect font name is used (a font not installed on your system) is finally fixed. Had to do with an uninitialized buffer used for the alternate method of calculating a font width table. FONTCHARPUT and FONTCHARGET commands added. Syntax is not the same as GLPRO as there are more options for start/end draw offsets, and position offsets. FONTCHARPUT FONT PICBUF CHAR [START] [END] [LEFTOFS] [RIGHTOFS] [TOTAL] FONTCHARGET FONT NEWPICBUF CHAR [VARSTART] [VAREND] [VARLEFTOFS] [VARRIGHTOFS] [VARTOTAL] START starting pixel to draw from END ending pixel to draw from LEFTOFS add before drawing (can be negative) RIGHTOFS add after drawing (can be negative) TOTAL total character width Two new commands, FONTNEW and FONTCOPY. FONTSTYLE settings for first and last character in font, and anti-alias settings apply to FONTNEW. FONTCOPY DESTBUF SOURCEBUF FONTNEW FONTBUF [WIDTH] [HEIGHT] [OFFSETMULTIPLIER] FONTGAPS command has an additional parameter which is the value to add to Y coordinate before drawing each character. FONTGAPS GAP SPACEGAP VERTICALGAP YOFFSET ---------------------------------------------------------------------------- Wed, 30 August 2006 With HTMLTEXT ON and PRINTSET (writing HTML text to a printer), if the printer is a postscript device, then "A HREF" tags now generate the PDFMARK code for weblinks. If the URL uses the prefix of "page:" then a page link is generated, otherwise a standard internet URL is assumed. ---------------------------------------------------------------------------- Tue, 29 August 2006 Bug in tabs and bullet text showing odd empty squares at the tab point on some machines is fixed. ---------------------------------------------------------------------------- Tue, 22 August 2006 SCRIPTMERGE now supports filenames in quotes, and when quoted the filename can now include spaces. Bug in STRREPLACE where null/blank values could cause a crash is fixed. ARRAYREMOVE now works with multi-dimensional arrays, for instance: drawclear white a[hello][1] = ok a[hello][2] = test a[hello][3] = again arrayremove a[hello] 2 set variables on wait exitnow ---------------------------------------------------------------------------- Sun, 20 August 2006 New MASK option for DRAWGRADIENT avoids the normal flood fill action of DRAWGRADIENT, instead the mask image defines which pixels to draw. DRAWFLOOD and DRAWGRADIENT when done when PRINTSET is kept from hanging. They don't work (they cannot work without reading the image buffer which does not exist on a printer), but at least they don't hang. ---------------------------------------------------------------------------- Thu, 10 August 2006 The STRHTMLTOFLASH command now only adds target="_blank" if the url starts with a http:. SET TEXTTABSIZE was not applying to PRINTSET (instead the default value of 8 was always used), this is fixed to carry forward the last TEXTTABSIZE setting. This also applies to other drawing variables such as TEXTCENTER, TEXTLEFT, TEXTRIGHT, TEXTJUSTIFY, and DRAWFILTER. SET TEXTTABSIZE now keeps measurments in their original form until the text is actually drawn. This allows you to set the tabsize at the start of your program, and maintain the same size when printing or otherwise changing the resolution. For example: windowsize 640 720 drawclear white set texthtml on set texttabsize -0.85in for dpi from 60 to 180 step 5 imagedensity @dpi textln "HelloThere"$@dpi$"dpi" next wait exitnow ---------------------------------------------------------------------------- Fri, 04 August 2006 With TEXTHTML ON, using to each forces a specific tabstop regardless of font size. ---------------------------------------------------------------------------- Thu, 28 July 2006 With TEXTHTML the "Hello
      " The tag from FLASH is now recognized including the BLOCKINDENT, INDENT, LEADING, LEFTMARGIN, RIGHTMARGIN and TABSTOPS attributes. Numerical values provided for any of the attributes can be a measurement like 10pct, or 5mm, as well as pixel X coordinates. Only the TABSTOPS= attribute is actually functional at this time, the rest do nothing. For example: windowsize 640 720 drawclear white set texthtml on text "" for i from 1 to 8 textln "HelloGoodbye" next wait exitnow DELAY/WAIT were broken in the 16 July 2006 build (they used the GREATERTHAN command, which had it's parameters reversed, so AGCOMP had to be changed to generate a LESSTHAN command instead). ---------------------------------------------------------------------------- Mon, 17 July 2006 Bug in INC/DEC when used with measurements is fixed (was introduced in yesterdays build) ---------------------------------------------------------------------------- Sun, 16 July 2006 ************ DRASTIC CHANGE ************ All code compiled with previous builds of AGCOMP will not work in this and all future builds of AfterGRASP. The order of all math operators has been reversed to make using functions like SUBTRACT and DIVIDE (useful with STREVAL for instace) easier to understand. Previously if you tried subtract(100,5) you would get -95 instead of 95 since it worked in reverse. Here is the test script for this change: windowsize 640 720 drawclear white set texthtml on text "" textln "subtract(100,5)="$subtract(100,5) textln "(100-5)="$(100-5) textln "subtract(100.,5)="$subtract(100.,5) textln "(100.-5)="$(100.-5) textln "subtract(100pct,5pct)="$subtract(100pct,5pct) textln "(100pct-5pct)="$(100pct-5pct) textln "subtract(100pct,5)="$subtract(100pct,5) textln "(100pct-5)="$(100pct-5) textln textln "divide(100,5)="$divide(100,5) textln "(100/5)="$(100/5) textln "divide(100.,5)="$divide(100.,5) textln "(100./5)="$(100./5) textln "divide(100pct,5pct)="$divide(100pct,5pct) textln "(100pct/5pct)="$(100pct/5pct) textln "divide(100pct,5)="$divide(100pct,5) textln "(100pct/5)="$(100pct/5) textln textln "modulus(101,5)="$modulus(101,5) textln "(101%5)="$(101%5) textln "modulus(101.,5)="$modulus(101.,5) textln "(101.%5)="$(101.%5) textln "modulus(101pct,5pct)="$modulus(101pct,5pct) textln "(101pct%5pct)="$(101pct%5pct) wait Modulus of measurements now supported. Only works on like types, for instance: textln "modulus(101pct,5pct)="$modulus(101pct,5pct) textln "(101pct%5pct)="$(101pct%5pct) Conversion of measurment to string after a multiply or divide was done to a measurement is fixed. For instance: textln "divide(100pct,5)="$divide(100pct,5) textln "(100pct/5)="$(100pct/5) Conversion of measurements with a negative pixel count now puts the pixel count at the end so that 100pct-5 is no longer displayed as -5+100pct, instead it's shown as 100pct-5. Crashing bug when using

        tags fixed. ---------------------------------------------------------------------------- Wed, 05 July 2006 !!SERIOUS RISK OF BUGS IN TEXT IN THIS BUILD!! Routines which handle text drawing (TEXTFROM TEXT LAYERTEXT), and text calculation (TEXTHEIGHT, TEXTLINESHEIGHTFROM, TESTSTRPOSITIONHEIGHT) are now merged into a single common block of code. All the duplicate code has been eliminated. This eliminates some inconsistencies between text drawing and calculation, but more importantly it drasticly simplifies adding text features, getting rid of a whole round of checking and debugging each time substantial changes were made to either set of code in the past. Start of Table support, not functional yet. TEXTHTML now recognizes these Table tags: // table // table row // groups of table columns // the attribute values for one or more columns in a table // table head // table body // table footer
        // doc division The
        // table header
        // table cell
        // table caption
        tag recognizes these attributes, the values are parsed, pushed onto a table stack, and restored after a
        tag. BORDER= WIDTH= CELLSPACING= ALIGN= BGCOLOR= ---------------------------------------------------------------------------- Thu, 29 June 2006 WINDOWSTYLE HIDDEN support removed, it was based on false assumptions made based on article that talked about creating windows with no taskbar text requiring a hidden parent. All that is false (and led me to waste a HUGE amount of time debugging what would never work!). WINDOWSTYLE with all the EX styles now work, they NEVER did in the past not in GLPRO, nor in AfterGRASP. My entire understanding of how the extended window attributes are set was completely incorrect. Fixed! This includes the TOOLWINDOW setting, which you can see functioning correctly with this small example: windowstyle popup drawclear white set texthtml on textln "A Window" delay 200 textln "Changed to TOOLWINDOW" windowshowstyle hide windowstyle TOOLWINDOW windowshowstyle show wait exitnow ---------------------------------------------------------------------------- Tue, 27 June 2006 JPEG support replaced with code from libjpeg-6c provided by Guido Vollbeding of the JPEG Club. http://jpegclub.org/libjpeg-6c.tar.gz Message posted June 20th, 2006. http://groups.google.com/group/comp.compression/msg/77d99c47ec1736da?hl=en& The last updated to LIBJPEG (version 6b) was over 8 years ago! The code which handles JPEG quality is rewritten to give far higher quality results at the higher percentages. Saving an image near 100% quality will now give results as good or better than Photoshop. Here is the test script I used to watch for JPEG quality (it XOR's a saved JPEG with an original, colored areas are mismatches): windowsize 800 600 32 drawclear white imageload original timerset timecount for i from 10 to 100 imageload original blah filedelete blah.jpg imagesavejpeg @i blah.jpg imagefree blah imageload blah imageset blah set drawxor on imageput original set drawxor off imageset imageput blah imagefree blah set texthtml on text "" color red layer hah text @i next layer hah text @timecount wait exitnow ---------------------------------------------------------------------------- Tue, 20 June 2006 HTML Text that wraps on a
      1. line now wraps under the previous text not under the bullet. So for example, in the past it did this: 0 this is some silly text as an example. It now wraps this way: 0 this is some silly text as an example. ---------------------------------------------------------------------------- Mon, 19 June 2006 Bug in AGCOMP introduced on 14 June 2006 build which broke the compiling of HEX constants is fixed. messagebox 0x08000000 ; was displaying x08000000 - WRONG! messagebox 0x08000000 ; Now displays 0x8000000 ---------------------------------------------------------------------------- Thu, 15 June 2006 For HTMLTEXT, the bullet list support is rewritten fixing several serious bugs in the display of bullet lists, and correcting the spacing. This also streamlines some of the HTML parsing which was overly complicated based on some incorrect assumptions. Here is the test script I used where the output is very close to the same HTML shown in Internet Explorer and FireFox. windowsize 800 800 drawclear white imagedensity 80 set texthtml on text "" text "
      2. one
        one
          one
        • one
        • two
        • three
        • four four four four four four four four four four four four four four four four four four four four four four four four four four four four four four
        • five
            a
          • b

          a
        b
        zello
        " wait exitnow ---------------------------------------------------------------------------- Wed, 14 June 2006 AGCOMP now treats numeric constants with leading or trailing zeros as numbers not strings if they are not in quotes. For instance: messagebox "145.00000" ; displays 145.00000 messagebox 145.00000 ; displays 145. messagebox 0000145.00000 ; displays 145. messagebox "00000145" ; displays 00000145 messagebox 00000145 ; displays 145 ---------------------------------------------------------------------------- Mon, 12 June 2006 New command STRHTMLTAGEXTRACT which will search through a string finding all the matching tags, and return the matching attributes. It returns multiple values, so you would commonly use functions like ARRAY or STRLIST on the return values. RESULTARRAY = ARRAY(STRHTMLTAGEXTRACT(HTMLSTRING,TAGNAME,ATTRIBNAME1,....)) RESULTARRAY = STRLIST(STRHTMLTAGEXTRACT(HTMLSTRING,TAGNAME,ATTRIBNAME1,....)) HTMLSTRING is the HTML text to search TAGNAME is the TAG name to search for ATTRIBUTENAME1 is the first attribute to extract (multiple attributes are supported) For example: drawclear white html get page "http://www.yahoo.com/index.htm" messagebox strlist(strhtmltagextract(@page,font,face)) exitnow Or: windowsize 800 800 drawclear white windowshowstyle shownormal set teststring "uHello" set texthtml on text "" set texthtml off set textwrap off text strlist(strhtmltagextract(@teststring, font, face, size)) wait exitnow New option for WINDOWSTYLE, HIDDEN. When the HIDDEN option is used, the background window becomes a fixed 8 pixel by 8 pixel window that is always hidden. Our main window is made a child of this window. This allows you to create a window that is visible, but is not shown on the taskbar. Unfortunately, it's not working yet, still under development. The
        • bullet tables with HTML TEXT now use different symbols for different levels of indent: Disc (first level of indent): l Circle (second level of ident): ¡ Square (3rd and all higher levels of ident): n Text inside
           tags now have the tab size forced to the standard
          8 spaces wide.
          
          ----------------------------------------------------------------------------
          Thu, 08 June 2006
          
          Replaced SOUND loading code with same base code as used for IMAGES and
          other files.
          
          
          SOUNDPLAY was sometimes not playing any more sounds until program exit.
          Fixed.
          
          
          SOUNDSTOP was unreliable, fixed.
          
          ----------------------------------------------------------------------------
          Wed, 07 June 2006
          
          WINDOWSTYLE CHILD now actually sets the style to CHILD (previously it
          would just use POPUP). But this actually crashes right now because there
          is no window to be a child of! (yet).
          
          
          New system variable @WINSTYLE, is the integer version of a window
          style set with the WINDOWSTYLE command.
          
          ----------------------------------------------------------------------------
          Tue, 06 June 2006
          
          SET TEXTFROMSKIP changed to NOT strip leading spaces or tabs. It now only
          strips extra linefeeds.
          
          
          
          Bug in STRCAT (the '$' operator) was throwing away trailing zeros on
          strings that were valid floating point numbers. For instance:
          
            textln "50."$"0000"
          
          Was displaying "50." instead of the expected "50.0000".
          
          This bug also affected the INC and DEC commands when used with HEX values
          (was not working correctly).
          
          ----------------------------------------------------------------------------
          Mon, 05 June 2006
          
          The default character set for FONTSTYLE INIT and with no character set
          ever set with FONTSTYLE is now DEFAULT (used to be ANSI).
          
          This allows symbol fonts to work without setting the character set to
          SYMBOL. For example, this test now works:
          
            drawclear white
            set texthtml on
            text "u"
            wait
            exitnow
          
          ----------------------------------------------------------------------------
          Sun, 04 June 2006
          
          The DRAWDENSITY command has been removed, same functionality is provided
          by IMAGEDENSITY with no image specified.
          
          
          IMAGEDENSITY command with no images specified sets.the current system
          density (dots per inch).  
          
           IMAGEDENSITY XYSIZE
           IMAGEDENSITY XSIZE YSIZE 
           IMAGEDENSITY XYSIZE IMAGEBUF [IMAGEBUF ...]
           IMAGEDENSITY XSIZE YSIZE IMAGEBUF [IMAGEBUF ...]
          
          
          
          Memory corruption bug in STREVAL (overwriting one byte beyond end of a
          temporary buffer) fixed.
          
          Memory read error in STRLIST which could try to read memory that was
          previously free'd (and could have changed value) is fixed.
          
          Serious memory leak in STRREPLACE fixed. Also STRREPLACE when using
          10 or fewer pairs of search/replace values on short strings has dramaticly
          less overhead (runs faster).
          
          ----------------------------------------------------------------------------
          Thu, 01 June 2006
          
          Bug in TEXTHEIGHT which ignored the last character in a string is fixed.
          
          Bug in TEXT/TEXTLN which did not correctly take the rightoffset for each
          character into account when wrapping is fixed.
          
          Two new commands LOCALDEPTH and LOCALDEPTHS, function much like
          LOCALUNDER and LOCALUNDERS. They allow you to create local variables at
          a lower depth in the call tree.
          
           LOCALDEPTH DEPTH VARNAME VALUE [VARNAME VALUE] [VARNAME VALUE] ...
           LOCALDEPTHS DEPTH VARNAME [VARNAME] [VARNAME] ... VALUE [VALUE] [VALUE] ...
          
           LOCALDEPTH 0 VARNAME VALUE
           is identical to
           LOCAL VARNAME VALUE
          
           LOCALDEPTH 1 VARNAME VALUE
           is identical to
           LOCALUNDER VARNAME VALUE
          
          ----------------------------------------------------------------------------
          Wed, 31 May 2006
          
          STREVAL now handles strings in quotes as well a escaped quotes ("\"")
          
          Here is a complex example:
          
            sfontsize = 40
            global pdate streval("strcat(\"Prepared Date: \",strright(@date,2),\"/\",strmid(@date,5,2),\"/\",strmid(@date,3,2),\"\")")
          
          
          Previously, the '$' operator (which concatinated two strings) passed the
          two strings to the STRCAT function in reverse.  In order to make STRCAT
          easier to use on it's own. The compiler (AGCOMP) is changed to reverse
          that, passing the parameters in the same order a human being would use.
          The STRCAT command is updated to concatinate multiple strings in
          the expected order, so:
          
                          messagebox strcat(a,b,c,d,e)
          
          Displays "abcde".  (previously it would have displayed "edcba").
          
          This means any GL or EXE compiled before this build of AfterGRASP will
          not run correctly if used with this or later runtimes (strings will
          be concatinated in backwards order).
          
          ----------------------------------------------------------------------------
          Wed, 17 May 2006 (Update)
          
          The updated list of what STRHTMLTOFLASH does is as follows:
          
            1. Strip CRLFs and tabs (replace with spaces)
            2. Strip excess spaces and leading spaces
            3. Replaces   with space
            4. Replace all &name; with &#asciicode;
            5. Removes all 

          6. Replaces all

          with
          7. Replaces all with 8. Replaces all with 9. Replaces all
          ... with ... 10. Encodes all characters above 127 or below 32 using &#asciicode; 11. Replaces all "
          " with "
          " (works around a bug in FLASH handling of bold tag that crosses a link). 12. Replaces all long hyphens '–' with short hypens '-'. ---------------------------------------------------------------------------- Wed, 17 May 2006 (Update) Bug in STRHTMLTOFLASH and STRHTMLSTRIP reversing it's handling of leading spaces on a line (was not stripping them, and was instead stripping them from in front of all other tags). Fixed. STRHTMLTOFLASH and STRHTMLSTRIP now treat   as a space. STRHTMLTOFLASH now encodes ASCII characters above 127, and below 32 using &#asciicode;. The updated list of what STRHTMLTOFLASH does is as follows: 1. Strip CRLFs and tabs (replace with spaces) 2. Strip excess spaces and leading spaces 3. Replaces   with space 4. Replace all &name; with &#asciicode; 5. Removes all

          6. Replaces all

          with
          7. Replaces all with 8. Replaces all with 9. Replaces all ... with ... 10. Encodes all characters above 127 or below 32 using &#asciicode; 11. Replaces all " " with "
          " (works around a bug in FLASH handling of bold tag that crosses a link). ---------------------------------------------------------------------------- Wed, 17 May 2006 AGEDIT updated to put quotes around the filenames with path it passes to the AG Compiler (AGCOMP.EXE). This should correct the problems some were having using directories with spaces in them. STRHTMLSTRIP and STRHTMLTOFLASH now strip out CRLF, and excess spaces (correctly). STRHTMLTOFLASH extensively rewritten so that it now does this: 1. Strip CRLFs and tabs (replace with spaces) 2. Strip excess spaces and leading spaces 3. Strips   4. Replace all &name; with &#asciicode; 5. Removes all

          6. Replaces all

          with
          7. Replaces all with 8. Replaces all with 9. Replaces all ... with ... ---------------------------------------------------------------------------- Tue, 16 May 2006 STRSEARCHHTML and STRSEARCHREVERSEHTML command removed. Instead, we have the new STRHTMLPOSITION and STRPOSITIONHTML commands. HTMLPOS = STRHTMLPOSITION(HTMLSTRING, STRIPPEDPOS) STRIPPEDPOS = STRPOSITIONHTML(HTMLSTRING, HTMLPOS) STRHTMLPOSITION converts a stripped string position into a HTML string position. STRPOSITIONHTML converts a HTML string position into a stripped string position. For instance: htmlstring = "The names John&Ed are two names" stripped = strhtmlstrip(@htmlstring) pos = strhtmlposition(@htmlstring, strsearch(@stripped, "John&Ed")) ---------------------------------------------------------------------------- Sun, 14 May 2006 Two new string commands STRSEARCHHTML and STRSEARCHREVERSEHTML, they effectively do the search on the string after a STRHTMLSTRIP is done, but returns the string position in the original HTML string. This is useful for finding text in an complex HTML string. Crashing bug in STREVAL when passed a NULL string is fixed. Crashing bug in SET VARIABLES ON when using large array indexes is fixed. New command IMAGEEXISTS, checks to see if an image is loaded into memory or available for loading: RESULT = IMAGEEXISTS(IMAGENAME) IMAGEEXISTS can be passed more than one image name, and returns true only if all the images exist. This is different from the FILEEXISTS command which returns true if any of the files exist. RESULT = IMAGEEXISTS(IMAGENAME1,IMAGENAME2,IMAGENAME3) ---------------------------------------------------------------------------- Wed, 10 May 2006 @NETCONNECTED was always returning 6 (leftover from before @NETCONNECTED was supported). When @NETCONNECTED fails, the WININET.DLL is now freed from memory until the next internet command is used. @NETCONNECTED now provides a value less than 0 for errors. Possible values: -1 for no internet DLLs -2 for IsNetworkAlive failure -3 for InternetGetConnectedState failure 0 for no connection 1 Modem connection 2 LAN connection 4 Proxy connection 5 Modem Proxy connection 6 LAN Proxy connection The HTTP commands now zero HTTPERROR if there was no error (previously any error code was left in HTTPERROR). ---------------------------------------------------------------------------- Tue, 09 May 2006 Three new string commands for dealing with URLs and Adobe FLASH strings. STRURLENCODE Translates all characters not letters or numbers (a..z A..Z and 0..9) into %HH where HH is the two digit hex code. This includes control characters like @CRLF. For example: STRURLENCODE("Hello There"$@crlf) becomes "Hello%20There%0D%0A". STRURLDECODE Translates all %HH where HH is a two digit hex code into ascii. For example: STRURLDECODE("Hello%20There") becomes "Hello There". STRHTMLTOFLASH Translates all &charname; sequences into &#asciicode; Translates all "" to "", and "" to "". Translates all "" to "", and "" to "". Translates all "

           


          " to "". Translates all "

          " to "" and "

          " to "
          ". Working example of all three: drawclear white color black fontdefine arial textln "strurlencode(\"Hello There\"$@crlf)" textln strurlencode("Hello There"$@crlf) textln textln "strurldecode(\"Hello%20There\")" textln strurldecode("Hello%20There") textln textln "strhtmltoflash(\"&Test \")" textln strhtmltoflash("&Test ") textln textln "strurlencode(strhtmltoflash(\"&Test £ \"))" textln strurlencode(strhtmltoflash("&Test £ ")) textln wait exitnow STRHTMLSTRIP is now supported (was an empty stub). Untested. All mouse/keyboard events are now ignored while a systray menu is active. This avoids some odd errors when clicking inside a menu that overlaps the main app window. ---------------------------------------------------------------------------- Fri, 05 May 2006 Bug in STRREPLACE which would give incorrect results (sometimes not finding a string) if the string it was searching for started with a character who's ascii value was greater than 127. Fixed. ---------------------------------------------------------------------------- Fri, 28 Apr 2006 Results of math with measurements is now cleaned up so that zero values are removed. Like 2pct-2pct now gives 0 instead of 0pct, and 2in+0 now gives 2in instead of "0+2in". ---------------------------------------------------------------------------- Thu, 27 Apr 2006 STRSORT with the numeric option "#" now skips any leading non-numeric characters on strings being compared. For example: drawclear white drawslist = strlist("draw10", "draw1", "draw11", "draw10.5", "draw0.2", "draw2", "draw1.2") strsort drawslist messagebox @drawslist "Sorted normally" strsort "#" drawslist messagebox @drawslist "Sorted numericly" exitnow ---------------------------------------------------------------------------- Wed, 26 Apr 2006 New command SYSTRAYCLICK which controls what clicking with the left mouse button, right mouse button, and double clicking on the system tray icon (set with SYSTRAYICON command) does. SYSTRAYCLICK LEFTLABEL SYSTRAYCLICK LEFTLABEL RIGHTLABEL SYSTRAYCLICK LEFTLABEL RIGHTLABEL DOUBLELABEL If a blank label is used, then nothing is done for that type of click. If the label "menu" is used, then the menu created by the SYSTRAYMENU is used. Otherwise it's label that is gosub'd when that type of mouse click occurs on the system tray icon. TEXTSTRPOSITIONFROM was not reseting the X position at the start of text to be written. TEXTSTRPOSITIONFIT was off by 1 byte (was returning a base 0 result), and was not handling word wrap correctly on the last line. The INC and DEC commands now support measurements and percentages, both in the variable being incremented or decremented, and in the value added to the variable. DRAWBOX and DRAWRECT when drawing to a printer no longer have rounded corners, the corners are now squared (Window's default pen has always been rounded, had to change some calls to use ExtCreatePen to create a non-rounded pen). Corners on both are now correctly squared even at high resolutions. ---------------------------------------------------------------------------- Mon, 24 Apr 2006 The return values from IMAGEPUT (which are the XPOS and YPOS where the image was actually placed) are now corrected for DRAWOFFSET. Two new commands ARRAYPAIR and ARRAYPAIRS. ARRAYRESULT = ARRAYPAIR(ITEM1, ATTRIB1, ITEM2, ATTRIB2, ITEM3, ATTRIB3, ..., ...) ARRAYRESULT = ARRAYPAIRS(ITEM1, ITEM2, ITEM3, ..., ATTRIB1, ATTRIB2, ATTRIB3, ...) They function like ARRAY, creating a sequential array starting with index 0 onward. But they take both values and attributes, so for instance: MENUARRAY[0] = "About" MENUARRAY{0} = labelshowabout MENUARRAY[1] = "Speed" MENUARRAY{1} = &SPEEDMENUARRAY MENUARRAY[2] = "Exit" MENUARRAY{2} = labelexitnow Can now be written as: MENUARRAY = ARRAYPAIR("About", labelshowabout, "Speed", &SPEEDMENUARRAY, "Exit", labelexitnow) Or using ARRAYPAIRS like this: MENUARRAY = ARRAYPAIRS("About", "Speed", "Exit", labelshowabout, &SPEEDMENUARRAY, labelexitnow) SYSTRAYMENU now working, and has support for grayed and checked entries. Grayed and checked use a prefix (which is not displayed) on the menu text. "GRAY:" for grayed out, and "CHECK:" for checked. You can use both at the same time if you like: SPEEDMENUARRAY[0] = "1 Second" SPEEDMENUARRAY{0} = label1sec SPEEDMENUARRAY[1] = "CHECK:2 Seconds" SPEEDMENUARRAY{1} = label2sec SPEEDMENUARRAY[2] = "5 Seconds" SPEEDMENUARRAY{2} = label5sec SPEEDMENUARRAY[3] = "10 Seconds" SPEEDMENUARRAY{3} = label10sec SPEEDMENUARRAY[4] = "30 Seconds" SPEEDMENUARRAY{4} = label30sec SPEEDMENUARRAY[5] = "1 Minute" SPEEDMENUARRAY{5} = label1min SPEEDMENUARRAY[6] = "2 Minutes" SPEEDMENUARRAY{6} = label2min SPEEDMENUARRAY[7] = "5 Minutes" SPEEDMENUARRAY{7} = label5min SPEEDMENUARRAY[8] = "10 Minutes" SPEEDMENUARRAY{8} = label10min MENUARRAY = ARRAYPAIR("About", labelshowabout, "Speed", &SPEEDMENUARRAY, "Exit", labelexitnow) ---------------------------------------------------------------------------- Wed, 19 Apr 2006 Three new commands to support System Tay icons, SYSTRAYICON, SYSTRAYTIP and SYSTRAYMENU. SYSTRAYMENU is not written yet (doesn't do anything). SYSTRAYICON and SYSTRAYTIP both are tested and working. SYSTRAYICON ICONFILENAME XHOTSPOT YHOTSPOT SYSTRAYICON ICONFILENAME XHOTSPOT YHOTSPOT SYSTRAYTIP TOOLTIPSTRING SYSTRAYMENU MENUARRAY Example: SPEEDMENUARRAY[0] = "1 Second" SPEEDMENUARRAY{0} = label1sec SPEEDMENUARRAY[1] = "2 Seconds" SPEEDMENUARRAY{1} = label2sec SPEEDMENUARRAY[2] = "5 Seconds" SPEEDMENUARRAY{2} = label5sec SPEEDMENUARRAY[3] = "10 Seconds" SPEEDMENUARRAY{3} = label10sec SPEEDMENUARRAY[4] = "30 Seconds" SPEEDMENUARRAY{4} = label30sec SPEEDMENUARRAY[5] = "1 Minute" SPEEDMENUARRAY{5} = label1min SPEEDMENUARRAY[6] = "2 Minutes" SPEEDMENUARRAY{6} = label2min SPEEDMENUARRAY[7] = "5 Minutes" SPEEDMENUARRAY{7} = label5min SPEEDMENUARRAY[8] = "10 Minutes" SPEEDMENUARRAY{8} = label10min MENUARRAY[0] = "About" MENUARRAY{0} = labelshowabout MENUARRAY[1] = "Speed" MENUARRAY{1} = &SPEEDMENUARRAY MENUARRAY[2] = "Exit" MENUARRAY{2} = labelexitnow SYSTRAYTIP "AfterGRASP Example" SYSTRAYMENU &MENUARRAY WINDOWFORCETOP has a new option, NOTOPMOST, same as ON except it does not make the window the absolute topmost window. WINDOWFORCETOP ; same as ON WINDOWFORCETOP ON WINDOWFORCETOP OFF WINDOWFORCETOP NOTOPMOST WINFINDBYCLASS and WINFINTBYTITLE now support 2 more optional parameters: RESULTHWND = WINFINDBYCLASS(CLASS) RESULTHWND = WINFINDBYCLASS(CLASS) RESULTHWND = WINFINDBYCLASS(CLASS,HWNDPARENT) RESULTHWND = WINFINDBYCLASS(CLASS,HWNDPARENT,HWNDCHILDAFTER) RESULTHWND = WINFINDBYCLASS(CLASS,HWNDPARENT,HWNDCHILDAFTER,TITLE) RESULTHWND = WINFINDBYTITLE(TITLE) RESULTHWND = WINFINDBYTITLE(TITLE,HWNDPARENT) RESULTHWND = WINFINDBYTITLE(TITLE,HWNDPARENT,HWNDCHILDAFTER) RESULTHWND = WINFINDBYTITLE(TITLE,HWNDPARENT,HWNDCHILDAFTER,CLASS) HWNDPARENT Handle to the parent window whose child windows are to be searched. If hwndParent is NULL, the function uses the desktop window as the parent window. The function searches among windows that are child windows of the desktop. HWNDCHILDAFTER Handle to a child window. The search begins with the next child window in the Z order. The child window must be a direct child window of hwndParent, not just a descendant window. If hwndChildAfter is NULL, the search begins with the first child window of hwndParent. Example which reads the Windows Task Bar height: drawclear white dllsetup user32.dll dword "GetWindowRect" GetWindowRect hwnd farptr memnew rect 16 GetWindowRect WinFindByClass("Button", WinFindByClass("Shell_TrayWnd")) @rect taskbarheight = @desktopsizey-#rect[4] messagebox "TaskBarHeight = "$@taskbarheight wait ---------------------------------------------------------------------------- Thu, 13 Apr 2006 New command WINDOWPOSITIONSTYLE, controls what style attributed are passed to Windows each time the WINDOWPOSITION command is used. The default value is: WINDOWPOSITIONSTYLE SHOWWINDOW NOZORDER NOCOPYBITS FRAMECHANGED HWNDTOP INVALIDATERECT Possible options are: ASYNCWINDOWPOS DEFERERASE DRAWFRAME FRAMECHANGED HIDEWINDOW NOACTIVATE NOCOPYBITS NOMOVE NOOWNERZORDER NOREDRAW NOREPOSITION NOSENDCHANGING NOSIZE NOZORDER SHOWWINDOW HWNDTOP HWNDBOTTOM HWNDTOPMOST HWNDNOTOPMOST INVALIDATERECT Some notes on these flags: ASYNCWINDOWPOS If the calling thread and the thread that owns the window are attached to different input queues, the system posts the request to the thread that owns the window. This prevents the calling thread from blocking its execution while other threads process the request. DEFERERASE Prevents generation of the WM_SYNCPAINT message. DRAWFRAME Draws a frame (defined in the window's class description) around the window. FRAMECHANGED Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed. HIDEWINDOW Hides the window. NOACTIVATE Does not activate the window. If this flag is not set, the window is activated and moved to the top of either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter parameter). NOCOPYBITS Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client area are saved and copied back into the client area after the window is sized or repositioned. NOMOVE Retains the current position (ignores X and Y parameters). NOOWNERZORDER Does not change the owner window's position in the Z order. NOREDRAW Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent window uncovered as a result of the window being moved. When this flag is set, the application must explicitly invalidate or redraw any parts of the window and parent window that need redrawing. NOREPOSITION Same as the NOOWNERZORDER flag. NOSENDCHANGING Prevents the window from receiving the WM_WINDOWPOSCHANGING message. NOSIZE Retains the current size (ignores the cx and cy parameters). NOZORDER Retains the current Z order (ignores the hWndInsertAfter parameter). SHOWWINDOW Displays the window. HWNDBOTTOM Places the window at the bottom of the Z order. If the hWnd parameter identifies a topmost window, the window loses its topmost status and is placed at the bottom of all other windows. HWNDNOTOPMOST Places the window above all non-topmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a non-topmost window. HWNDTOP Places the window at the top of the Z order. HWNDTOPMOST Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated. INVALIDATERECT Forces a InvalidateRect API call before the SetWindowPosition to force the screen to be updated. ---------------------------------------------------------------------------- Wed, 12 Apr 2006 FONTLOAD of AGF fonts was broken in the 06 Apr 2006 build. Fixed. ---------------------------------------------------------------------------- Mon, 10 Apr 2006 Long standing bug in HTML processing where tag was not entirely reseting the HTML parser is fixed. This could cause odd errors when using TEXTFROM to display sections of text where a tag pair crossed the boundry of the end of a section. Fixed. ---------------------------------------------------------------------------- Thu, 06 Apr 2006 TEXTFIT and TEXTFROM commands removed (replaced with TEXTLINESFIT and TEXTLINESFROM) New set of commands (and documentation for TEXTLINES): TEXTLINES TEXTLINESFIT TEXTLINESFROM TEXTLINESHEIGHT TEXTSTRPOSITIONFIT TEXTSTRPOSITIONFROM TEXTSTRPOSITIONHEIGHT TEXTSTRPOSITIONLINES LINES = TEXTLINES(TEXTSTRING) LINES = TEXTLINES(TEXTSTRING, STARTLINE) LINES = TEXTLINES(TEXTSTRING, STARTLINE, WIDTH) LINES = TEXTLINES(TEXTSTRING, STARTLINE, WIDTH, HEIGHT) LINES = TEXTLINESFIT(TEXTSTRING) LINES = TEXTLINESFIT(TEXTSTRING, STARTLINE) LINES = TEXTLINESFIT(TEXTSTRING, STARTLINE, WIDTH) LINES = TEXTLINESFIT(TEXTSTRING, STARTLINE, WIDTH, HEIGHT) TEXTLINESFROM TEXTSTRING STARTLINE TEXTLINESFROM TEXTSTRING STARTLINE LINECOUNT YPIXELS = TEXTLINESHEIGHT(TEXTSTRING, WIDTH, STARTLINE) YPIXELS = TEXTLINESHEIGHT(TEXTSTRING, WIDTH, STARTLINE, LINECOUNT) CHARPOS = TEXTSTRPOSITIONFIT(TEXTSTRING, WIDTH, HEIGHT, STARTSTRPOSITION) CHARPOS = TEXTSTRPOSITIONFIT(TEXTSTRING, WIDTH, HEIGHT, STARTSTRPOSITION, ENDSTRPOSITION) TEXTSTRPOSITIONFROM TEXTSTRING STARTSTRPOSITION TEXTSTRPOSITIONFROM TEXTSTRING STARTSTRPOSITION ENDSTRPOSITION YPIXELS = TEXTSTRPOSITIONHEIGHT(TEXTSTRING, WIDTH, STRPOSITION) YPIXELS = TEXTSTRPOSITIONHEIGHT(TEXTSTRING, WIDTH, STRPOSITION, ENDSTRPOSITION) LINES = TEXTSTRPOSITIONLINES(STR, WIDTH, HEIGHT, STRPOSITION) LINES = TEXTSTRPOSITIONLINES(STR, WIDTH, HEIGHT, STRPOSITION, ENDSTRPOSITION) HTML ASCII code support "&#NUMBER;" fixed, was broken for the last few builds. Limited Unicode support for HTML text has been added. ASCII codes above 255 are permitted for "&#NUMBER;". This is not supported for anti-aliased text, or for fontdefine. It only works on WINFONT fonts. You still cannot create a AGF font with more than 256 characters. This support works in all text operations that support HTML text including textwidth, textheight, textfrom and so on. ---------------------------------------------------------------------------- Fri, 24 Mar 2006 Extensive error checking added to all string functions to check for possible null strings (could have caused CRASH errors). Numerous small tweaks made to TEXTHEIGHT to make it match the exact height of TEXT commands. TEXTFROMSTRIP now applies to TEXTHEIGHT and TEXTLINES. ---------------------------------------------------------------------------- Thu, 23 Mar 2006 Bug in Modular compiler was never including the XML library if XML was used. Modular compiler now excludes TIFF library if no load or save TIFF is used, PNG library is no load or save PNG are used, JPEG library is no load or save JPEG is used, and XML library is no XML commands are used. This doesn't actually reduce runtime size, but does slightly speed up link time, and helps me to catch bugs. Two calls in Direct NET code were referencing WSOCK32.DLL directly which would have forced TCP/IP networking to be installed in order to run AfterGRASP. Fixed. ---------------------------------------------------------------------------- Wed, 22 Mar 2006 Fixed a crashing bug (divide by zero) in scrollboxes. Had to do with elevator position on a scroll box where the area below the text (to be scrolled) was 0 pixels high. More error checking added for opening NET: filenames, and NETOPEN. NETREADCOUNT support written. New command NETLOOKUP, takes a domain name and returns the IP address as a string, four integers seperated by periods. If it fails it returns a NULL string (blank). ---------------------------------------------------------------------------- Tue, 21 Mar 2006 FILECLOSE FILEREAD* FILEWRITE* and FILESEEK commands now accept a variable name for a handle, for example: fs = fileopen("test.txt") result = fileread(fs) fileclose fs WHEN NETSERVE, NETREADREADY and NETCLOSED partially done, not working yet. FILEREADLINE now supported (previous did nothing at all). RESULT = FILEREADLINE(HANDLE) FILEREAD now supports reading all remaining bytes and returning the result as a string, and reading N number of bytes, also returning the result as a string: FILEREAD HANDLE BUFFERADDRESS BYTECOUNT RESULT = FILEREAD(HANDLE) RESULT = FILEREAD(HANDLE, BYTECOUNT) NET:FILENAME is in and working, here is a runable example that uses fileappend with a net:filename and fileread with just the handle to read whatever data is available: drawclear white color green textln "making connection" set file fileappend("net:www.aftergrasp.com:80") ; set file netopen("www.aftergrasp.com", 80) ; same thing textln "sending GET string" color black filewriteline file "GET /test.htm HTTP/1.0" filewriteline file "Host: www.aftergrasp.com" filewriteline file "" set textwrap off timerset start contentlength = 0 while @start<10000 s = filereadline(file) textln @s if strlen(@s)==0 break cl = "Content-Length: " if strleft(@s, strlen(@cl))==@cl contentlength = strleftright(@s, strlen(@cl)) endif endloop textln "" color blue text fileread(file, @contentlength) color red text "done" fileclose file wait exitnow FileOpen/FileAppend no longer check for GZIP compression when opening FTP: HTTP: or NET: files (didn't make sense). ---------------------------------------------------------------------------- Fri, 17 Mar 2006 New function HTTPQUERYS, returns an array of all HTTPQUERY results. RESULTARRAY = HTTPQUERY() RESULTARRAY = HTTPQUERY(URL) Runable example: drawclear white color black url = "http://www.aftergrasp.com/test.htm" fullstring = "URL = "$@url$@crlf$@crlf http getvar @url test query = httpquerys() filedelete httpresults.txt fileputvariables httpresults.txt query filesendln httpresults.txt @@test appshell open httpresults.txt wait 100 exitnow Results look like this: query[ACCEPT_RANGES] = bytes query[CONTENT_LENGTH] = 217 query[CONTENT_TYPE] = text/html query[DATE] = "Tue, 14 Mar 2006 18:49:57 GMT" query[ETAG] = """514c113-d9-440f023b""" query[LAST_MODIFIED] = "Wed, 08 Mar 2006 16:11:39 GMT" query[RAW_HEADERS] = "HTTP/1.1 200 OK" query[RAW_HEADERS_CRLF] = "HTTP/1.1 200 OK Date: Tue, 14 Mar 2006 18:49:57 GMT Server: Apache Last-Modified: Wed, 08 Mar 2006 16:11:39 GMT ETag: ""514c113-d9-440f023b"" Accept-Ranges: bytes Content-Length: 217 Content-Type: text/html " query[REQUEST_METHOD] = GET query[SERVER] = Apache query[STATUS_CODE] = 200 query[STATUS_TEXT] = OK query[VERSION] = HTTP/1.1 Close to finalized syntax for new NET commands for direct TCP/IP networking, not working yet (partially written): Three new WHEN types, NETSERVE, NETREADREADY and NETCLOSED. The The first parameter passed to the trigger subroutine for all three of these new WHEN types is the handle for TCP/IP connection. NETSERVE is triggered for each incoming connection on the given TCP/IP port. WHEN NETSERVE PORT DECLARE HANDLE ... ENDWHEN NETREADREADY is triggered when N number of bytes are ready to be read from the given TCP/IP connection associated with HANDLE. If the COUNT option is given, it's the number of bytes to wait for until triggering the WHEN. If not given, a count of 1 is assumed. WHEN NETREADREADY HANDLE DECLARE HANDLE ... ENDWHEN WHEN NETREADREADY HANDLE COUNT DECLARE HANDLE ... ENDWHEN NETCLOSED is triggered when a TCP/IP connection is closed. WHEN NETCLOSED HANDLE ; First parameter passed to subroutine is HANDLE DECLARE HANDLE ... ENDWHEN Keep in mind that since an array index can be any type of value, you can use a TCP/IP connection handle as an array index to store connection specific information. For example: when servesub netserve 80 declare handle when closewhens[@handle] netclosed @handle free closewhens[@handle] readwhens[@handle] filenames[@handle] endwhen global filenames[@handle] netreadline(@handle) when readwhens[@handle] netreadready @handle declare handle filesend @filenames[@handle] netread(@handle) endwhen endwhen All file oriented commands support direct network I/O, just prepend the prefix "NET:" and the ":PORTNUM" after the address. HANDLE = FILECREATE("NET:ADDRESS:PORTNUM") HANDLE = FILEOPEN("NET:ADDRESS:PORTNUM") HANDLE = FILEAPPEND("NET:ADDRESS:PORTNUM") FILECLOSE HANDLE HANDLE = NETOPEN(ADDRESS,PORTNUM) ; Opens outgoing connection for read/write BYTECOUNT = NETREADCOUNT(HANDLE) ADDRESS = NETADDRESS(HANDLE) HANDLE->ACTIVE NETREAD HANDLE BUFFERADDRESS COUNT BYTECOUNT = NETWRITECOUNT(HANDLE) WAITNET HANDLE WAITNET HANDLE TIMEOUT WAITNETCLOSE HANDLE WAITNETCLOSE HANDLE TIMEOUT ---------------------------------------------------------------------------- Fri, 10 Mar 2006 STREVAL now supports these unirary operators: ! logical not # memgetlong $ str % memgetword * memgetbyte - negate + positive & variable reference ~ bitwise not For example: drawclear white color black textln streval("-!!@true") ; displays -1 wait exitnow STRLINE (and some other string functions) would accidently convert the string "." into "0.", they thought "." was a valid number. Fixed. Comparison of floating point numbers now returns an integer value. For instance 10.5!=10.0 used to return "1.0", but now returns "1" All system variables that expect integer values will now accept "ON" (same as "1") and "OFF" (same as "0") when passed those values as a string, or via STREVAL. This is a complete list of all system variables that are based on integer values. MANY are obscure unused 0 value stubs to prevent errors when porting GLPRO scripts. Many of those unused obscure variables are incorrectly treated as integers (they really should be strings or other special types). @ANIMABORT @APPUSESHELL32 @DATACOUNT @DBSKIPDELETED @DBUSEASCII @DEBUGEXIT @DEBUGMP3 @DEBUGNET @DEBUGPROFILE @DEBUGSYSTEMLIST @DEBUGTRACK @DEBUGWAV @DESKTOPBITS @DESKTOPBITSREAL @DESKTOPSIZEX @DESKTOPSIZEXREAL @DESKTOPSIZEY @DESKTOPSIZEYREAL @EMAILBYTES @EMAILCOUNT @EMAILDNSERROR @EMAILDNSSERVER @EMAILDNSTIMEOUT @EMAILERROR @EMAILFROM @EMAILMAILER @EMAILPRIORITY @EMAILPROXY @EMAILREPLY @EMAILTO @ERRORCRITICAL @ERRORLINE @ERRORLOAD @ERRORMESSAGE @ERRORNUMBER @ERRORSCRIPT @ERRORSTACK @ERRORTYPE @FALSE @FILEGZIP @FILEINDEXOPEN @FILEINDEXSAVE @FILELONGNAME @FILESHARE @FLOATDEGREES @FLOATDIGITS @FLOATEUROPEAN @FLOATROUND @FONTNAME @FONTSCANWIDTH @FTPBYTES @FTPCOUNT @FTPERROR @FTPPROXY @GLHANDLE @GLMERGEREVERSE @GLNAMEPREV @GLPROFOCUS @GLPROMULTIPLE @GLPROPLATFORM @GLPROUSER @GLPROWIN32 @HTTPBYTES @HTTPCOUNT @HTTPERROR @HTTPPATH @HTTPPROXY @HTTPTEMPDIR @IMAGECOMPRESSED @IMAGEDITHER @IMAGEEDGECOLOR @IMAGEEDGEENABLED @IMAGEEMFPERCENT @IMAGEEMFTEXTWIDTHS @IMAGEFADEBARSIZE @IMAGEFASTSCALE @IMAGEFLOATLAST @IMAGELOADCMYK @IMAGEPRELOAD @IMAGETRANENABLED @INIINTERNAL @INPUTABORT @INPUTBEGIN @INPUTCHANGE @INPUTFULLEXIT @INPUTINSERT @INPUTPASSWORD @INPUTPOSITION @INPUTRESTORE @INPUTSTRING @INPUTTIMEOUT @INPUTWRAP @KEYABORTDELAY @KEYCLEAR @KEYDOWNALT @KEYDOWNCTRL @KEYDOWNSHIFT @KEYHOTDELAY @KEYPRESSED @KEYUPALT @KEYUPCTRL @KEYUPSHIFT @LAYERHOTSPOT @LAYERSEPARATE @LAYERSKIPFRAMES @LOOP @MEMAVAILABLE @MEMNEAR @MEMUSED @MOUSE @MOUSEALWAYS @MOUSEDOWN @MOUSEDOWN1 @MOUSEDOWN2 @MOUSEDOWN3 @MOUSEDOWNX1 @MOUSEDOWNX2 @MOUSEKEY @MOUSEMOVED @MOUSEPRESSED @MOUSEUP @MOUSEUP1 @MOUSEUP2 @MOUSEUP3 @MOUSEUPX1 @MOUSEUPX2 @NETPROXYTYPE @NETTIMEOUT @NULL @PALETTEACCURATE @PALETTEEND @PALETTEENDEXCLUDE @PALETTEREMAP @PALETTESTART @PALETTESTARTEXCLUDE @PRINTCMYK @PRINTCOLORRES @PRINTMETRIC @PRINTPIXELSX @PRINTPIXELSY @PRINTRESX @PRINTRESY @PRINTSIZEX @PRINTSIZEY @SCRIPTBUFFER @SCRIPTSIZE @SOUNDBLOCKSIZE @SOUNDCACHEBITS @SOUNDCACHECHANNELS @SOUNDCACHEHEAD @SOUNDCACHERATE @SOUNDCACHESIZE @SOUNDCACHETAIL @SOUNDCLOCK @SOUNDDEVICE @SOUNDELAPSED @SOUNDLEVEL @SOUNDLEVELLEFT @SOUNDLEVELRIGHT @SOUNDMIXLEADTIME @SOUNDPLAYING @SOUNDVOLUME @SOUNDVOLUMELEFT @SOUNDVOLUMERIGHT @STACK @SYSCPUMMX @SYSCPUTYPE @SYSCTRLALTDEL @SYSDISKMAX @SYSDPMS @SYSESC @SYSLOCKINPUT @SYSMESSAGEDELAY @SYSMESSAGESKIP @SYSOS2 @SYSRUNBACK @SYSSLEEP @SYSSPACE @SYSSWAPPATH @SYSYIELD @TRUE @VIDEOBENCHMARK @VIDEOSCALE @VIDEOSCALEX @VIDEOSCALEY @WHENBACKGROUND @WHENENABLED @WHENFIRSTONLY @WHENINSUB @WHENLASTFIRST @WHENOFFSCREEN @WIN2000 @WIN31 @WIN32 @WIN32FILEACCESS @WIN95 @WIN98 @WINBUILD @WINDOWBACKPOSX @WINDOWBACKPOSY @WINDOWBACKSIZEX @WINDOWBACKSIZEY @WINDOWBITDEPTH @WINDOWPOSX @WINDOWPOSY @WINDOWREFRESHRATE @WINDOWSCALED @WINDOWSCALEDX @WINDOWSCALEDY @WINDOWSIZEX @WINDOWSIZEY @WINFRAMEADR @WINFRAMEDIB @WINFRAMEDIBHDC @WINFRAMEHDC @WINFRAMEHDIB @WINFRAMELEN @WINHANDLE @WININSTANCE @WININSTANCEPREV @WINNT @WINSHOWSTYLE @WINSYSTEMDIRECTORY @WINVERSION @WINYTOPORIGIN ---------------------------------------------------------------------------- Wed, 08 Mar 2006 TEXTKERN done before a
        • tag is now supported. SET TEXTKERNSIZE when DRAWOFFSET is in use is fixed. Dividing one measure by another of the same type is fixed, so 12in/4in is 3 (it was returning 3in). Results of measure calculations that have no distance or percentage component are now returned as a plain floating point number. ---------------------------------------------------------------------------- Tue, 07 Mar 2006 Typo in yesterday's build kept COLORMIX COLORSATURATIONSET COLORHUESET and COLORBRIGHTNESSSET from being recognized as valid commands. Fixed. Inaccurate results in COLORSATURATIONSET COLORHUESET and COLORBRIGHTNESSSET fixed. Conversion of metric measurements to text is fixed. ---------------------------------------------------------------------------- Mon, 06 Mar 2006 The Height in IMAGESIZE when using a percentage was incorrect since the 22 Feb 2006 build. Fixed. Six new color functions/commands: COLORRESULT = COLORMIX(PCT1,COLOR1,PCT2,COLOR2 ...) COLORRESULT = COLORSATURATIONSET(PCTADDSUB, COLOR) COLORRESULT = COLORBRIGHTNESSSET(PCTADDSUB, COLOR) COLORRESULT = COLORHUESET(DEGREESADDSUB, COLOR) NEARCOLOR = COLORNEAREST(COLOR, MATCHCOLOR1, MATCHCOLOR2 ...) FARCOLOR = COLORFURTHEST(COLOR, MATCHCOLOR1, MATCHCOLOR2 ...) COLORMIX mixes 2 or more colors (no limit on how many). For instance, these lines all create a color that is 25% white, 50% black, and 25% blue: color colormix(25,white,50,black,25,blue) color colormix(1,white,2,black,1,blue) color colormix(10,blue,10,0xffffff,20,0) COLORSATURATIONSET adjusts the saturation in a color by adding or subtracting percentage count (-100 to +100). COLORBRIGHTNESSSET adjusts the brightness of a color by adding or subtracting percentage count (-100 to +100). COLORHUESET adjusts a color's hue by adding or subtracting an angle in degrees (-360 to +360). COLORNEAREST returns which match color is closest to the color passed. For instance: color colornearest("127,64,0", black, white) ; would return 0 (black) COLORFURTHEST returns which match color is furthest to the color passed. For instance: color colorfurthest("127,64,0", black, white, red) ; would return 0xffffff (white) STREVAL now handles function calls, for example: textln streval("max(1,2,3,4,abs(-5))") ; displays 5 New function/command used to get information on an HTTP connection: RESULT = HTTPQUERY(QUERYTYPE) RESULT = HTTPQUERY(QUERYTYPE, INDEX) RESULT = HTTPQUERY(QUERYTYPE, INDEX, URL) Query Types: ACCEPT Retrieves the acceptable media types for the response. ACCEPT_CHARSET Retrieves the acceptable character sets for the response. ACCEPT_ENCODING Retrieves the acceptable content-coding values for the response. ACCEPT_LANGUAGE Retrieves the acceptable natural languages for the response. ACCEPT_RANGES Retrieves the types of range requests that are accepted for a resource. AGE Retrieves the Age response-header field, which contains the sender's estimate of the amount of time since the response was generated at the origin server. ALLOW Receives the methods supported by the server. AUTHORIZATION Retrieves the authorization credentials used for a request. CACHE_CONTROL Retrieves the cache control directives. CONNECTION Retrieves any options that are specified for a particular connection and must not be communicated by proxies over further connections. COOKIE Retrieves any cookies associated with the request. CONTENT_BASE Retrieves the base URI for resolving relative URLs within the entity. CONTENT_ENCODING Receives any additional content codings that have been applied to the entire resource. CONTENT_ID Receives the content identification. CONTENT_LANGUAGE Receives the language that the content is in. CONTENT_LENGTH Receives the size of the resource, in bytes. CONTENT_LOCATION Retrieves the resource location for the entity enclosed in the message. CONTENT_MD5 Retrieves a MD5 digest of the entity-body for the purpose of providing an end-to-end message integrity check (MIC) for the entity-body. CONTENT_RANGE Retrieves the location in the full entity-body where the partial entity-body should be inserted and the total size of the full entity-body. CONTENT_TRANSFER_ENCODING Receives the additional content coding that has been applied to the resource. CONTENT_TYPE Receives the content type of the resource (such as text/html). DATE Receives the date and time at which the message was originated. ETAG Retrieves the entity tag for the associated entity. EXPIRES Receives the date and time after which the resource should be considered outdated. FROM Retrieves the e-mail address for the human user who controls the requesting user agent if the From header is given. HOST Retrieves the Internet host and port number of the resource being requested. IF_MATCH Retrieves the contents of the If-Match request-header field. IF_MODIFIED_SINCE Retrieves the contents of the If-Modified-Since header. IF_NONE_MATCH Retrieves the contents of the If-None-Match request-header field. IF_RANGE Retrieves the contents of the If-Range request-header field. This header allows the client application to check if the entity related to a partial copy of the entity in the client application's cache has not been updated. If the entity has not been updated, send the parts that the client application is missing. If the entity has been updated, send the entire updated entity. IF_UNMODIFIED_SINCE Retrieves the contents of the If-Unmodified-Since request- header field. LAST_MODIFIED Receives the date and time at which the server believes the resource was last modified. LOCATION Retrieves the absolute URI used in a Location response-header. MAX Retrieves the maximum value of an HTTP_QUERY_* value. MAX_FORWARDS Retrieves the number of proxies or gateways that can forward the request to the next inbound server. MIME_VERSION Receives the version of the MIME protocol that was used to construct the message. PRAGMA Receives the implementation-specific directives that may apply to any recipient along the request/response chain. PROXY_AUTHENTICATE Retrieves the authentication scheme and realm returned by the proxy. PROXY_AUTHORIZATION Retrieves the header that is used to identify the user to a proxy that requires authentication. PUBLIC Receives methods available at this server. RANGE Retrieves the byte range of an entity. RAW_HEADERS Receives all the headers returned by the server. Each header is terminated by "\0". An additional "\0" terminates the list of headers. RAW_HEADERS_CRLF Receives all the headers returned by the server. Each header is separated by a carriage return/line feed (CR/LF) sequence. REFERER Receives the URI of the resource where the requested URI was obtained. REQUEST_METHOD Receives the verb that is being used in the request, typically GET or POST. RETRY_AFTER Retrieves the amount of time the service is expected to be unavailable. SERVER Retrieves information about the software used by the origin server to handle the request. SET_COOKIE Receives the value of the cookie set for the request. STATUS_CODE Receives the status code returned by the server. STATUS_TEXT Receives any additional text returned by the server on the response line. TRANSFER_ENCODING Retrieves the type of transformation that has been applied to the message body so it can be safely transferred between the sender and recipient. UPGRADE Retrieves the additional communication protocols that are supported by the server. URI Receives some or all of the Uniform Resource Identifiers (URIs) by which the Request-URI resource can be identified. USER_AGENT Retrieves information about the user agent that made the request. VARY Retrieves the header that indicates that the entity was selected from a number of available representations of the response using server-driven negotiation. VERSION Receives the last response code returned by the server. VIA Retrieves the intermediate protocols and recipients between the user agent and the server on requests, and between the origin server and the client on responses. WARNING Retrieves additional information about the status of a response that may not be reflected by the response status code. WWW_AUTHENTICATE Retrieves the authentication scheme and realm returned by the server. Here is a working example of HTTPQUERY: drawclear white color black list = array( ACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACCEPT_RANGES, AGE, ALLOW, AUTHORIZATION, CACHE_CONTROL, CONNECTION, COOKIE, CONTENT_BASE, CONTENT_ENCODING, CONTENT_ID, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_RANGE, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, DATE, ETAG, EXPIRES, FROM, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_RANGE, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LOCATION, MAX, MAX_FORWARDS, MIME_VERSION, PRAGMA, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PUBLIC, RANGE, REFERER, REQUEST_METHOD, RETRY_AFTER, SERVER, SET_COOKIE, STATUS_CODE, STATUS_TEXT, TRANSFER_ENCODING, UPGRADE, URI, USER_AGENT, VARY, VERSION, VIA, WARNING, WWW_AUTHENTICATE) url = "http://www.aftergrasp.com" fullstring = "URL = "$@url$@crlf$@crlf http getvar @url test for item in strlist(@list) result = httpquery(@item) if strlen(@result) textln @item$" = "$@result fullstring = @fullstring$@item$" = "$@result$@crlf endif next filedelete httpresults.txt filesendln httpresults.txt @fullstring appshell open httpresults.txt wait 100 exitnow ***NOT WRITTEN YET*** New NET commands for direct TCP/IP networking: WHEN NETSERVE port @NETHANDLES @NETHANDLE HANDLE = NETOPEN(address,port) NETCLOSE HANDLE NETREAD HANDLE BUFFERADDRESS COUNT RESULT = NETREADBYTE(HANDLE) RESULT = NETREADWORD(HANDLE) RESULT = NETREADLONG(HANDLE) RESULT = NETREADFLOAT(HANDLE) RESULT = NETREADLINE(HANDLE) NETWRITE HANDLE BUFFERADDRESSS COUNT NETWRITEBYTE HANDLE BYTEVAL NETWRITEFLOAT HANDLE FLOATVAL NETWRITELINE HANDLE STRING NETWRITELONG HANDLE LONGVAL NETWRITEWORD HANDLE WORDVAL NETWAIT TIMEOUT NETWAITCLOSE TIMEOUT RESULT = NETACTIVE(HANDLE) ---------------------------------------------------------------------------- Fri, 03 Mar 2006 Constant used to calculate metric distances was slightly off (about 0.01%), corrected to be 5000/127 inches per meter. The variable not found error now displays the variable name. The COLORGET command when passed no coordinates now returns the color read from pixel location (0,0) instead of just returning color 0. New command, IMAGECOLORGET, first parameter is an image buffer, the parameters which follow are identical to the COLORGET command: COLORRESULT = IMAGECOLORGET(IMAGEBUF) COLORRESULT = IMAGECOLORGET(IMAGEBUF,XPOS,YPOS) IMAGECOLORGET IMAGEBUF VARNAME IMAGECOLORGET IMAGEBUF XPOS YPOS VARNAME IMAGECOLORGET IMAGEBUF XPOS YPOS RVARNAME GVARNAME BVARNAME ---------------------------------------------------------------------------- Thu, 02 Mar 2006 PM All commands that accept colors will now accept a single string of 3 decimal numbers seperated by spaces or commas as a RGB color value. Like this: set colornum "128,0,128" color "255 255 0" New command VARSYSTEM, returns true if a variable is a system variable. If passed more than 1 parameter, then the system variable is set. For example: varsystem colornum black if varsystem(colornum) text "ColorNum is a system variable" endif set varname colornum set value 0 if !varsystem(@varname,@value) set @varname @value endif The STREVAL function now handles system variables, for instance: color 127 textln streval("@colornum") ; displays 127 ---------------------------------------------------------------------------- Thu, 02 Mar 2006 DRAWOFFSET with no parameters was not restoring the previous draw offset, it was reseting back to the original draw offset (like DRAWOFFSETRESET). Fixed. DRAWOFFSET with just two parameters now shifts the draw offset area, instead of shrinking it. DRAWOFFSET allows you to create a draw offset that is outside the bounds of the window. It does not bounds checking. ---------------------------------------------------------------------------- Tue, 28 Feb 2006 Debug VARIABLES ON display of measurements that include a percentage was broken. Fixed. Four new system variables DRAWWIDTH DRAWHEIGHT DRAWOFFWIDTH and DRAWOFFHEIGHT @DRAWWIDTH is the same as 1+@DRAWMAXX-@DRAWMINX @DRAWHEIGHT is the same as 1+@DRAWMAXY-@DRAWMINY @DRAWOFFWIDTH is the same as 1+@DRAWOFFMAXX-@DRAWOFFMINX @DRAWOFFHEIGHT is the same as 1+@DRAWOFFMAXY-@DRAWOFFMINY New command IMAGESIZEFIT, same exact syntax as IMAGESIZE except it will size an image so that it fits within the given size without distorting, maintaining the original aspect ratio. All these variables and commands which accepted "ON" and "OFF" are fixed to allow those strings even when passed in a variable or via the WITH command. @DRAWAND @DRAWOR @DRAWXOR @TEXTCENTER @TEXTCLIP @TEXTCOLORCODES @TEXTDRAW @TEXTDRAWBACK @TEXTFONTCODES @TEXTFROMSTRIP @TEXTHTML @TEXTHTMLANTIFONT @TEXTHTMLTABS @TEXTHTMLWINFONT @TEXTINDENT @TEXTJUSTIFIED @TEXTLEFT @TEXTMONOSPACE @TEXTQUICK @TEXTRIGHT @TEXTRTF @TEXTSCROLL @TEXTWRAP @TEXTWRAPPUNCT DRAWFLOOD For instance: with texthtml on text @sometext Now works as expected. ---------------------------------------------------------------------------- Fri, 24 Feb 2006 IMAGESIZE when used with DRAWOFFSET was broken, fixed. ---------------------------------------------------------------------------- Wed, 22 Feb 2006 DRAWBOX completely rewritten to be dramaticly faster for thicker widths. In the past 4 x WIDTH number of filled rectangles were drawn for each box. Now a maximum of 4 filled rectangles are drawn. Also for all bit depths below 24bits per pixel, and for print devices a single windows Rectangle() API call is used with a hollow brush. DRAWBOXROUND DRAWRECTROUND were drawing images too small by one pixel on the bottom and right sides. DRAWRECT when used on a printer, or bit depths bellow 24 was drawing images too small by a 1 or more pixels depending on the size of the rectangle. Runable test which showed the problems (and that they are fixed now): windowsize 800 600 8 drawclear white color 0 imagenew test 101 101 imageput 100 100 test imageput 100 220 test imageput 220 100 test imageput 220 220 test color yellow drawbox 101 101 199 199 drawboxround 221 101 319 199 drawrect 101 221 199 319 drawrectround 221 221 319 319 wait exitnow ---------------------------------------------------------------------------- Tue, 21 Feb 2006 New command, FILESTRREPLACE, used to replace strings in a file. Useful for working with large files that would require a huge amount of memory to process if you loaded them into memory as a string. Uses 64bit counts, so it will handle files larger than 4GB, and will work with binary data. FILESTRREPLACE SOURCEFILENAME DESTINATIONFILENAME STRA STRB ... New commands TOSIZEX and TOSIZEY, go along with new operators, (VALUE)SIZEX and (VALUE)SIZEY. Works primarily the same as the existing TOSIZE command (VALUE)SIZE operator, except with axis specific values, such as percentages. Example: drawbox 100 100 (50pct)sizex (50pct)sizey TOSIZE and (VALUE)SIZE were broken when used with a DRAWOFFSET, fixed. ---------------------------------------------------------------------------- Thu, 16 Feb 2006 topixelsx and topixelsy functions, and )pixelsx and )pixelsy operators are fixed when used with a DRAWOFFSET (they now subtract @DRAWOFFMINX/@DRAWOFFMINY from the pixel value). Postscript image mask compressed was accidently disabled, it's re-enabled. DRAWOFFSET changed so that it is relative to any previous draw offset. DRAWOFFSET with no parameters now reverts to the previous draw offset. The list of draw offsets is kept up to 16 deep. New command DRAWOFFSETRESET, resets the draw offset to the maximum (original image boundries). Also flushes any previous draw offsets. It accepts the same parameters as DRAWOFFSET, so you can create a new draw offset with a single command. This is very much like the old behavior of the DRAWOFFSET command. New system variables which are the bounds of the current draw offset: @DRAWOFFMINX @DRAWOFFMINY @DRAWOFFMAXX @DRAWOFFMAXY ---------------------------------------------------------------------------- Wed, 15 Feb 2006 INC/DEC with a string was corrupting any previous use of that string (it was destroying the actual token's original value). Fixed. STREVAL with no value or a NULL value would crash. SET VARIABLES ON was broken in last build for variables with a NULLT value (nothing was shown). Now the "varname = NULLT" will appear. NULLT means "NULL Token", a non value, not zero, not a string, not a number. Subreferences with arrays were broken in many cases, flakey in others. Entire array subreference code, and variable name search code is rewritten to handle nested subreferences. Here is a small example that now works correctly, it failed completely in previous builds: set test[john][a][m] aaa ; made following code fail set test[john][b] bbb set test[john][c] ccc set test[john][d] ddd set test[john]{x} xxx set test[john]{y} yyy set test[john]{z} zzz set david test[john] ; failed on some multi-dimensional arrays, fixed. set vicky strlist(@david) ; didn't work, fixed. set edward &david[a] ; didn't work, fixed. set bob @edward ; didn't work, fixed. set variables on wait exit ---------------------------------------------------------------------------- Thu, 09 Feb 2006 XMLLOAD no longer creates lots of single element arrays for single text elements. Bug in SET PRINTNAME fixed, it was leaving the printname on the stack. STREVAL is now supported, but only for a very limited subset of features for now. The only two features supported for now are variables using '@' and measurements. result = streval("22in") testvar = goodbye result = streval("@testvar") ; gives "goodbye" testvar = varname varname = hello result = streval("@@testvar") ; gives "hello" Two new commands LOCALUNDER and LOCALUNDERS. Work exactly like LOCAL and LOCALS except they create a variable that is local to the calling function. For example: test1 if !vardef(goodbye) messagebox "goodbye undefined" endif exitnow test1: test2 messagebox goodbye1 @goodbye return test2: localunder goodbye hello messagebox goodbye2 @goodbye return The ARRAYATTRIB command is changed to display the indexes for attributes in an array. The ARRAYINDEX command now only shows indexes for an array where the array's element has a valid value. It does not display indexes for attributes in an array. For example: set test{1} a set test{2} b set test{3} c set test[1] a set test[4] b textln strlist(arrayindex(test)) ; Displays "1 4" textln strlist(arrayattrib(test)) ; Displays "1 2 3" Using INC or DEC where the variable contains a string with digits in it will no longer force the string to be converted into a number. For example: value = item3 for 5 ; Displays "item3 item5 item7 item9 item11" text @value$" " inc value 2 next For decrementing or negative values, the prefix 999 is prepended to the numerical part. value = item3box for 4 ; Displays "item3box item0box item9997box item9994box" text @value$" " inc value -3 next ---------------------------------------------------------------------------- Mon, 06 Feb 2006 Crashing bug with unicode characters in HTML fixed. Unicode characters are now processed correctly, but igored (AG doesn't support non-8bit character sets). ---------------------------------------------------------------------------- Thu, 02 Feb 2006 ->root wasn't being filled in correctly by XML load. New command TOMEASURE, it takes a string and if it's a numeric constant followed by a measurement suffix it will output a measurement object. xpos = tomeasure("50pct") ypos = tomeasure("3.2in") imageput @xpos @ypos example.gif The routine which translates ASCII into float had a small rounding error now fixed. For example 100.547 was being stored as 100.5470000001 This was preventing some floating point constants from being compiled correctly by AGCOMP. AGCOMP was storing floating point constants as 30 bit floating point. If a number could not be accurated represented in 30 bits (23bit frac, 6bit exp, and 1 bit sign), then the original string version of the number was stored. Now AGCOMP will also try fixed point scaled integer based on INT23BITVALUE/1000. To store this in place of a 30 bit floating point value, it uses the invalid exponent of 0 with sign of 1. This allows common base ten values to be stored more accurately without resorting to storing the original string version. AGCOMP now generates BASECMD encoding for all the measurement commands including: centimeters inches millimeters percentage picas pixels pixelsx pixelsy points size This allows these commands to take up one less 32bit word each use when encoded into compiled AGC file. Also allows for more complex compound commands (like 12.5pct being stored in a single 32bit word). AGCOMP when combining a constant with a BASECMD used to only support a signed 23bit integer. Now it supports a 21bit intger, with flags for scaled integers (divided by 1000), and for a leading tail. This allows an expression like 12.5pct, which compiles into (12.5 topct) to be encoded as a single 32bit word. Previously it would be encoded as pushtail, pushnumber 12.5, call cmd_topct. Three 32bit words. All these changes mean that any AGC files compiled with older versions of AGCOMP may not play correctly in the new AGPLAY runtime. Also AGC files compiled with this new version of AGCOMP absolutely will not play correctly with older AGPLAY runtimes. ---------------------------------------------------------------------------- Mon, 30 Jan 2006 New element for arrays, ->root. This is used for XML loading and saving, and is the root element from the XML tree. This means you must not specify the root element when referencing an XML document you've loaded. For example: drawclear white color black xmlload "C:\WINDOWS\system32\Restore\filelist.xml" test set variables on textln done textln test->root ; displays "PCHealthProtect" excludes = array(@test["FILES"]["Exclude"]["REC"]) healthfiles = test["FILES"] includes = array(@healthfiles["Include"]["REC"]) firstexclude = @test["FILES"]["Exclude"]["REC"][0] forever AfterGRASP elements are now setable, for example: drawclear white color black xmlload "C:\WINDOWS\system32\Restore\filelist.xml" test set test->root "NotPCHealthProtect" xmlsave "C:\WINDOWS\system32\Restore\filelist.xml" test forever The following AfterGRASP elements are setable (be careful, some are internal variables that may cause crashing or unpredictable results if changed): ->bits ->edgeaveragex ->edgeaveragey ->edgecenterx ->edgecentery ->edgeradiusx ->edgeradiusy ->imagedensityx ->imagedensityy ->imagehbitmap ->imagehdc ->layerbusy ->origsizex ->origsizey ->panoangle ->panotilt ->panoview ->root ->sizex ->sizey ->textoffx ->textoffy ->virtsizex ->virtsizey ->x1 ->x2 ->y1 ->y2 ---------------------------------------------------------------------------- Thu, 26 Jan 2006 Multi-dimensional arrays can now go 32 levels deep (previously it was 10). DIRDELETE fixed! (always been broken). Return code is the window's error code returned by GetLastError(). Typical error is "5", for Access Denied. Setup updated to use Innosetup 5.1.6 Crash when errors found during an XML load are fixed. XML Element attributes are now handled by the XML load. They are referenced like this: text @doc[image]{test} VARIABLES ON displays attributes with the {} around the attribute name Attributes apply to any array, so you can do: set example{test} 100 set example[test] 200 textln @example{test} ; displays 100 textln @example[test] ; displays 200 ---------------------------------------------------------------------------- Thu, 19 Jan 2006 Install updated to add missing registry entries that AGEDIT wanted. Internally the XMLDOC type is now the same as an array. XML Access now working. Changes are not written back with an XMLSAVE (the changes made to the array are not reflected into the XML tree structure yet). Here is a working example: drawclear white color black xmlload "C:\WINDOWS\system32\Restore\filelist.xml" test set variables on textln done excludes = array(@test["PCHealthProtect"]["FILES"]["Exclude"]["REC"]) healthfiles = test["PCHealthProtect"]["FILES"] includes = array(@healthfiles["Include"]["REC"]) firstexclude = @test["PCHealthProtect"]["FILES"]["Exclude"]["REC"][0] forever Notice the XML tag names are in quotes to preserve their mixed (upper and lower) case. ---------------------------------------------------------------------------- Mon, 16 Jan 2006 First new commands to support XML: XMLNEW VARNAME XMLLOAD FILENAME XMLLOAD FILENAME VARNAME XMLLOAD HTTPFTPURL XMLLOAD HTTPFTPURL VARNAME XMLSAVE FILENAME XMLFREE VARNAME The XMLLOAD actually works (If you SET VARIABLES ON you will see it's been loaded). drawclear white color black xmlload "C:\WINDOWS\system32\Restore\filelist.xml" test set variables on textln done forever Access syntax unfinished. Expected syntax is: xmlload "C:\WINDOWS\system32\Restore\filelist.xml" test excludes = array(@test[PCHealthProtect][FILES][Exclude][REC]) healthfiles = test[PCHealthProtect][FILES] includes = array(@healthfiles[Include][REC]) firstexclude = test[PCHealthProtect][FILES][Exclude][REC][0] The XML support requires WINSOCK Support, so AGPLAY is now directly linked to call WSOCK32.DLL. This may prevent AGPLAY from working on old versions of Win95. Let me know if this is an issue. If so, then I can create an interface layer that looks for the DLL, much like the calls to WININET.DLL that are done in AGPLAY right now. New modular option XMLDOC to disable all XML support. If no XML commands are used then AGCOMP will set XMLDOC to OFF. ---------------------------------------------------------------------------- Tue, 02 Jan 2006 Happy New Year! A couple big speed improvements made over the holidays. PostScript images, either printed or generated with IMAGEPOSTSCRIPT now use LZW compression for the mask (on images that have a mask set with IMAGEMASKSET). This results in DRASTICLY faster printing on large images since injecting the huge hex streams for an uncompressed mask could take minutes (and now take a few seconds). PALETTEOPTIMIZE rewritten almost entire from scratch to use double indexed sparse lookup tables to drasticly speed up the color search code. What could take minutes now takes a couple seconds, with more accurate cleaner results! This new code also has special cases to handle very large numbers of colors (greater than 65536 colors) in the source images. Copyright messages updated to 2006 ---------------------------------------------------------------------------- Wed, 14 Dec 2005 The IMAGELOADCMYK option now defaults to on since so many image operations now support CMYK directly. Two new system variables, provide the filenames for new CMYK to RGB and RGB to CMYK conversion support. The files are expected to be 48MB for the convert to RGB (6 bit accuracy, interpolation used to fill in missing values), and 64MB to convert to CMYK (full 8 bit accuracy). The files are basicly flat arrays, giant lookup tables read from disk when first needed, and kept in memory until program exit. @IMAGECONVERTTABLECMYK Default value is "sRGB IEC61966-2.1 to CMYK US Web Coated (SWOP) v2.array" @IMAGECONVERTTABLERGB Default value is "CMYK US Web Coated (SWOP) v2 to sRGB IEC61966-2.1.array" If the table cannot be loaded, then a algorithmic block of code is used instead. The results do NOT look entirely correct since the algorithmic code does not understand color spaces only generic raw CMYK values. IMAGECONVERT now supports a value of -32 for bits allowing conversion to CMYK (IMAGENEW already supported this). All imageput operations now support converting colorspace from CMYK to RGB and from RGB to CMYK. This includes IMAGECONVERT. New element for images ->imagecmyk Is zero for most images, and 1 for CMYK images. Example: drawclear white color black iscmyk[0] = "RGB" iscmyk[1] = "CMYK" set imageloadcmyk on imageload cmyktest messagebox @iscmyk[cmyktest->imagecmyk] imageconvert 24 cmyktest messagebox @iscmyk[cmyktest->imagecmyk] imageput cmyktest wait imageconvert -32 cmyktest messagebox @iscmyk[cmyktest->imagecmyk] imageput 100 100 cmyktest wait exitnow The ->imagepaletteadr and ->imageheadadr elements are now supported. The ->imageheadadr points to the BITMAPINFOHEADER for an image. The ->imagepaletteadr points to the 1024 byte palette in RGBQUAD format (standard windows). All file opens in AG, will search "C:\DigiLib" if the open fails. This means the color translation files can be stuck in C:\DigiLib and AG will find them. Without this new feature you would have to stick something like this in: set imageconverttablergb "C:\DigiLib\\"$@imageconverttablergb set imageconverttablecmyk "C:\DigiLib\\"$@imageconverttablecmyk AGEDIT data files updated for new variables and element. ---------------------------------------------------------------------------- Sun, 11 Dec 2005 PALETTEOPTIMIZE has a series of special cases added for large numbers of colors (many thousands). This is to speed up those cases which were taking minutes to run. This sacrifices a small amount of accuracy in those cases. IMAGESIZE (and image scaling in general) had a rounding error which would slightly reduce the brightness of some colors in some cases. Fixed. Drawing a 24bit/32bit hicolor image to a 8bit buffer is now dramaticly higher quality. It's also very slow since it calculates each pixel by finding the best match in the palette. This corrects incorrect results when using IMAGECONVERT 8, and IMAGESIZE on 8bit images. ---------------------------------------------------------------------------- Thu, 08 Dec 2005 AGEDIT replaced with older build from last December recompiled without the expiration date. AGEDIT Data files for commands, variables and elements are all updated. DRAWPIXEL with a color fixed, it was treating the color and coordinate pair as a RGB triplet. DRAWPIXEL, COLORGET, and IMAGESIZE all fixed to correctly handle CMYK images (true 32 bits per pixel). ---------------------------------------------------------------------------- Tue, 06 Dec 2005 NETOPENWEBPAGE used to create a temp file called "AG.HTM" in the Windows directory. The problem is, if you are a user without administrator privilages this will fail. So NETOPENWEBPAGE now uses the TEMP directory (and if that's not defined it uses C:\) Two new commands, APPCREATESHORTCUT and APPRESOLVESHORTCUT. APPCREATESHORTCUT FILENAME DESCRIPTION PATH Example: appcreateshortcut "c:\\example.exe" "My Example" "C:\\Documents and Settings\\Administrator\\Desktop\\Example.lnk" TRUEPATH = APPRESOLVESHORTCUT(PATH) Example: text appresolveshortcut("C:\\Documents and Settings\\Administrator\\Desktop\\Example.lnk") ; displays "c:\example.exe" ---------------------------------------------------------------------------- Sun, 04 Dec 2005 The IMAGEPOSTSCRIPT now works with decompressed images (ones loaded without IMAGECOMPRESSED ON), it also works with CMYK decompressed images, and images with IMAGEMASKSET. New system variable IMAGELOADCMYK, defaults to OFF, when ON, a CMYK JPEG when loaded will NOT be converted to RGB, it will be left as CMYK. This is mainly to be used for special printing applications and modifying CMYK images. Defaults to OFF SET IMAGELOADCMYK ON SET IMAGELOADCMYK OFF New option for IMAGECOMPRESSED, can now be set to BOTH which whenloading JPEGs will decompress the PEG as if IMAGECOMPRESSED was OFF, but will also load the compressed image file as well. All operations will use the decompressed image data except when writing to a PostScript printer where the compressed JPEG data will be used instead. Defaults to OFF Still has problems with some commands like IMAGESIZE. SET IMAGECOMPRESSED ON SET IMAGECOMPRESSED OFF SET IMAGECOMPRESSED BOTH Runable example: drawclear white color black imageload cmyktest.jpg test imageflood test pkgmask top left 8 ; create a mask (8% match) imagemaskset test pkgmask drawclear red imageput test imagefree test set imagecompressed on imageload cmyktest.jpg test set imagecompressed off imagemaskset test pkgmask imagefree pkgmask ; ; create a PostScript EPS file ; fname = "test.eps" pshead = "%!PS-Adobe-3.0 EPSF-3.0"$@crlf psmedia = "%%DocumentMedia: CustomMedia @XSIZE @YSIZE 0 white CustomMedia"$@crlf psmedia = strreplace(@psmedia, "@XSIZE", test->sizex, "@YSIZE", test->sizey) psbounding = "%%BoundingBox: 0 0 @XSIZE @YSIZE"$@crlf psbounding = strreplace(@psbounding, "@XSIZE", test->sizex, "@YSIZE", test->sizey) pscomments = "%%DocumentData: Clean7Bit"$@crlf$"%%LanguageLevel: 2"$@crlf$"%%EndComments"$@crlf$"%%BeginProlog"$@crlf$"%%EndProlog"$@crlf$"%%Page: 1 1"$@crlf$"%%PageMedia: CustomMedia"$@crlf pspagesize = "<< /PageSize [@XSIZE @YSIZE] >> setpagedevice"$@crlf pspagesize = strreplace(@pspagesize, "@XSIZE", test->sizex, "@YSIZE", test->sizey) psimage = imagepostscript(0, 0, test->sizex, test->sizey, test) pstail = "%%EOF"$@crlf postimage = @pshead$$@psmedia$@psbounding$@pscomments$@pspagesize$@psimage$@pstail filedelete "c:\test.eps" filesend "c:\test.eps" @postimage ; ; create a PostScript file of just this image, masked, original JPEG ; set printfilename "c:\test.ps" printstart printstartpage printset imagesize 100pct 0 test imageput test imageset printendpage printend exitnow Four new system variables for debugging: @DEBUGLINE returns current linenumber in script @DEBUGLINES returns the last 100 linenumbers executed in script @DEBUGSCRIPT returns current scriptname @DEBUGSCRIPTS returns the scriptname for the last 100 lines executed @DEBUGLINES and @DEBUGSCRIPTS would normally used with ARRAY() ARRAY(@DEBUGLINES)[0] gives the same result as @DEBUGLINE ARRAY(@DEBUGSCRIPTS)[0] gives the same result as @DEBUGSCRIPT ---------------------------------------------------------------------------- Thu, 17 Nov 2005 Long standing bugs in TEXTHEIGHT and TEXTWIDTH where the results could be incorrect if done after complex HTML/RTF text is fixed. ---------------------------------------------------------------------------- Wed, 09 Nov 2005 New option for the HTTP command, HTTP GET, returns the web page as a string. For example: messagebox http(get,"http://www.google.com") Or to detect a connection: connected = @FALSE if @netconnected http get "http://www.google.com" connected = !@httpERROR endif if !@connected messagebox "Internet Connection Not Working" exitnow endif @NETCONNECTED variable now supported. Valid return values are either -1 for no available (no networking). or a integer between 0 and 7 that is one or more of these flags added together. ; Local system uses a modem to connect to the Internet. GLOBAL INTERNET_CONNECTION_MODEM 1 ; Local system uses a local area network to connect to the Internet. GLOBAL INTERNET_CONNECTION_LAN 2 ; Local system uses a proxy server to connect to the Internet. GLOBAL INTERNET_CONNECTION_PROXY 4 NETCONNECT command now supported NETCONNECT AUTODIAL NETCONNECT AUTOHANGUP NETCONNECT DIAL ; unsupported NETCONNECT HANGUP ; does the same as AUTOHANGUP Two new system variables @HTTPGETFLAGS and @HTTPPUTFLAGS, They control the HTTP GET* and HTTP PUT* commands. Default values are: SET HTTPGETFLAGS TRANSFER_BINARY RELOAD DONT_CACHE SET HTTPPUTFLAGS NO_CACHE_WRITE All the options available are: ASYNC CACHE_ASYNC CACHE_IF_NET_FAIL EXISTING_CONNECT FORMS_SUBMIT FROM_CACHE HYPERLINK KEEP_CONNECTION MAKE_PERSISTENT NEED_FILE NO_AUTH NO_AUTO_REDIRECT NO_CACHE_WRITE NO_COOKIES NO_UI PASSIVE PRAGMA_NOCACHE RAW_DATA READ_PREFETCH RESYNCHRONIZE SECURE TRANSFER_ASCII TRANSFER_BINARY Details on these options specific to GET/PUT: HTTPGETFLAGS: EXISTING_CONNECT Attempts to use an existing InternetConnect object if one exists with the same attributes required to make the request. This is useful only with FTP operations, since FTP is the only protocol that typically performs multiple operations during the same session. The WinINet API caches a single connection handle for each HINTERNET handle generated by InternetOpen. InternetOpenUrl uses this flag for HTTP and FTP connections. HYPERLINK Forces a reload if there was no Expires time and no LastModified time returned from the server when determining whether to reload the item from the network. IGNORE_CERT_CN_INVALID Disables checking of SSL/PCT-based certificates that are returned from the server against the host name given in the request. WinINet functions use a simple check against certificates by comparing for matching host names and simple wildcarding rules. IGNORE_CERT_DATE_INVALID Disables checking of SSL/PCT-based certificates for proper validity dates. IGNORE_REDIRECT_TO_HTTP Disables detection of this special type of redirect. When this flag is used, WinINet transparently allows redirects from HTTPS to HTTP URLs. IGNORE_REDIRECT_TO_HTTPS Disables the detection of this special type of redirect. When this flag is used, WinINet transparently allows redirects from HTTP to HTTPS URLs. KEEP_CONNECTION Uses keep-alive semantics, if available, for the connection. This flag is required for Microsoft Network (MSN), NTLM, and other types of authentication. NEED_FILE Causes a temporary file to be created if the file cannot be cached. NO_AUTH Does not attempt authentication automatically. NO_AUTO_REDIRECT Does not automatically handle redirection in HttpSendRequest. NO_CACHE_WRITE Does not add the returned entity to the cache. NO_COOKIES Does not automatically add cookie headers to requests, and does not automatically add returned cookies to the cookie database. NO_UI Disables the cookie dialog box. PASSIVE Uses passive FTP semantics. InternetOpenUrl uses this flag for FTP files and directories. PRAGMA_NOCACHE Forces the request to be resolved by the origin server, even if a cached copy exists on the proxy. RAW_DATA Returns the data as a GOPHER_FIND_DATA structure when retrieving Gopher directory information, or as a WIN32_FIND_DATA structure when retrieving FTP directory information. If this flag is not specified or if the call was made through a CERN proxy, InternetOpenUrl returns the HTML version of the directory. RELOAD Forces a download of the requested file, object, or directory listing from the origin server, not from the cache. RESYNCHRONIZE Reloads HTTP resources if the resource has been modified since the last time it was downloaded. All FTP and Gopher resources are reloaded. SECURE Uses secure transaction semantics. This translates to using Secure Sockets Layer/Private Communications Technology (SSL/PCT) and is only meaningful in HTTP requests. HTTPPUTFLAGS: CACHE_IF_NET_FAIL Returns the resource from the cache if the network request for the resource fails due to an ERROR_INTERNET_CONNECTION_RESET (the connection with the server has been reset) or ERROR_INTERNET_CANNOT_CONNECT (the attempt to connect to the server failed). HYPERLINK Forces a reload if there was no Expires time and no LastModified time returned from the server when determining whether to reload the item from the network. IGNORE_CERT_CN_INVALID Disables checking of SSL/PCT-based certificates that are returned from the server against the host name given in the request. WinINet functions use a simple check against certificates by comparing for matching host names and simple wildcarding rules. IGNORE_CERT_DATE_INVALID Disables checking of SSL/PCT-based certificates for proper validity dates. IGNORE_REDIRECT_TO_HTTP Disables detection of this special type of redirect. When this flag is used, WinINet functions transparently allow redirects from HTTPS to HTTP URLs. IGNORE_REDIRECT_TO_HTTPS Disables detection of this special type of redirect. When this flag is used, WinINet functions transparently allow redirects from HTTP to HTTPS URLs. KEEP_CONNECTION Uses keep-alive semantics, if available, for the connection. This flag is required for Microsoft Network (MSN), NT LAN Manager (NTLM), and other types of authentication. NEED_FILE Causes a temporary file to be created if the file cannot be cached. NO_AUTH Does not attempt authentication automatically. NO_AUTO_REDIRECT Does not automatically handle redirection in HttpSendRequest. NO_CACHE_WRITE Does not add the returned entity to the cache. NO_COOKIES Does not automatically add cookie headers to requests, and does not automatically add returned cookies to the cookie database. NO_UI Disables the cookie dialog box. PRAGMA_NOCACHE Forces the request to be resolved by the origin server, even if a cached copy exists on the proxy. RELOAD Forces a download of the requested file, object, or directory listing from the origin server, not from the cache. RESYNCHRONIZE Reloads HTTP resources if the resource has been modified since the last time it was downloaded. All FTP and Gopher resources are reloaded. SECURE Uses secure transaction semantics. This translates to using Secure Sockets Layer/Private Communications Technology (SSL/PCT) and is only meaningful in HTTP requests. ---------------------------------------------------------------------------- Mon, 07 Nov 2005 Serious bug in AGCOMP not correctly compressing compiled scripts is fixed. This bug has been in since the upgrade to a newer ZLIB in Jul 2005. The modular compiler "OPTION" command now has 2 other possible parameters. Previously only "ON" and "OFF" were accepted. Now, "FORCEON" and "FORCEOFF" are also accepted. "ON" and "OFF" work as before, they can be overidden by AGCOMP if it thinks a block code is required or not required. FORCEON and FORCEOFF are absolute, they will not be overridden. If you use for instance OPTION LAYERS FORCEOFF, the code to handle layers will absolutely not be linked into the modular runtime. FORCEON/FORCEOFF also works with "ALL" but it not particularly useful. OPTION ALL FORCEON will include all modular code (except for commands not used), and OPTION ALL FORCEOFF will force all modular code to be excluded. AGCOMP is now a great deal smarter about what modular options should automaticly enabled or disabled. For instance OPTION ALL OFF will now allow the SCROLLBOX command to work correctly. ---------------------------------------------------------------------------- Sun, 30 Oct 2005 Small memory leak in WINFONT/FONTDEFINE fixed (one extra instance of font's variable name was created). Three new FONTSTYLE/WINFONTSTYLE options: VARIATION, VARIATIONS and ALLVARIATIONS FONTSTYLE VARIATION SUFFIX STYLE STYLE STYLE SUFFIX is the up to 16 character suffix added to the variable name for this variation of the base font variable name. STYLE is one or more styles, only weight, italic, underline and strikeout are accepted, others are ignored. The variation ends with the next variation command, or the end of the fontstyle parameters. Two shortcut options to create common multiple variations: FONTSTYLE VARIATIONS The same as: VARIATION B BOLD VARIATION I ITALIC VARIATION U UNDERLINE VARIATION S STRIKEOUT FONTSTYLE ALLVARIATIONS The same as: VARIATION B BOLD VARIATION I ITALIC VARIATION U UNDERLINE VARIATION S STRIKEOUT VARIATION BI BOLD ITALIC VARIATION BU BOLD UNDERLINE VARIATION BS BOLD STRIKEOUT VARIATION IU ITALIC UNDERLINE VARIATION IS ITALIC STRIKEOUT VARIATION US UNDERLINE STRIKEOUT VARIATION BIU BOLD ITALIC UNDERLINE VARIATION BIS BOLD ITALIC STRIKEOUT VARIATION BUS BOLD UNDERLINE STRIKEOUT VARIATION IUS ITALIC UNDERLINE STRIKEOUT Runable example: drawclear white color black fontstyle anti allvariations variation l light fontdefine aarial22 "Arial" 22 set variables on for fn in strlist(varmatch("aarial22*")) font @fn textln @fn next drawregion 50pct 0 100pct 100pct fontstyle init allvariations variation l light fontdefine arial22 "Arial" 22 set variables on for fn in strlist(varmatch("arial22*")) font @fn textln @fn next forever ---------------------------------------------------------------------------- Thu, 27 Oct 2005 New command STRSPLIT, takes a one or more strings followed by a split value. It splits the strings into multiple strings where ever the split value is found. For instance: for word in strlist(strsplit("Hello there this is a string"," ")) textln @quote$@word$@quote next Displays: "Hello" "there" "this" "is" "a" "string" Using multiple strings: words = array(strsplit("Hello there this is a string","and this is another string"," ")) textln @words[0] ; Displays Hello textln @words[6] ; Displays and Using a multiple character split value: words = array(strsplit(strlist(1,2,3,4),@crlf)) for i in strlist(@words) text @i next The comparison operators (less than, greater than, less than or equal, greater than or equal, equal and not equal) now work on measurements. They do not handle different measurements. So for instance you cannot compare inches to percentage. But you can compare inches to mm. Multiply and Divide of Measurements now handles like measurements, so for instance you can say 10pct*3pct. This is in addition to Multiply and Divide of numbers, which already worked, like this: (10pct+5)*1.5 or 11in/3. Problems with adding/subtracting measurements that were previously multiplied or divided are fixed. The SET VARIABLES ON display is brought up to date, it had not been updated since early 2003! In particular the MEASURE type is fully displayed. Other types displayed (but only minimally): VECTORDATA INPUT IMAGEFADE SOUND DATABASE DBFIELDNAME DBINDEX DBCACHE DBRECORDCACHE SCROLLBOX The mm and cm measurements now remember they are metric so the VARIABLES display will show them in mm instead of inches. If you add mm to inches the resulting value will display as metric in the VARIABLES display. LIBXML2 library added to project as part of investigating XML support, (not linked in yet). ---------------------------------------------------------------------------- Tue, 18 Oct 2005 The error message for an invalid label used with GOSUB/WHEN/HOTSPOT now gives the name of the incorrect label. This is extremely useful for tracking down a incorrect WHEN/HOTSPOT when you've done a SCRIPTLINK to a script without the label for a active WHEN/HOTSPOT. DRIVEFILELIST with long paths was broken since (13 Oct 2005) build. Fixed. ---------------------------------------------------------------------------- Sun, 16 Oct 2005 Two new commands, IMAGEROW and IMAGECOLUMN. They take one or more images and returns a single image with all the images passed to it lined up in a column column or row. Accepts wildcards and arrays of images. Example: diaw = array(diaw1, diaw2, diaw3, diaw4, diaw5) for pic in strlist(@diaw) imageload @pic next global diawrow imagerow(@diaw) ---------------------------------------------------------------------------- Thu, 13 Oct 2005 Huge number of fixes for NULL or Blank parameters, all these commands are affected (they would crash back to windows): ARRAYEXCEPT ARRAYEXTRACT DESKTOPWALLPAPER FILECOPY FILEDELETE IMAGEALPHASET IMAGECENTER IMAGEFINDCENTER IMAGEFINDEDGES IMAGESPOTCOLOR IMAGETRIM INIGET INISET MEMGETSTRING NETOPENWEBPAGE PRINTSTART RANDOM SCREENSAVER SCRIPTLINK STRASC STRSORT STRWILDSEARCH WINDOWSIZE WINFONT WINFONTSTYLE Three commands added: STRENCRYPTBLOWFISH STRDECRYPTBLOWFISH UNGLOBAL The BLOWFISH commands have the exact same syntax as STRENCRYPTAES256 and STRDECRYPTAES256 UNGLOBAL removes a global variable. Much like FREE except the variable is completely removed. ---------------------------------------------------------------------------- Tue, 11 Oct 2005 SCROLLBOX has a new TEXTELEVATORGAP option which is how many pixels to offset the elevator shaft from the text (reducing the size of the text area). SCROLLBOX TEXTOFFSET now supports measurements SET TEXTTABSIZE now supports measurements Negative now works on measurements, so for instance: set texttabsize -(20pct) ---------------------------------------------------------------------------- Thu, 06 Oct 2005 Bug with a trailing "<" character in a text string causing the next text statement to hang fixed. ---------------------------------------------------------------------------- Wed, 05 Oct 2005 New command VECSIZE calculates the distance between two points: HYP = VECSIZE(X1,Y1,X2,Y2) Same as: hyp = sqrt((@x1-@x2)*(@x1-@x2)+(@y1-@y2)*(@y1-@y2)) DRAWBOXROUND now accepts measurements for all parameters. ---------------------------------------------------------------------------- Mon, 26 Sep 2005 Memory leaks found in: SCRIPTMERGE - was leaving zeros on the stack DRAWANTIBOX - All DrawAnti commands were leaving junk on stack DRAWANTIBOXROUND DRAWANTICIRCLE DRAWANTICIRCLEFILLED DRAWANTILINE DRAWANTIPOLYGON DRAWANTIPOLYGONFILLED DRAWANTIRECT DRAWANTIRECTROUND LAYERLEVEL was leaving ones and zeros on the stack All of these could cause crashes and other errors as AG runs out of stack space. ---------------------------------------------------------------------------- Thu, 15 Sep 2005 IMAGESIZE now scales the IMAGEPOSITION IMAGECOPY now correctly copies the IMAGEPOSITION IMAGESAVEGIF now saves the IMAGEPOSITION (other programs may not like negative offsets). New command VECROTATE, rotates a point around another point given an angle. SETS NEWXPOS NEWYPOS VECROTATE(CENTXPOS CENTYPOS XPOS YPOS ANGLE) Example routine that rotates the coordinates of a filled rectangle, creating a masked image of the rotated rectangle: rotatedimage: declare xs ys angle box = rotatebox(0, 0, @xs, @ys, @angle) color white imagenew masktemp @box[width] @box[height] imageset masktemp color 0 drawpolygonfilled @box[x1] @box[y1] @box[x2] @box[y2] @box[x3] @box[y3] @box[x4] @box[y4] imageset imageposition @box[areax1] @box[areay1] masktemp color white imagenew recttemp @box[width] @box[height] imageset recttemp color (@textfield[@pagenum][@f][rectcolor]) drawpolygonfilled @box[x1] @box[y1] @box[x2] @box[y2] @box[x3] @box[y3] @box[x4] @box[y4] imageset imageposition @box[areax1] @box[areay1] recttemp$@f imagemaskset recttemp masktemp imagefree masktemp return @masktemp rotatebox: declare cx cy width height angle local result[xs] @width local result[ys] @height local result[cx] @cx local result[cy] @cy locals result[x1] result[y1] vecrotate(@cx, @cy, 0, 0, @angle) locals result[x2] result[y2] vecrotate(@cx, @cy, @width-1, 0, @angle) locals result[x3] result[y3] vecrotate(@cx, @cy, @width-1, @height-1, @angle) locals result[x4] result[y4] vecrotate(@cx, @cy, 0, @height-1, @angle) local result[areax1] min(@result[x1],@result[x2],@result[x3],@result[x4]) local result[areay1] min(@result[y1],@result[y2],@result[y3],@result[y4]) local result[areax2] max(@result[x1],@result[x2],@result[x3],@result[x4]) local result[areay2] max(@result[y1],@result[y2],@result[y3],@result[y4]) local result[width] 1+@result[areax2]-@result[areax1] local result[height] 1+@result[areay2]-@result[areay1] result[x1] = @result[x1]-@result[areax1] result[y1] = @result[y1]-@result[areay1] result[x2] = @result[x2]-@result[areax1] result[y2] = @result[y2]-@result[areay1] result[x3] = @result[x3]-@result[areax1] result[y3] = @result[y3]-@result[areay1] result[x4] = @result[x4]-@result[areax1] result[y4] = @result[y4]-@result[areay1] return &result ---------------------------------------------------------------------------- Sun, 11 Sep 2005 Long standing bug in WINDOWSIZE used to resize a window that has active layers is fixed. This eliminates wierd glitches and missing sections of the window. ---------------------------------------------------------------------------- Wed, 07 Sep 2005 Bug in Modular compiler not including LAYERTEXT, LAYERTEXTWIDTH, LAYERTEXTHEIGHT, and LAYERTEXTOFFSET for use by the SCROLLBOX command is fixed. Bug in Modular compiler not doing a MEASURE ON if the NUMBERsize operator is used is fixed. Freeing of SCROLLBOXes was broken (didn't happen until program exit). Fixed. Memory leak in WHENs with labels, HOTSPOTs and SCROLLBOXes is fixed. They were all gobbling up dictionary entries and memory, this bug dates back to December 2002! ---------------------------------------------------------------------------- Tue, 06 Sep 2005 Complete list of Modular options (SCROLLBOXES is new as of a few builds ago): ALL BMPLOAD DATABASE DEBUG FADES FONTDEFINE FONTLOAD FTP GIFLOAD GIFSAVE GLILOAD HOTSPOTS HTMLLINK HTMLTEXT HTTP ICOLOAD IMAGESCALE INPUT INTERNET JPEGLOAD JPEGSAVE LAYERS MEASURE PANVIEW PNGLOAD PNGSAVE PRINT RTFTEXT SCROLLBOXES SOUND TIFFLOAD TIFFSAVE WHENS WINFONT Bug in stretched elevator cars (SCROLLBOX), wasn't stretching on small images, fixed. AGCOMP now handles enabling modular options required for SCROLLBOXES. ---------------------------------------------------------------------------- Sun, 04 Sep 2005 Two new commands MOUSECURSORSCROLL and MOUSECUSTOMSCROLL. They work exactly like MOUSECURSORHOT and MOUSECUSTOMHOT except the cursor they define is used for scrollboxes when you roll the mouse inside the arrows or elevator. ---------------------------------------------------------------------------- Thu, 01 Sep 2005 Extensive special case support for SCROLLBOX added. It now handles any combination of: different sized arrow images different sized click down arrow images a different sized elevator boxcar image a different elevatorwidth parameter Any combination will work, the images are centered within their alloted space, and the entire arrow/scrollbox area is enlarged to handle how even large is needed for all the images. If the scrollbar will not fit (images are too tall, or the scrollbox is too short), then no arrows or scrollbox is displayed, it's treated the same as if the text fit entirely in the scrollbox. ---------------------------------------------------------------------------- Tue, 30 Aug 2005 SCROLLBOX has the elevator car slightly more attractive (rounded corners) SSCROLLBOX ELEVATORSTRETCH now stretches an ELEVATORIMAGE. It duplicates the bottom half of the original elevator car image, duplicates the center scan line over and over to fill the extra space, and then duplcates the top half of the original car image. The generated elevator car is limited to no shorter than 5 pixels tall. If the text in a SCROLLBOX is shorter than the scrollbox, then no arrows or elevator are displayed, and the additional space where the arrows and elevator would be are used to display the text. Here is the text script I used to ensure the stretch elevator works: width = 640 height = 600 windowsize @width @height drawclear white color black textln "Scrollbox test" fontstyle anti fontdefine "Arial" 20 set variables on color red drawregion 50 50 (@width-100)size (@height-100)size drawbox @drawminx @drawminy @drawmaxx @drawmaxy 5 drawregion @drawminx+6 @drawminy+6 @drawmaxx-6 @drawmaxy-6 color black scrollbox test text strline(fileget(potter.txt),1,1) elevatorimage elevatorcar.bmp delay 200 scrollbox test text strline(fileget(potter.txt),1,5) forever ---------------------------------------------------------------------------- Mon, 29 Aug 2005 New SCROLLENABLE and SCROLLDISABLE to enable/disable scrollboxes (much like HOTENABLE and HOTDISABLE for hotspots). SCROLLBOX command in and working: Options are: POSITION XPOS YPOS [X2 Y2] SIZE WIDTH HEIGHT TEXT STRING TEXTADD STRING TEXTLINE LINENUM TEXTOFFSET [XOFFSET] YOFFSET TEXTSTEP YPIXELS ; default is 3 TEXTDELAY DELAYTIME1000 ; default is 1000/60 ELEVATORCOLOR COLOR ELEVATORCOLORBACK COLOR ELEVATORCOLOREDGE COLOR ELEVATORIMAGE IMAGEBUF ELEVATORSTRETCH ; default is STRETCH (not FIXED) ELEVATORFIXED ELEVATORWIDTH WIDTH ; default is 32 ARROWCOLOR COLOR ARROWCOLORBACK COLOR ARROWCOLOREDGE COLOR ARROWCLICKCOLOR COLOR ARROWCLICKCOLORBACK COLOR ARROWCLICKCOLOREDGE COLOR ARROWIMAGEUP IMAGEBUF ARROWIMAGEDOWN IMAGEBUF ARROWCLICKIMAGEUP IMAGEBUF ARROWCLICKIMAGEDOWN IMAGEBUF Elements available for scrollbox bufs: ->SIZEX ->SIZEY ->X1 ->Y1 ->X2 ->Y2 ->TEXT ->TEXTLINE ->TEXTOFFX ->TEXTOFFY ->X1, ->Y1, ->X2, ->Y2 are also supported for IMAGES and LAYERS as well as SCROLLBOXES ->TEXT, ->TEXTLINE, ->TEXTOFFX, ->TEXTOFFY are also supported for LAYERS as well as SCROLLBOXES. ->LAYERTEXT, ->LAYERTEXTLINE, ->LAYERTEXTOFFX and ->LAYERTEXTOFFY are removed (they were always returning zero anyway). width = 640 height = 600 windowsize @width @height drawclear white color black textln "Scrollbox test" fontstyle anti fontdefine "Arial" 20 set variables on color red drawregion 50 50 (@width-100)size (@height-100)size drawbox @drawminx @drawminy @drawmaxx @drawmaxy 5 drawregion @drawminx+6 @drawminy+6 @drawmaxx-6 @drawmaxy-6 color black scrollbox test text fileget(potter.txt) forever Know issues: The Elevator Car is ugly, and the stretch code isn't done yet. When clicking outside the Elevator Car within the Elevator Shaft, the Pageup & Pagedown work, but do not auto-repeat, and there is no "blink" of the empty shaft to show the click "worked". My attempts at auto-repeat were very quirky, so I disabled that for now. Performance near the bottom of long documents can be quite slow, this requires optimizing the text formatting engine, perhaps storing "way points" to speed up formatting of long documents. I'll have to run it through a profiler to get some real idea on where the majority of time is spent. The TEXTDELAY autorepeat when holding down an arrow button is sometimes quirky. I suggest a very small TEXTDELAY, and adjust TEXTSTEP instead. There are no keyboard shortcuts yet, no arrow keys, no pageup/down, no home/end. The TEXTOFFSET on the X Axis is not supported, it will not work correctly, and there are no plans for horizontal arrows/elevators. There may be odd quirks if displaying a document shorter than the scrollbox. In future it will not display arrows or elevator if the text fits. ---------------------------------------------------------------------------- Mon, 12 Aug 2005 Bug in drawregion which was not reseting the search for leading spaces in HTML text is fixed. This also applies to using IMAGENEW, and then IMAGESET to draw text in an image. New command SCROLLFREE, much like HOTFREE except it's for SCROLLBOXES created with the SCROLLBOX command. ---------------------------------------------------------------------------- Sat, 30 Jul 2005 Further rewrites of ZLIB support so that only one tiny change to ZCONF.H is now required to switch ZLIB versions. ZLIB upgraded to v1.23. FILEZIPAS and FILEZIP now correctly store the file date and time in the ZIP that is created. If the source file has no date (is from memory or a GL/EXE), then the current system date and time are used. ---------------------------------------------------------------------------- Fri, 29 Jul 2005 FILEZIPAS and FILEZIP were broken by the ZLIB upgrade. Numerous changes required in the MINIZIP code (which has quite a few hardcoded references to the standard C library). ---------------------------------------------------------------------------- Thu, 28 Jul 2005 New system variable: SET TEXTFROMSTRIP ON/OFF Defaults to OFF. When enabled (ON), any leading spaces, or line feeds will be stripped before text when using the TEXTFROM command. Useful for splitting up documents, and eliminating extra leading whitespace. New SCROLLBOX command started, not functional. ---------------------------------------------------------------------------- Thu, 21 Jul 2005 Loading of PNG images is working! LIBPNG reverted to original source code for LIBPNG 1.2.8, now uses compiler defines for changes. Method of passing file handle to LIBPNG rewritten to avoid odd errors. Rewrote code which copies PNG images to work with more recent LIBPNG. Numerous checks added for unusual PNG formats to convert them into something that AfterGRASP can handle (like greyscale with alpha gets converted to RGBA, and 16bit greyscale gets converted to 8bit). Work around added for "png_read_end" bug (call removed for now). ---------------------------------------------------------------------------- Wed, 20 Jul 2005 HTML Text now supports the
           
          tags. They switch the current font to "Courier New", and allow all tabs, spaces and newlines to be drawn. For example: drawclear white set htmltext on text "Table

          text "
                   1 Shoe	 2001
                   2 Cat	  2002
                   3 Horse	2003
                   4 Cabinet  2004
            
          " wait exitnow More error checking for GIF loading added, particularly in the width/height fields. Bug when ERRORLOAD OFF where the variable would be created, but no value stored in it is fixed. For instance this would have displayed "1" even if bad_gif_file.gif was corrupt. Now it correctly will display "0". drawclear white set errorload off imageload bad_gif_file.gif test messagebox vardef(test) exitnow ---------------------------------------------------------------------------- Tue, 19 Jul 2005 Treat this build as a true beta, there was extensive work required to update ZLIB. There may be new bugs as a result. ZLIB version 1.14 replaced with 1.22. This unfortunately does not fix the PNG load, it still fails. Clipping bug in DRAWCLEAR fixed, it now always clips to the current drawregion (it wasn't doing so sometimes). ---------------------------------------------------------------------------- Mon, 18 Jul 2005 New LAYER command: LAYER LEVEL to set the exact depth of a layer. So instead of above or below you can set the exact level of a layer: It takes a single parameter, an integer which can be any value. Giving two layers the same level will not work (the command will be ignored). You cannot have two layers with the same level. Returns either 0 (failure), or 1 (success). The default LEVEL for a newly created layer is 1 more than the highest level is use (if none, then 0). LAYER ABOVE sets the LEVEL to be 1 more than the highest, LAYER BELOW is 1 less than the lowest level in use. ---------------------------------------------------------------------------- Sun, 17 Jul 2005 4 new commands added! COLORDIALOG COLORVARIABLE COLORDIALOGOPTIONS OPTION1 OPTION2 OPTION3... Color Dialog Options: ANYCOLOR ENABLEHOOK ENABLETEMPLATE ENABLETEMPLATEHANDLE FULLOPEN PREVENTFULLOPEN RGBINIT SHOWHELP SOLIDCOLOR COLORDIALOGSET and COLORDIALOGGET are to set and retrieve the color dialog's fixed 16 color palette (which a user can change): RESULTARRAY16 = ARRAY(COLORDIALOGGET()) COLORVALUE = COLORDIALOGGET(INDEX) If COLORDIALOGGET is passed no parameters, it returns all 16 colors from the color dialog's palette. Otherwise it can be passed 1 or more indexes (from 0 to 15) COLORDIALOGSET @ARRAY16 (16 color values, no names or R G B) COLORDIALOGSET INDEX COLORVALUE If COLORDIALOGSET is passed 16 colors (integers), then it sets the 16 palette colors in the COLORDIALOG to those 16 colors. Otherwise, it treats the first parameter as an index from 0 to 15, and the 2nd parameter as a color value (names, and R, G, B triplets are acceptable). Runable example: drawclear white color black colordialogoptions fullopen anycolor for idx from 0 to 15 colordialogset @idx @idx*16+15 @idx*16+15 @idx*16+15 next colordialog colorvalue drawclear @colorvalue wait exitnow ---------------------------------------------------------------------------- Tue, 12 Jul 2005 FILEZIP and FILEZIPAS were not closing files opened to be copied into the ZIP. This meant they could not be deleted until your program exited. Fixed. New commands REGGETLIST and REGGETKEYLIST: RESULT = STRLIST( REGGETLIST(KEYROOT APPNAME) ) RESULT = ARRAY( REGGETLIST(KEYROOT APPNAME) ) messagebox strlist(reggetlist(LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts")) RESULT = STRLIST( REGGETKEYLIST(KEYROOT APPNAME) ) RESULT = ARRAY( REGGETKEYLIST(KEYROOT APPNAME) ) messagebox strlist(reggetkeylist(LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows NT\CurrentVersion")) ---------------------------------------------------------------------------- Thu, 07 Jul 2005 Two new commands, FONTDIALOG and FONTDIALOGOPTIONS FONTDIALOG FONTNAMEVAR FONTSIZEVAR FONTSTYLEVAR FONTNAMEVAR - variable name for string variable that will contain the name of the font. FONTSIZEVAR - variable name for the integer variable that will contain the height of the font. FONTSTYLEVAR - variable name for the array variable that will contain an array of font style options suitable for the FONTSTYLE and WINFONTSTYLE commands. Example: drawclear white fontdialog fontnamevar fontsizevar fontstylevar fontstyle init anti @fontstylevar fontdefine myfont @fontnamevar @fontsizevar font myfont color black text "Hello There" wait exitnow FONTDIALOGOPTIONS OPTION1 OPTION2 OPTION3.... Options for FONTDIALOGOPTIONS Control options: ANSIONLY BOTH EFFECTS ENABLEHOOK ENABLETEMPLATE ENABLETEMPLATEHANDLE FIXEDPITCHONLY FORCEFONTEXIST INITTOLOGFONTSTRUCT LIMITSIZE NOFACESEL NOOEMFONTS NOSCRIPTSEL NOSIMULATIONS NOSIZESEL NOSTYLESEL NOVECTORFONTS NOVERTFONTS PRINTERFONTS SCALABLEONLY SCREENFONTS SCRIPTSONLY SELECTSCRIPT SHOWHELP TTONLY USESTYLE WYSIWYG Fonttype options: BOLDTYPE ITALICTYPE OPENTYPETYPE PRINTERTYPE REGULARTYPE SCREENTYPE SIMULATEDTYPE TYPE1TYPE ---------------------------------------------------------------------------- Sun, 03 Jul 2005 New LAYER option, LAYER REGION, provides a clipping draw region for objects in a layer. For instance: drawregion @imageareax1 @imageareay1 @imageareax2 @imageareay2 imageput 50 75 example This layer will be clipped in the same way: layer testlay position 50 75 layer testlay region @imageareax1 @imageareay1 @imageareax2 @imageareay2 layer testlay image example New command IMAGEREAD. Works just like IMAGELOAD except it returns the image buffers, like this: images = array(imageread(base1.jpg, base2.jpg, base3.jpg)) local imagebuf imageread(example.gif) IMAGECOPY command now supports multiple destination buffers, so you can make multiple copies of the same image, for instance: imagecopy mainpage16 mainpage8 mainpage4 mainpage2 mainpage pagesizex = mainpage->sizex pagesizey = mainpage->sizey imagesize @pagesizex/2 @pagesizey/2 32 mainpage2 imagesize @pagesizex/4 @pagesizey/4 32 mainpage4 imagesize @pagesizex/8 @pagesizey/8 32 mainpage8 imagesize @pagesizex/16 @pagesizey/16 32 mainpage16 ---------------------------------------------------------------------------- Tue, 29 Jun 2005 Extensive error checking added to GIF load code. SET ERRORLOAD now supported. When set to OFF, no error is generated by a corrupt image file. New error code passed to AGEDIT when loading a corrupt image file: AGERROR_CORRUPTIMAGE -17 CORRUPTIMAGE errors are supported by PNG, GIF and JPEG load code. drawclear white set errorload off imageload "W1K6LD.gif" test1 ; a corrupt GIF imageload "W85DB.gif" test2 ; a corrupt GIF imageload "box6.gif" test3 ; a normal GIF imageput test3 ; displays "0 0 1" messagebox vardef(test1)$" "$vardef(test2)$" "$vardef(test3) exitnow ---------------------------------------------------------------------------- Sun, 20 Jun 2005 New types supported for DLLSETUP LENANDSTRINGARRAY int argc, char *argv[] STRINGARRAYANDLEN char *argv[], int argc STRINGARRAY char *argv[] NULL always provides a NULL value, useful for parameters that are always NULL like a CALLBACK address. STRINGANDLEN char *string, int stringlen LENANDSTRING int stringlen, char *string WINHANDLE HWND hwnd - always provides @WINHANDLE ---------------------------------------------------------------------------- Thu, 16 Jun 2005 Long standing bug in GLOPEN which would create extra instances of the GL filename, and of the GL tracking information fixed. This would prevent the GL from ever closing completely. So you could never delete, rename or write to a GL once you had ever used GLOPEN on it. This also resulted in a minor memory leak when the GL filename would never disappear if it was constructed (not a fixed name). ---------------------------------------------------------------------------- Wed, 01 Jun 2005 Bizarre text spacing on the 2nd (and later) page when using HTML TEXT and some fonts, when printing is fixed. ---------------------------------------------------------------------------- Tue, 31 May 2005 Occasional crashes with '&' used in HTML text fixed. ---------------------------------------------------------------------------- Tue, 24 May 2005 New command IMAGEPOSTSCRIPT returns an image encoded as PostScript. This only works with JPEG images loaded with the IMAGECOMPRESSED option. Supports IMAGESPOTCOLOR as well. RESULT = IMAGEPOSTSCRIPT(XPOS, YPOS, XSIZE, YSIZE, IMAGEBUF) Runable example: drawclear white color black set imagecompressed on imageload sharptest.jpg pshead = "%!PS-Adobe-3.0"$@crlf fileput sharptest.ps @pshead$imagepostscript(0, 0, sharptest->sizex, sharptest->sizey, sharptest) appshell open sharptest.ps ; will view with GSView or Acrobat exitnow RTF tags for quotes now support open and close, single and double quotes using the extended ASCII characters (LATIN 1): \lquote 145 Opening Single Quotation Mark \rquote 146 Closing Single Quotation Mark \ldblquote 147 Opening Double Quotation Mark \rdblquote 148 Closing Double Quotation Mark ---------------------------------------------------------------------------- Sun, 15 May 2005 Four new String commands designed for comparing strings and extracting the the differences or identical parts. All take the same parameters, two or more strings. SET STRINGRESULT STRDIFF(STRING1, STRING2, ...) SET STRINGRESULT STRSAME(STRING1, STRING2, ...) SET STRINGRESULT STRSAMEEND(STRING1, STRING2, ...) SETS STARTPOS LENGTH SETSTRDIFFPOSITION(STRING1, STRING2, ...) Example: drawclear white color black str1 = "Hello There, this is not a test string, that is all" str2 = "Hello There, this is a very test string, and that is all" textln @quote$strdiff(@str1, @str2)$@quote ;"not a test string," sets pos len strdiffposition(@str1, @str2) textln @pos$" "$@len ;22 18 textln @quote$strmid(@str1, strdiffposition(@str1, @str2))$@quote ;"not a test string," textln @quote$strdiff(@str2, @str1)$@quote ;"a very test string, and" sets pos len strdiffposition(@str2, @str1) textln @pos$" "$@len ;22 23 textln @quote$strmid(@str2, strdiffposition(@str2, @str1))$@quote ;"a very test string, and" textln @quote$strsame(@str1, @str2)$@quote ;"Hello There, this is " textln @quote$strsameend(@str1, @str2)$@quote ;" that is all" forever ---------------------------------------------------------------------------- Tue, 10 May 2005 "mailto:" urls linked to in HTML text now use "appshell open" instead of "netopenwebpage". This eliminates the extra browser window that was being opened. Color hi-lite on link words in HTML text is now done with a seperate color stack instead of using the same stack as the tags to eliminate interfering with other font/color changes. Hack/Kludge to fix text color in HTML links when word wrapped just before the link. It forces the text color back to black if the text color when starting the link is already the link color. This is just to fix an immediate problem, and will be fixed correctly soon. ---------------------------------------------------------------------------- Mon, 09 May 2005 Drastic changes to HTML parsing code required to allow HTML code to be stuff back into the stream of HTML being parsed. This allows the
        • tag to use the symbol font to display bullets. There is a strong likelyhood of new bugs in HTML support because of these extensive changes. STRREPLACE now supports multiple search/replace pairs of strings. All the search/replace operations are done in a single pass, so for instance: strreplace("Hello John", "Jo", "Joe", "John", "Ed") gives "Hello Joehn" strreplace("Hello John", "John", "Ed", "Jo", "Joe") gives "Hello Ed" strreplace("Hello John", "Jo", "Zoe", "Zoe", "Ed") gives "Hello Zoehn" Runable test: windowsize 800 600 drawclear white color black textln strreplace("Hello John", "Jo", "Joe", "John", "Ed")$" Hello Joehn" textln strreplace("Hello John", "John", "Ed", "Jo", "Joe")$" Hello Ed" textln strreplace("Hello John", "Jo", "Zoe", "Zoe", "Ed")$" Hello Zoehn" forever An unlimited number of search/replace pairs are supported. The performance of using a single STRREPLACE instead of a a series of multiple STRREPLACE statements is dramaticly faster, particularly with large source strings (a megabyte or more). ---------------------------------------------------------------------------- Tue, 03 May 2005 A new command and new element (for images). Used for printing color separations with spot colors. Only works with CMYK JPEG images loaded with IMAGECOMPRESSED ON. IMAGEBUF->SPOTCOLOR ; returns color names and values IMAGESPOTCOLOR IMAGEBUF "Spot Color Name" CYAN MAGENTA YELLOW BLACK ... CYAN MAGENTA YELLOW and BLACK are from 0 to 1, floating point values, PostScript style. Up to four spot colors can be specified. First replaces CYAN channel, Second replaces the MAGENTA channel and so on. Unfortunately Photoshop won't let you save a custom channel image as JPEG (where you can actually see the spot colors displayed correctly in Photoshop). You have to cut/paste each channel into a new CMYK image, and then save that as JPEG. Example: set imagecompressed on imageload ibmlogo_cmyk.jpg imagespotcolor ibmlogo_cmyk "PANTONE 299 CVC" 0.87 0.18 0 0 imagesize 10pct 12pct ibmlogo_cmyk imageput 30pct 43pct ibmlogo_cmyk ---------------------------------------------------------------------------- Tue, 26 Apr 2005 HTMLTEXT enhanced: tags now support urls with "mailto:"
          tag supported, identical to