Author: chromax
Subject: Re: Paste from Clipboard
Posted: Tue Feb 23, 2016 4:43 am (GMT -6)
This works!
But is there a newer, better way?
Maybe TC needs a "paste and go" command? (like browsers in the url bar)
Subject: Re: Paste from Clipboard
Posted: Tue Feb 23, 2016 4:43 am (GMT -6)
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)