Hi Peter,
I am using the following code to generate a timestamp that will be used later in the script. I am using IniWrite to save the value in the script so the timestamp is available on future script runs.
I am not using Set with the PERMANENT directive as I don't need the value to be global or accessible by other scripts and perfer that it is stored in the script instead of script.project.
After the IniWrite the new value is not picked up by winbuilder. this is expected as wb has already processed the variables section.
My question is this:
Is there a performance penalty If I use System,RebuildVars? from what I understand from the help docs is that it rebuilds the entire system variable table for the whole project and not just the running script.
is it better for me to use Set,%#1%,%exitcode% (which works good) to redefine %LastUpdate% in order to decrease processing time? or is there a better way to rebuild just the running scripts variables?
thanks.
Homes32
I am using the following code to generate a timestamp that will be used later in the script. I am using IniWrite to save the value in the script so the timestamp is available on future script runs.
I am not using Set with the PERMANENT directive as I don't need the value to be global or accessible by other scripts and perfer that it is stored in the script instead of script.project.
After the IniWrite the new value is not picked up by winbuilder. this is expected as wb has already processed the variables section.
My question is this:
Is there a performance penalty If I use System,RebuildVars? from what I understand from the help docs is that it rebuilds the entire system variable table for the whole project and not just the running script.
is it better for me to use Set,%#1%,%exitcode% (which works good) to redefine %LastUpdate% in order to decrease processing time? or is there a better way to rebuild just the running scripts variables?
thanks.
Homes32
Title=CodeBox test Description=Running custom commands [variables] %LastUpdate%=0 [process] Run,%ScriptFile%,GetUnixTimeStamp,LastUpdate Echo,%LastUpdate% [GetUnixTimeStamp] ExtractFile,%ScriptFile%,UnixTimeStampNow,UnixTimeStampNow.exe,%GlobalTemplates%\%ProgramFolder% ShellExecuteDelete,Hide,%GlobalTemplates%\%ProgramFolder%\UnixTimeStampNow.exe // store for later IniWrite,%ScriptFile%,variables,#$p#1#$p,%exitcode% System,RebuildVars //Set,%#1%,%exitcode%