Get filename on full screen preview pane

Discuss and share scripts and script files...
Post Reply
guimcast@gmail.com
Posts: 9
Joined: 04 Jun 2023 17:56

Get filename on full screen preview pane

Post by guimcast@gmail.com »

Hi! Is it possible to get the filename on full screen preview pane? I managed to build a successful python 'xyplorer selection monitor' for editing metadata via python(because its easier to integrate to other tools for me). But when I open the "Full Screen Preview" I can no longer get items the normal way like <curitem> or SelectedItemsPathNames.

Is there any possible way to get it while Full Screen Preview is still open? I've searched the forum and documentation but couldn't find anything related to it.

Thanks in advance!

Norn
Posts: 479
Joined: 24 Oct 2021 16:10

Re: Get filename on full screen preview pane

Post by Norn »

There are two ThunderRT6FormDC windows when the Floating Preview is open. The top Floating Preview window does not process WM_COPYDATA, and only has a few controls. You can judge the window by the number of controls.
Or get the filename from the window title.

Passing commands to XYplorer.exe will work, but the latency may be higher than WM_COPYDATA.

Code: Select all

#Requires AutoHotkey v2

OnMessage(0x4a, Receive_WM_COPYDATA)
dataReceived := ""

f3::run '"D:\Tools\XYplorer\XYplorer.exe" /feed=|::copydata ' A_ScriptHwnd ', "<curitem>", 2|'

Receive_WM_COPYDATA(wParam, lParam, *) {
	global dataReceived := StrGet(
		NumGet(lParam + 2 * A_PtrSize, 'Ptr'),   ; COPYDATASTRUCT.lpData, ptr to a str presumably
		NumGet(lParam + A_PtrSize, 'UInt') / 2   ; COPYDATASTRUCT.cbData, count bytes of lpData, /2 to get count chars in unicode str
	)
	msgbox dataReceived
}
Windows 11 24H2 @100% 2560x1440

Post Reply