Details Column Mode: External Scripting Support #2

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Details Column Mode: External Scripting Support #2

Post by *Balderstrom »

All of TC's file panel ListBoxes except for Details mode are tab-delimited between their respective columns (the string returned for the row, via Message LB_GETTEXT).

All of TC's file panel ListBoxes except for Thumbnail view can be queried with most of the important Windows "LB" (ListBox) Messages.

REQUEST#1
It would be most helpful if TC's Details mode/view was tab-delimited as well, instead of spaces between the respective columns -- in the string returned for the row via Message LB_GETTEXT.
==========================================================================


REQUEST#2
If it is not difficult to implement, it would be useful as well if the Thumbnail View could respond to LB sendMessage's with the appropriate responses.
Select/Unselect Item
LB_SETSEL, 0x0185 :: SendMessage, LB_SETSEL, [TRUE|FALSE], $CursorPosition

Is Item Selected?
LB_GETSEL, 0x0187 :: SendMessage, LB_GETSEL, $CursorPosition, 0x0

Where is the Cursor?
LB_GETCURSEL, 0x0188 :: SendMessage, LB_GETCURSEL, 0x0, 0x0

Get Text of the Row @ $CursorPosition
LB_GETTEXT, 0x0189 :: SendMessage, LB_GETTEXT, $CursorPosition

String Length of the Row @ $CursorPosition
LB_GETTEXTLEN, 0x018A :: SendMessage, LB_GETTEXTLEN, $CursorPosition, 0x0

How many items are in the ListBox?
LB_GETCOUNT, 0x018B :: SendMessage, LB_GETCOUNT, 0x0, 0x0

Query the List of Selected Items
LB_GETSELITEMS, 0x0191 :: SendMessage, LB_GETSELITEMS, $NumSelected, &AddressToReturnList
And while I don't necessarily expect Request#2, if it IS implemented, could the following messages elcit the appropriate response as well (They are non-functional in all of TC's View modes)
LB_FINDSTRING, 0x018F :: SendMessage, LB_FINDSTRING, $CursorPositionToStartAt, &AddressOfStringToLookFor

LB_FINDSTRINGEXACT, 0x01A2 :: SendMessage, LB_FINDSTRINGEXACT, $CursorPositionToStartAt, &AddressOfStringToLookFor
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

2 year bump.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Year 3 Bump.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post by *LonerD »

Support. Hope, it will be realized in TC 9.0.

And also in Thumbnail View now can't work LB sendMessage
LB_GETSELCOUNT, 0x0190 - count of selected items in panel.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

LB_GETTEXT is mainly for blind users using a screen reader. Using a tab could break some screen readers.
Author of Total Commander
https://www.ghisler.com
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post by *LonerD »

ghisler(Author) wrote:LB_GETTEXT is mainly
But we havn't another instruments for scripts (information of files in panel, under cursor, selection etc etc...)
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I could add one, but how? WM_COPYDATA doesn't allow to return text, and sending back a second WM_COPYDATA isn't nice either. Any suggestions?
Author of Total Commander
https://www.ghisler.com
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

What?

WM_COPYDATA ---> CAN <--- return text/respond. Which has been stated multiple times among various threads over multiple years.

LB_GETTEXT already works along with LB_SETSEL, LB_GETSEL, LB_GETCURSEL, LB_GETTEXTLEN, LB_GETCOUNT, and LB_GETSELITEMS.

What does not work is:
--> LB_FINDSTRING nor LB_FINDSTRINGEXACT
--> ANY of the ListBox (LB) messages when TC is displaying thumbnails.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Balderstrom
No, WM_COPYDATA isn't bidirectional. TC has to send back a second WM_COPYDATA to the caller.

LB_FINDSTRING doesn't work because the strings aren't stored within the listbox control.
Author of Total Commander
https://www.ghisler.com
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

ghisler(Author) wrote:2Balderstrom
No, WM_COPYDATA isn't bidirectional. TC has to send back a second WM_COPYDATA to the caller.

LB_FINDSTRING doesn't work because the strings aren't stored within the listbox control.
What you could use to send back information without sending yourself a new WM_COPY_DATA to caller is to use named shared memory (FileMapping and MaViewOfFile) the caller send you the name of the FileMapping and you write your response inside. This works also with console prm that does not have a windows handle and not message loop...
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

nsp,
Named pipe would help too, but it is too overloaded...
Post Reply