Shouldn't permanent variables stick as soon as they are applied and be updated and available for use in a second instance of XYplorer? Well, I think they are initially. In my numerous tests, it appears XY is holding on to the perm variables for a second instance and using SC unset in the first instance does not unset them in the second instance. If I have perm variable previously used in a second instance (with the same variable name but different contents), when I run a script in a first instance that assigns new content to the same variable name, the new perm variable is not used in the second instance unless I specifically write the variable to file via SC writepv. I wrote up a quick testing script for checking. In this sample script, echo of the perm variable is displayed fine in the main script. When I run the script a second time, assigning new contents to the same variable, the new variable contents are not used in the second instance. If however, I write the perm variable to file using SC writepv, the variable is displayed properly and consistently in the second instance. Yes, of course I have perm variable set to be remembered across sessions.
Don I don't think it should be necessary to use SC writepv to properly write a perm variable which stands up in a second instance. Any thought? Thanks.
Code: Select all
//save this to a script named what ever you want
$build_data = "What's going on here?"; // use on 1st run
// $build_data = "2nd run I don't know."; // use on 2nd run
perm $build_data;
//writepv;
echo $build_data; //displays fine always in the 1st instance
$self = self("file");
run "cmd /c <xy> /new /script=""::load '$self','_Background'""", , 2,0;
unset $build_data;
end 1;
"_Background"
step;
echo $build_data; //doesn't display properly on 2nd run unless I write the perm variable to file using SC writepv
exit 'n';