Is 'Remote Control' still working?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
XphereOmega
Posts: 3
Joined: 03 Feb 2020 11:06

Is 'Remote Control' still working?

Post by XphereOmega »

Hi,

Spent couple hours to get this 'Remote Control' feature working but failed. Google search was almost useless and even a code found in this forum(though it's old. 2014) seems not working anymore.

viewtopic.php?t=14200

Is this feature still working or blocked/disabled for some reasons?

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Is 'Remote Control' still working?

Post by highend »

It's still working. Can't comment on that VB.NET snippet (most people use AHK / AutoHotkey for this kind of stuff)
One of my scripts helped you out? Please donate via Paypal

XphereOmega
Posts: 3
Joined: 03 Feb 2020 11:06

Re: Is 'Remote Control' still working?

Post by XphereOmega »

highend wrote: 03 Feb 2020 11:28 It's still working. Can't comment on that VB.NET snippet (most people use AHK / AutoHotkey for this kind of stuff)
Oh, that's good to hear!

Could I get some help with the following code then?

Code: Select all

WinGet, h, ID, ahk_class ThunderRT6FormDC ahk_exe XYplorer.exe
str := "::msg 'hello';"
strSize := StrLen(str) * (A_IsUnicode ? 2 : 1) + 1
VarSetCapacity(cds, 2*A_PtrSize + 4, 0)
NumPut(4194305, cds, 0)
NumPut(strSize, cds, A_PtrSize)
NumPut(&str, cds, (A_PtrSize+4))
SendMessage, 0x4a, A_ScriptHwnd, &cds,, ahk_id %h%
;msgbox % errorlevel	; shows 'FAIL'

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Is 'Remote Control' still working?

Post by highend »

You probably have a bitness problem (with your ahk code).

Try this:

Code: Select all

WinGet, xyplorerHwnd, ID, ahk_class ThunderRT6FormDC
xyScript := "::msg 'hello';"
Send_WM_COPYDATA(xyScript, xyplorerHwnd)

return


Send_WM_COPYDATA(message, hwnd) {

	size := StrLen(message)
	if !(A_IsUnicode) {
		VarSetCapacity(data, size * 2, 0)
		StrPut(message, &data, "UTF-16")
	} else {
		data := message
	}
	VarSetCapacity(COPYDATA, A_PtrSize * 3, 0)
	NumPut(4194305, COPYDATA, 0, "Ptr")
	NumPut(size * 2, COPYDATA, A_PtrSize, "UInt")
	NumPut(&data, COPYDATA, A_PtrSize * 2, "Ptr")
	result := DllCall("User32.dll\SendMessageW", "Ptr", hwnd, "UInt", 74, "Ptr", 0, "Ptr", &COPYDATA, "Ptr")
	return
}
One of my scripts helped you out? Please donate via Paypal

XphereOmega
Posts: 3
Joined: 03 Feb 2020 11:06

Re: Is 'Remote Control' still working?

Post by XphereOmega »

Thanks a lot. It was really helpful.

Post Reply