How can I open directory in other panel and activate it

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
toybear1999
Junior Member
Junior Member
Posts: 7
Joined: 2012-04-21, 11:49 UTC

How can I open directory in other panel and activate it

Post by *toybear1999 »

Hi,

There is a command to open a new tab in the other panel's background with the current directory( cm_OpenDirinNewTabOther ), but not a command to open it and activate it at once. I'd really like to be able to do that as well. Right now it's a four-step process: open tab in other panel's background, tab over to other panel, activate the correct tab, tab over to original panel.

Appreciate your help!
User avatar
eugensyl
Power Member
Power Member
Posts: 564
Joined: 2004-06-03, 18:27 UTC
Location: România
Contact:

Re: How can I open directory in other panel and activate it

Post by *eugensyl »

toybear1999 wrote:Hi,

There is a command to open a new tab in the other panel's background with the current directory( cm_OpenDirinNewTabOther ), but not a command to open it and activate it at once. I'd really like to be able to do that as well. Right now it's a four-step process: open tab in other panel's background, tab over to other panel, activate the correct tab, tab over to original panel.

Appreciate your help!
Try this:
- add a button with command
"%commander_path%/totalcmd.exe" /O /T /R="%P" /P=L

It must work, according with help file.
My Best Wishes,

Eugen
User avatar
white
Power Member
Power Member
Posts: 5747
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: How can I open directory in other panel and activate it

Post by *white »

eugensyl wrote:Try this:
- add a button with command
"%commander_path%/totalcmd.exe" /O /T /R="%P" /P=L

It must work, according with help file.
It should be:

Code: Select all

Command:    "%commander_path%/totalcmd.exe"
Parameters: /O /T /S /R="%P" /P=R
Except that it does not work because the /S switch does not change the behavior of the /P= switch.
toybear1999
Junior Member
Junior Member
Posts: 7
Joined: 2012-04-21, 11:49 UTC

Re: How can I open directory in other panel and activate it

Post by *toybear1999 »

It works very well. very thanks for your kindly help. But how can I assign a shortkey such as "Ctrl+Down' to this command?

Appreciate your help again.



white wrote:
eugensyl wrote:Try this:
- add a button with command
"%commander_path%/totalcmd.exe" /O /T /R="%P" /P=L

It must work, according with help file.
It should be:

Code: Select all

Command:    "%commander_path%/totalcmd.exe"
Parameters: /O /T /S /R="%P" /P=R
Except that it does not work because the /S switch does not change the behavior of the /P= switch.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

toybear1999, you should pack this command to user-command (em_command) in order to assign a hotkey for it.
Open Configuration - Misc., choose desired hotkey, click "..." button to open command browser (Choose command window), choose usercmd.ini and create new command with same contents as above. Then apply all.

You may remove parameter /P=R if you don't need a half-working active panel switching. However you can create two user-commands activating its panel (one with /P=L and one with /P=R) and call desired one. Also, you can check which panel is active and call right one using e.g. my TCFS2.
toybear1999
Junior Member
Junior Member
Posts: 7
Joined: 2012-04-21, 11:49 UTC

Post by *toybear1999 »

Very very thanks for your help. It works now. I create two commands as your advised. They works very well.

MVV wrote:toybear1999, you should pack this command to user-command (em_command) in order to assign a hotkey for it.
Open Configuration - Misc., choose desired hotkey, click "..." button to open command browser (Choose command window), choose usercmd.ini and create new command with same contents as above. Then apply all.

You may remove parameter /P=R if you don't need a half-working active panel switching. However you can create two user-commands activating its panel (one with /P=L and one with /P=R) and call desired one. Also, you can check which panel is active and call right one using e.g. my TCFS2.
brucmao
Junior Member
Junior Member
Posts: 10
Joined: 2024-10-21, 02:58 UTC

Re:

Post by *brucmao »

MVV wrote: 2012-04-22, 05:55 UTC toybear1999, you should pack this command to user-command (em_command) in order to assign a hotkey for it.
Open Configuration - Misc., choose desired hotkey, click "..." button to open command browser (Choose command window), choose usercmd.ini and create new command with same contents as above. Then apply all.

You may remove parameter /P=R if you don't need a half-working active panel switching. However you can create two user-commands activating its panel (one with /P=L and one with /P=R) and call desired one. Also, you can check which panel is active and call right one using e.g. my TCFS2.
This is my custom command, and it’s almost perfect, except that I still need to press the Tab key once.

Code: Select all

[em_OpenDirInNewTabOther]
cmd=%COMMANDER_EXE%
param=/A /T /O /S /R="%P%N" 
How can i check which panel is active with tcfs2?
I want to open in other panel and set focus to the target panel
Can the parameters dynamically return based on the execution of tcfs2?
param=/A /T /O /S /R="%P%N" /P=L
or
param=/A /T /O /S /R="%P%N" /P=R
User avatar
petermad
Power Member
Power Member
Posts: 16001
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How can I open directory in other panel and activate it

Post by *petermad »

How about using this:

Code: Select all

[em_OpenDirInNewTabOther]
cmd=cm_OpenNewTabOther,cm_FocusTrg
Or if you want to open the dir under the cursor in the tab:

Code: Select all

[em_OpenDirInNewTabOther]
cmd=cm_OpenDirInNewTabOther,cm_FocusTrg
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
brucmao
Junior Member
Junior Member
Posts: 10
Joined: 2024-10-21, 02:58 UTC

Re: How can I open directory in other panel and activate it

Post by *brucmao »

petermad wrote: 2024-12-16, 14:31 UTC How about using this:

Code: Select all

[em_OpenDirInNewTabOther]
cmd=cm_OpenNewTabOther,cm_FocusTrg
Or if you want to open the dir under the cursor in the tab:

Code: Select all

[em_OpenDirInNewTabOther]
cmd=cm_OpenDirInNewTabOther,cm_FocusTrg
It works well!
For me, I prefer the following command.

Code: Select all

[em_OpenDirInNewTabOther]
cmd=%COMMANDER_EXE%
param=/A /O /T /S /R="%P%N"


[em_OpenDirInNewTabtarget]
cmd=em_OpenDirInNewTabOther,cm_wait 200,cm_FocusTrg
Post Reply