Get Dual Pane mode?

Discuss and share scripts and script files...
EnjoyRC
Posts: 101
Joined: 08 Nov 2010 21:54

Get Dual Pane mode?

Post by EnjoyRC »

Is it possible to return the current mode in scripting? Is dual pane toggled on or off? I've tried returning the get("Item",1) commands. But even if dual pane is toggled off, Pane 2 still returns the path.

I'm looking to script turning on Dual Pane if it's off and setting both paths.

I know toggling it is #800; //Toggle Dual Panes

But before toggling, I need to know if it's on or off. Else if I #800; I may be turning it off.

admin
Site Admin
Posts: 65338
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Get Dual Pane mode?

Post by admin »

Hi and welcome,

I added something experimentally. In the next BETA try this:

Code: Select all

echo state(800);

admin
Site Admin
Posts: 65338
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Get Dual Pane mode?

Post by admin »

admin wrote:Hi and welcome,

I added something experimentally. In the next BETA try this:

Code: Select all

echo state(800);
Forget this, I got something better:

Code: Select all

text get("#800", "DP", "SP");

EnjoyRC
Posts: 101
Joined: 08 Nov 2010 21:54

Re: Get Dual Pane mode?

Post by EnjoyRC »

admin wrote:Forget this, I got something better:

Code: Select all

text get("#800", "DP", "SP");
Works Perfectly! You rock!

Code: Select all

    $p = get("#800", "DP", "SP");
    if $p == "SP" {
        #800;  //Toggle Dual Panes
    }
By the way, thank you for your ultra-quick responses. What a great product, and seeing that support is awesome for XYplorer makes me that much more confident in my purchase!

admin
Site Admin
Posts: 65338
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Get Dual Pane mode?

Post by admin »

Tip: If you don't need the labels for display you can also use this shorter version:

Code: Select all

    if get("#800") == "1" {
        #800;  //Toggle Dual Panes
    }

EnjoyRC
Posts: 101
Joined: 08 Nov 2010 21:54

Re: Get Dual Pane mode?

Post by EnjoyRC »

admin wrote:Tip: If you don't need the labels for display you can also use this shorter version:

Code: Select all

    if get("#800") == "1" {
        #800;  //Toggle Dual Panes
    }
Nice... you're right. I didn't need the defined variable. I love efficient code.

admin
Site Admin
Posts: 65338
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Get Dual Pane mode?

Post by admin »

Whoops, I showed you bad (but working) syntax. The expression after if *should* be in parentheses:

Code: Select all

    if (get("#800") == "1") {
        #800;  //Toggle Dual Panes
    }

EnjoyRC
Posts: 101
Joined: 08 Nov 2010 21:54

Re: Get Dual Pane mode?

Post by EnjoyRC »

admin wrote:Whoops, I showed you bad (but working) syntax. The expression after if *should* be in parentheses:

Code: Select all

    if (get("#800") == "1") {
        #800;  //Toggle Dual Panes
    }
Mine was working without them. But single pane = "0", dual pane = "1". I wanted to insure dual pane was active.
Last edited by EnjoyRC on 09 Nov 2010 14:42, edited 1 time in total.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Get Dual Pane mode?

Post by TheQwerty »

If only we had a not-operator then you could make it:

Code: Select all

if (! get('#800')) {
  #800;
}
If only... :cry: :wink:

admin
Site Admin
Posts: 65338
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Get Dual Pane mode?

Post by admin »

EnjoyRC wrote:
admin wrote:Whoops, I showed you bad (but working) syntax. The expression after if *should* be in parentheses:

Code: Select all

    if (get("#800") == "1") {
        #800;  //Toggle Dual Panes
    }
Mine was working without them. But single pane = "0", dual pane = "1". I wanted to insure dual pane was active.
Aaah, sure! :roll: :oops: (Didn't have much sleep tonite.)

EnjoyRC
Posts: 101
Joined: 08 Nov 2010 21:54

Re: Get Dual Pane mode?

Post by EnjoyRC »

admin wrote:Aaah, sure! :roll: :oops: (Didn't have much sleep tonite.)
MakeCoffee; 8)

admin
Site Admin
Posts: 65338
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Get Dual Pane mode?

Post by admin »

TheQwerty wrote:If only we had a not-operator then you could make it:

Code: Select all

if (! get('#800')) {
  #800;
}
If only... :cry: :wink:
Try next version. :wink: (No time to document it...)

PS: All this should work in 9.70.0005... looks like I got it. :D

Code: Select all

if (!get('#800')) {
  #800;
}
if (! get('#800')) {
  #800;
}
if (not get('#800')) {
  #800;
}
if (not not not get('#800')) {
  #800;
}

EnjoyRC
Posts: 101
Joined: 08 Nov 2010 21:54

Re: Get Dual Pane mode?

Post by EnjoyRC »

admin wrote:PS: All this should work in 9.70.0005... looks like I got it. :D
How cool! :!:

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Get Dual Pane mode?

Post by j_c_hallgren »

EnjoyRC wrote:By the way, thank you for your ultra-quick responses. What a great product, and seeing that support is awesome for XYplorer makes me that much more confident in my purchase!
That's why we LOVE Don and XY SO much! Sounds like a good quote for Don to use on site if possible.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Get Dual Pane mode?

Post by TheQwerty »

admin wrote:
TheQwerty wrote:If only we had a not-operator then you could make it:

Code: Select all

if (! get('#800')) {
  #800;
}
If only... :cry: :wink:
Try next version. :wink: (No time to document it...)

PS: All this should work in 9.70.0005... looks like I got it. :D
I had expected that this would also work:

Code: Select all

$a = 'a';
  if (! "$a" Like "") {
    echo 'hi';
  }
Not a deal breaker since it seems to work with parens:

Code: Select all

$a = 'a';
  if (! ("$a" Like "")) {
    echo 'hi';
  }

Post Reply