I have code in a VBS script.
There is such a command:
SendKeys "{LEFT}cm_GotoNext{ENTER}"
How to read the file name under the cursor?
File name?????
How to read the file name under the cursor?
Moderators: Hacker, petermad, Stefan2, white
Re: How to read the file name under the cursor?
cm_CopyNamesToClip ?????
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How to read the file name under the cursor?
You could also send an LB_GETTEXT message to the listbox.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How to read the file name under the cursor?
sexy69 wrote: 2022-06-01, 11:25 UTC I have code in a VBS script.
There is such a command:
SendKeys "{LEFT}cm_GotoNext{ENTER}"
"SendKeys" just sends a text string.
Do you maybe want to utilize "SendMessage"? (then I would use AutoHotkey instead of VBS)
Re: How to read the file name under the cursor?
cm_CopyNamesToClip
I used the command to read the clipboard:
txt = Clipboard.GetText
and I can't read directly??
I wrote the code like this:
Uruchom.Run "D:\WinCMD\SendTCCommand.exe cm_GoToFirstFile", vbHide
Sleep 50
Do While True
If Right(tekst, 4) <> ".txt" Then
Uruchom.Run "D:\WinCMD\SendTCCommand.exe cm_GotoNext", vbHide
Sleep 50
Uruchom.SendKeys "{LEFT}cm_CopyNamesToClip{ENTER}"
Sleep 50
tekst = Clipboard.GetText
Else
WScript.Quit
End If
Loop
If the cursor is over the text file, the script will exit
I used the command to read the clipboard:
txt = Clipboard.GetText
and I can't read directly??
I wrote the code like this:
Uruchom.Run "D:\WinCMD\SendTCCommand.exe cm_GoToFirstFile", vbHide
Sleep 50
Do While True
If Right(tekst, 4) <> ".txt" Then
Uruchom.Run "D:\WinCMD\SendTCCommand.exe cm_GotoNext", vbHide
Sleep 50
Uruchom.SendKeys "{LEFT}cm_CopyNamesToClip{ENTER}"
Sleep 50
tekst = Clipboard.GetText
Else
WScript.Quit
End If
Loop
If the cursor is over the text file, the script will exit