Hi, got a problem and I just am not sure what I am doing wrong. It is to do with using hescript to set and get a global variable under Chromium web kit.
Basically got two toolbar buttons - one which calls Macros.StartSimulation and the other calls Macros.StopSimulation via Execute this script function
However in a script for an html5 simulation I have a javascript loop which contains the line
var srun = exeoutput.GetGlobalVariable(“simrun”);
but when I log srun to console it shows up as undefined, even when any toolbar button is selected/pressed. I would have hoped srun would go to either 1 or 0 other than constantly showing undefined. No idea what I am doing wrong.
The hescripts are coded as follows…
procedure StartSimulation;
begin
SetGlobalVar(“simrun”,“1”,false);
end;
procedure StopSimulation;
begin
SetGlobalVar(“simrun”,“0”,false);
end;
all under macros.
Hope to hear back.