Page 1 of 1

I see dead variables...

Posted: 14 Sep 2013 04:16
by SkyFrontier
Run this on xyplorer_full_noinstall.zip (latest stable):

/*

setting "BackgroundFileOps", "0"; //avoid timing problems by temporarily switching to synchronous file operations mode
$allitems = get("SelectedItemsPathNames", "|"); //create a |-separated list of full paths+names of all the selected items

foreach ($item, "$allitems", "|") {

// step;
$tst = getpathcomponent("$item", ext);
IF ($tst == "zip") { }
ELSEIF ($tst != "zip") { continue; }

zip_extract("$item", "", "XYplorer.exe"); //extract XYplorer.exe in the same folder the archive is located

step;
$vers = property ("#37", "XYplorer.exe");

*/

You'll get:

set
----
$vers
----
12.90.0.0

Now run the same script on xyplorer_12_80_0004_beta_noinstall.zip:

you'll still get

set
----
$vers
----
12.90.0.0 !!!!!!!!!!

Fine.

Now run

/*

$item = "<curitem>";
text property("#37", "$item");
text property("#39", "$item");
text report("ver {FileVersion}<crlf>", $item); // ver 12.80.0.4
text property("#37", "$item");
text property("#39", "$item");

*/

on XYplorer.exe and you'll have

$item = "<curitem>";
text property("#37", "$item"); // 12.90.0.0
text property("#39", "$item"); // 12.90
text report("ver {FileVersion}<crlf>", $item); // ver 12.80.0.4
text property("#37", "$item"); // 12.80.0.4
text property("#39", "$item"); // 12.80.0004

_________________________

This little story tells us that, currently (as of v 12.90), we *need* to run some report() in order to refresh the version info property() caches somewhere.
Weirdest part is: if you enable "Show version information in the Status Bar (Controls and More - Miscellaneous)", Status bar will immediately read and display correct .exe version info.
Hesitant to fill a bug report, I call for ghostbusters here...

Re: I see dead variables...

Posted: 15 Sep 2013 21:25
by SkyFrontier
Similar problem happens with 'report("{modified yyyy-mm-dd hh.nn.ss}", "<curitem>");',
reporting '.00' as second instead of actual seconds. Everything else works as expected.

Also,

echo report("{modified yyyy-mm-dd hh.nn.ss}", "<curitem>");

works as expected even on seconds for the same files, when run from address bar.
No idea on how to work around this.
12.90 on Windows XP.