Paste Path from Clipboard into TC and go to folder ('CD')

English support forum

Moderators: Hacker, petermad, Stefan2, white

W!ke98
Junior Member
Junior Member
Posts: 20
Joined: 2005-01-04, 08:30 UTC

Post by *W!ke98 »

Hi,

Thanks for the handy tip :)

Greetings.
W!ke98
Junior Member
Junior Member
Posts: 20
Joined: 2005-01-04, 08:30 UTC

Post by *W!ke98 »

2Relloz.

Thanks for the tip on adding the editpath to a function key.
Now i can use this script:

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.SendKeys "{F12}"
WshShell.SendKeys "^v"
WshShell.SendKeys "~"

Wscript.Quit


and finally can put the Quick search to Letter Only :)

Greetings.
Last edited by W!ke98 on 2005-01-04, 11:45 UTC, edited 1 time in total.
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

WshShell.SendKeys "~"
Please explain what this statement does. :oops:
I switched to Linux, bye and thanks for all the fish!
W!ke98
Junior Member
Junior Member
Posts: 20
Joined: 2005-01-04, 08:30 UTC

Post by *W!ke98 »

Hi,

~ means enter
But you can also use {enter}

Complete list here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthsendkeys.asp

Greetings.
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2W!ke98
Great, thanks!
I switched to Linux, bye and thanks for all the fish!
User avatar
chromax
Junior Member
Junior Member
Posts: 71
Joined: 2003-04-24, 16:55 UTC
Location: Neo Tokio

Re: Paste from Clipboard

Post by *chromax »

Munango-Keewati wrote: ...

'***************
'Paste filename from clipboard: CD & select file in TC
Set oHtml = CreateObject("htmlfile")
vText = oHtml.ParentWindow.ClipboardData.GetData("text")
If Instr(vText,"") > 0 then
vPos = InStrRev(vText, "") + 1
vName = Mid(vText, vPos)
vPos = vPos - 2
vPath = "CD " & Mid(vText, 1, vPos)
set WshShell = WScript.CreateObject("WScript.Shell")
'WshShell.SendKeys "%vr" 'go to right list if using Extended English menu
WshShell.SendKeys "{LEFT}" 'Open/go to command line
WshShell.SendKeys vPath ' change directory
WshShell.SendKeys "~"
WshShell.SendKeys vName 'find file - requires quick search - letters with dialogue
WshShell.SendKeys "{ESC} " 'select file
Else:
MsgBox "No File Path Found on Clipboard."
End If
'*********************
This works!

But is there a newer, better way?
Maybe TC needs a "paste and go" command? (like browsers in the url bar)
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6950
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

I use the a NirSoft tool as follows:

=====The Button ================
TOTALCMD#BAR#DATA
em_CDToClip

C:\Tools\Wincmd\Icons\Right-Blue.ico
CD Clipboard

0
10302

======Here the em_ command ===============
[em_CDToClip]
cmd=c:\tools\NirSoft\nircmd.exe exec show %COMMANDER_EXE% /O /S /A /L="~$clipboard$
Post Reply