Page 1 of 1
how do I get a script to return value of current tab view
Posted: 29 Aug 2010 22:28
by Joso
it does not appear that getinfo() can return the current state of the list view (ie details, list, small icons, etc) - is this so?
I'd like to toggle between details and thumbnails #2 by testing to see which view the current tab is in when the script is invoked and then switching between functions 307 and 302 based on the result. Seems it should be doable. Any way to get the current view? TIA.
Re: how do I get a script to return value of current tab view
Posted: 29 Aug 2010 22:55
by SkyFrontier
This may give you a hint (if I understood you well).
Re: how do I get a script to return value of current tab view
Posted: 30 Aug 2010 10:04
by admin
Will add.
Re: how do I get a script to return value of current tab view
Posted: 01 Sep 2010 02:06
by Joso
Thanks - I wish all software authors were as responsive (nah we'd get spoiled) Thanks again.
Re: how do I get a script to return value of current tab view
Posted: 01 Sep 2010 17:34
by Joso
I can't fricken believe it!
query on 8/29 - feature incorporated into beta on 8/31. Do you deliver too?
Thanks.
* SC getinfo. Changed it to "get". "getinfo" is officially obsolete,
but it is kept for back compatibility so no need to change your
old scripts.
+ SC get enhanced. New argument "view" will return the index of the
current list view (active pane). Example:
msg get("view");
Possible returns and their meanings:
0 = Details
1 = Details with Thumbnails
2 = List
3 = Small Icons
4 = Thumbnails #1
5 = Thumbnails #2
6 = Thumbnails #3
Re: how do I get a script to return value of current tab view
Posted: 01 Sep 2010 18:13
by j_c_hallgren
Joso wrote:I can't fricken believe it!
query on 8/29 - feature incorporated into beta on 8/31. Do you deliver too?
That's not that unusual here to have features added that promptly...actually, due to Don being on vacation, it might even have been a bit slower than otherwise...so go spread the word on Net about how well supported XY is, ok?
Re: how do I get a script to return value of current tab view
Posted: 01 Sep 2010 18:49
by admin
Actually Joso bought a big license several minutes after his last post. Also an acceptable reaction.
Thanks, Joso! 
Re: how do I get a script to return value of current tab view
Posted: 01 Sep 2010 19:18
by Joso
So here's the little snippet that toggles my display between 2 states (no reason it can't run thru them all, but this is all I need right now) - Thanks again.
Code: Select all
$i = get("view");
if ($i == 0) {
#307;
}
elseif ($i == 5) {
#302;
}
else {
echo "just toggles between list and thumbnail views";
}