don't know wether the following is a bug (by means of unexpected behaviour) or works as designed.
The script example code
Code: Select all
$cmd = " load(getScriptPathFromINI());<crlf> load(getScriptPath());";
msg($cmd);
load($cmd, , "s");
function getScriptPath() {
// straight return of the script path, <xyscripts> IS RESOLVED ******
return "<xyscripts>\files_folders\DatestampMe.xys";
}
function getScriptPathFromINI() {
/*
[LIST]
1=<xyscripts>\files_folders\DatestampMe.xys
*/
// ini provided script path, <xyscripts> IS NOT RESOLVED ******
return getkey(1, "LIST", "<xyscripts>\libs\scriptList.ini");
}
The abnormality is that once the path of the script to run is read as a key from an ini file, the <xyscripts> variable as leading part of the path is not resolved anymore.
Shouldn't <xyscripts> be properly resolved here as well?
Code: Select all
/*
[LIST]
1=<xyscripts>\files_folders\DatestampMe.xys
*/
Remedy: once <xyscripts> is absent from the path in the ini file reading from INI file works (again).
Code: Select all
/*
[LIST]
1=files_folders\DatestampMe.xys
*/
Filehero