Page 1 of 1

Details Column Mode: External Scripting Support #2

Posted: 2011-09-15, 18:42 UTC
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

Posted: 2013-12-09, 22:40 UTC
by Balderstrom
2 year bump.

Posted: 2014-10-22, 04:08 UTC
by Balderstrom
Year 3 Bump.

Posted: 2015-04-30, 12:53 UTC
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.

Posted: 2015-04-30, 14:05 UTC
by ghisler(Author)
LB_GETTEXT is mainly for blind users using a screen reader. Using a tab could break some screen readers.

Posted: 2015-04-30, 22:31 UTC
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...)

Posted: 2015-05-04, 13:52 UTC
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?

Posted: 2015-06-11, 22:54 UTC
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.

Posted: 2015-06-15, 14:07 UTC
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.

Posted: 2015-06-16, 19:28 UTC
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...

Posted: 2015-06-16, 20:25 UTC
by MVV
nsp,
Named pipe would help too, but it is too overloaded...