Page 1 of 1
Status bar information Scripting access?
Posted: 16 Oct 2015 04:20
by eil
is there a way to get info shown in status bar of XY? for ex i selected some files and want to save in var the size and number of items. status bar displays this info much faster than implementing smt in script to get same numbers.
Re: Status bar information Scripting access?
Posted: 16 Oct 2015 13:08
by klownboy
HI eil, you can use get("Status"). Take a look at "Status" under SC get in the Help, Scripting Commands Reference. Try running...
in the Address Bar after you have hi-lighted some files.
$variable = get("Status", 2); From that point, you'll have to use either SC gettoken or regEx to obtain the specific info you need.
Re: Status bar information Scripting access?
Posted: 17 Oct 2015 00:00
by eil
thanks for hint, will look into it.
Re: Status bar information Scripting access?
Posted: 17 Oct 2015 01:45
by klownboy
Sorry eil, I didn't have time in my earlier post, but this will get the number of items and also the total size:
Code: Select all
$number = gettoken(get("Status", 2), 1, " "); echo $number; // number of files and folders
$size = gettoken(gettoken(get("Status", 2), 2, ":","t"), 1,"(", "t"); echo $size; // the size in KB/MB
You can obtain
$variable = get("Status", 2); first if you'd like and then use it in the two gettoken statements above.
Re: Status bar information Scripting access?
Posted: 17 Oct 2015 04:14
by eil
works like a charm. thanks again
