Using ooRexx version 3.1.1 MT (Nov 17 2006) through the IActiveScript interface on Windows XP Tablet PC Edition EN-US (NT 5.1.2600 SP2) platform.
When the host adds several script blocks, it seems the engine doesn't keep its state between blocks.
I believe this goes down to multiple successive calls to IActiveScriptParse::ParseScriptText. It seems each block is executed as a separate script instead of continuation of the existing script.
It can be tested in Windows Internet Explorer using several script blocks.
The attached ooRexx.hta sample can be run run with MSHTA.exe, and the script can be viewed by opening it in Notepad. Both "Object Rexx" and JScript code is included in the same file to show the expected behavior.
When the 2nd Object Rexx block is executed, the i variable is lost. Active Script engines should be able to keep their state between script blocks, and so the second document~write(i) call should have the same effect as the first one.
With the current version of ooRexx, it resets the variable.
This makes it impossible to parse scripts in multiple blocks.