I'm trying to add a scripting capabilty to my C++ Builder Windows app that will allow users to create and run scripts written in Basic. I'm using C++ Builder R12 and TMS Scripter v7.36. I am new to Scripter and have rudimentary knowledge of Delphi but have been using C++ Builder since R1.
I provide the user interface - the scripts do not need to create their own forms. TatBasicScripter appears to be adequate for what I need & I have everything working well except for watchlists. Users can single-step etc but I haven't been able to figure out how to access variables defined in the user's script. There's a sample program in the demo folder ...demos\basic\debugger that refers to a watchlist but doesn't seem to actually implement one.
The scripter manual states that user vars defined with a "DIM" statement will be considered global. I'm using OptionExplicit = true which then requires that declaration.
I tried using IDEEngine along with the IDEWatchList component but that doesn't like tying into TatBasicScripter. And attempts to use a script component other than TatBasicScripter fail to accept a script in Basic. I saw an older reference to that issue but the suggested workaround didn't work.
I also tried the ScriptInfo->Variables and ScriptInfo->Globals properties.
I've looked through everything I could think of for an example of accessing a script variable from the "host" program and found a few suggestions but all seemed to refer to earlier versions of Scripter. I'm sure I'm missing something obvious here.
Does anyone have an example of accessing:
- The count of script variables
- The var names
- The var contents
?
Thank you!
John C