How to get selected files full path in script

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
dindog
Senior Member
Senior Member
Posts: 316
Joined: 2010-10-18, 07:41 UTC

How to get selected files full path in script

Post by *dindog »

I am writing an AHK script pass filename between open&save dialog of any windows applications with TC
I am using postMessage to call "cm_CopyFullNamesToClip" for now, but I find it's only work in 9.5beta, there is a undocument change of this internal commnad:

Before TC9.5beta cm_CopyFullNamesToClip will prompt dialog "no selected file" if the cursor is at "[..]"(parent dir), in TC9.5beta, it will return the source path, which I find it useful... in the case of "new file" or "save as", I just need to pass the source path to the dialog and leave the original filename.
This is a script for myself, so the backward compatibility is NOT my concern, I want to know is it a bug or "cm_CopyFullNamesToClip" will stay this way...

With the TC9.2 version "cm_CopyFullNamesToClip" , I need to wm_copydata to get "SN" check does it equal to "..", if the answer is not, I can call "cm_CopyFullNamesToClip" safely.... Or are there any better solution to get selected files name in TC by scripting?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50883
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to get selected files full path in script

Post by *ghisler(Author) »

It's an intentional change:
21.01.19 Added: Menu Mark - "Copy names with path to clipboard": Copy current directory when cursor on [..] and nothing is selected (32/64)
Author of Total Commander
https://www.ghisler.com
Post Reply