About "Set DUAL=Toggle"

When I make "Set DUAL=Trigger" a button,switch to dual-display, the newly opened file display as destination.
When I make it a "hotkey-only",switch to dual-display, the newly opened file display as sources.

Open settings in preferences: "Set new panel to source when switching to dual file display",their functions will be reversed, but they will always be inconsistent.

Why do the same command have different results when executed?


I want to run custom commands when DUAL=on:

@if: Set DUAL = on
"custom commands"

This can be executed normally.

But adding "Set DUAL=toggle" will not execute properly,I must change "@if: Set DUAL=on" to "@if: Set DUAL=off" to execute correctly, Just like below:

Set DUAL= toggle
@if: Set DUAL = off
"custom commands"

Why?

I'm assuming that's a typo, but it should be Toggle rather than Trigger.

At least for me, they both do what the Preferences says they should do.

Can you show screenshots of the button and hotkey definitions you're using?

Sorry, there was indeed a spelling error.

1 Like

The "off " here should be written as "on", but I must write it as "off " to execute it correctly.


I'm confused. There are three screenshots, one running a different command (including some kind of usercommand or script we don't know the definition of), but we were only talking about two things running the same command?

Is the problem only when using Ctrl + Tab (or Tab in general) as the hotkey? That will change which side is source by default. (See Preferences / File Displays / Options / Tab Key.)

The second and third screenshots, I want to prove that the command I ran is exactly the same, no typos
:sweat_smile:
Sorry, the issue with the different run results of Set DUAL=Toggle is indeed caused by my hotkey settings.
Test command, I changed it like this:
But the result is still that when dual-display, the tree is closed.

The command parser won't accept Set Tree = on - the spaces around the equals sign are incorrect.

You need to use either Set Tree=on or Set Tree on.

Thanks for the reply, I've corrected it, but the problem persists.
It seems that when the "@if:" command is after "Set DUAL=Toggle", the detected result is reversed, but when "@if:" is used as the first command, the result is correct.

@if conditions are evaluated before any commands are run. I think that explains the confusion?

Thanks for your reply!