Suggest some more internal commands for scripting

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Suggest some more internal commands for scripting

Post by *Stefan2 »

Hi Mr. Ghisler,
to make scripting TC easier i want to suggest some more internal commands:


cm_SelectFolder(Name, "name")

cm_SelectFile(name, "file.ext")
cm_SelectFile(CDate, newest)
cm_SelectFile(CDate, oldest)
cm_SelectFile(MDate, "21.11.2008")
cm_SelectFile(Size, biggest)
cm_SelectFile(Size, smallest)
cm_SelectFile(Size, < 1)
cm_SelectFile(List, first) like cm_GoToFirstFile
cm_SelectFile(List, last)

cm_FocusToSelection ;set cursor (focus) to [last?] selected file/folder

---

So one could simple use
PostMessage, 1075, cm_SelectFile(Name, varFileName), , , ahk_class TTOTAL_CMD
PostMessage, 1075, cm_FocusToSelection, , , ahk_class TTOTAL_CMD
PostMessage, 1075, cm_RenameOnly, , , ahk_class TTOTAL_CMD


---
Is this is possible?
Are there more needs?

I have seen there are workarounds, but this should be easier.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Re: Suggest some more internal commands for scripting

Post by *m^2 »

Stefan2 wrote:PostMessage, 1075, cm_SelectFile(Name, varFileName), , , ahk_class TTOTAL_CMD
Is this is possible?
This one is not. But it can be done like changing directory, it's a bit more complicated, but doable.

support++;
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sounds like a good idea, I will consider it.
Author of Total Commander
https://www.ghisler.com
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

ghisler(Author) wrote:Sounds like a good idea, I will consider it.
If this is implemented, I would suggest Christian a new category for scripting-related commands and not embed the proposed ones and any possible future ones in the present categories.

This will make them accessible easier and more productively.
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Sometimes at scripting it is required to get 1) custom columns; 2) sorting method. I didn't find any description of possible messages to be sent to THeaderClick control. Mr Ghisler, could you upload somewhere programming methods to interact with this control. I suppose the custom columns (after being retrieved from ini file) can be processed the same way, right?
Single user license #329241
PowerPro scripts for Total Commander
Post Reply