Activate and navigate to a directory automatically

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
msrox
Member
Member
Posts: 101
Joined: 2008-03-14, 00:10 UTC

Activate and navigate to a directory automatically

Post by *msrox »

is there anyway to activate (bring in front) TC and navigate to a specific directory using a code in Autoit?

I am using this code to copy of the selected files in TC into clipboard using Autoit:

$hwnd = WinGetHandle("[Active]")
DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd , "int" , 1075 , "int", 2018, "int", 0)

I am wondering if there is something like this to activate the TC and navigate to a specific directory without using Send() command like this to get the right panel to c: drive:

Send("!+{F2}")
Sleep(50)
Send("c")

thanks for your reply in advance.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7026
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

Start the TC with command line parameters from your script.
Using /o for the running instance and the other parameters for the directories you want. Look at the help files for complete list of parameters.
msrox
Member
Member
Posts: 101
Joined: 2008-03-14, 00:10 UTC

Post by *msrox »

thanks for your reply, but how about the already opened TC? I don't want to open another instance of TC!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7026
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

msrox wrote:thanks for your reply, but how about the already opened TC? I don't want to open another instance of TC!
Read my post !
As I said "Using /o for the running instance" !!!
msrox
Member
Member
Posts: 101
Joined: 2008-03-14, 00:10 UTC

Post by *msrox »

that's right! sorry!
thank you so much for your reply!
msrox
Member
Member
Posts: 101
Joined: 2008-03-14, 00:10 UTC

Post by *msrox »

I am using this command:
totalcmd.exe /O /R="d:\doc"

but when the left panel is active running this command does not activated the right panel. I also tried /P=R command, but with no luck! Is there any way to change the active panel of the running TC?

Thanks in advance,
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7026
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

msrox wrote:I am using this command:
totalcmd.exe /O /R="d:\doc"

but when the left panel is active running this command does not activated the right panel. I also tried /P=R command, but with no luck! Is there any way to change the active panel of the running TC?

Thanks in advance,
For me this works perfect
TOTALCMD64.EXE /o /r=c:\temp /p=r
If the left panel was active before it activates the right panel
msrox
Member
Member
Posts: 101
Joined: 2008-03-14, 00:10 UTC

Post by *msrox »

I missed a space. now it is working for me too! thank you so much!
cheers,
Post Reply