Yes, it should be fine now. See this thread for some background. viewtopic.php?f=2&t=25041 and notes for beta v23.50.0203 - 2022-08-25 12:36.
Edit: Sorry, I hadn't noticed jupe responded already.
XYplorer Messenger (using AHK language)
Re: XYplorer Messenger (using AHK language)
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
Re: XYplorer Messenger (using AHK language)
Hey,
Have you got this to work on AHKv2
Have you got this to work on AHKv2
Re: XYplorer Messenger (using AHK language)
No, I haven't tried AHK version 2 beta. I've stuck with 1.1.XX Ansi 32-bit version for ages...no particular reason though. Maybe one of the other XY forum members have used AHK beta version 2.
EDIT: I did end up downloading and trying version 2, but I encountered a slew of errors in my AHK startup script which includes the messenger along with a bunch of other things.
EDIT: I did end up downloading and trying version 2, but I encountered a slew of errors in my AHK startup script which includes the messenger along with a bunch of other things.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
Re: XYplorer Messenger (using AHK language)
Yes, there are few changes which can be checked here. I've compled the MessageToXY as below. I never used MessageFromXYplorer, so need to check on it.
Code: Select all
MsgToXY(msg) {
HWND := WinExist("XYplorer ahk_class ThunderRT6FormDC")
If !(HWND)
Return 1
Size := StrLen(msg)
buf := Buffer(3*A_PtrSize + Size*A_PtrSize) ; Size of Pointer + Size of Length + Size of Message
NumPut "Ptr", 4194305, buf
NumPut "UInt", Size*2, buf, A_PtrSize
NumPut "Ptr", StrPtr(msg), buf, A_PtrSize*2
SendMessage 0x004a, 0, buf, , "ahk_id " HWND
Return 0
}
Re: XYplorer Messenger (using AHK language)
Full Script for AHK2
Code: Select all
SenderHWND := A_ScriptHwnd + 0
OnMessage(0x004a, MsgFromXY)
MsgToXY("::copydata " . SenderHWND . ", <curitem>")
MsgToXY(msg) {
HWND := WinExist("XYplorer ahk_class ThunderRT6FormDC")
If !(HWND)
Return 1
Size := StrLen(msg)
buf := Buffer(3*A_PtrSize + Size*A_PtrSize) ; Size of Pointer + Size of Length + Size of Message
NumPut "Ptr", 4194305, buf
NumPut "UInt", Size*2, buf, A_PtrSize
NumPut "Ptr", StrPtr(msg), buf, A_PtrSize*2
SendMessage 0x004a, 0, buf, , "ahk_id " HWND
Return 0
}
MsgFromXY(wParam, lParam, msg, hwnd) {
StringAddress := NumGet(lParam, 2*A_PtrSize, "Ptr")
CopyOfData := StrGet(StringAddress)
cbData := NumGet(lParam, A_PtrSize, "UInt")/2
DataReceived := SubStr(CopyOfData, 1, cbData)
MsgBox(DataReceived)
Return DataReceived
}
Re: XYplorer Messenger (using AHK language)
Thanks nerdweed for updating the XYplorer messenger AHK script and posting it. I wonder if that script version will work in AHK version 1.1 (i.e., backward compatible)? I may try it when I get a chance.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
Re: XYplorer Messenger (using AHK language)
Reading the version 2 description and changes from v1
I don't think there are any default combatibilty backward.
That will be one of the big problems getting v2 to replace the v1 line.
I don't think there are any default combatibilty backward.
That will be one of the big problems getting v2 to replace the v1 line.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
Re: XYplorer Messenger (using AHK language)
It won't work on AHK1.1
Re: XYplorer Messenger (using AHK language)
Full Script for AHK1 - Tried to match it as best I could to the v2 version.
Code: Select all
#SingleInstance, force
SetTitleMatchMode, 2
DetectHiddenWindows, On
SenderHWND := A_ScriptHwnd + 0 ;Return this script's hidden hwdn id. +0 to convert from Hex to Dec
OnMessage(0x4a, "MsgFromXY")
MessagetoXYplorer := "::CopyData " SenderHWND ", ""<curitem>"", 2"
; MessagetoXYplorer := "::msg Hello"
MsgToXY(MessagetoXYplorer)
MsgToXY(msg) {
HWND := WinExist("XYplorer ahk_class ThunderRT6FormDC")
If !(HWND) {
MsgBox % "XYplorer not found"
Return 1
}
Size := StrLen(msg)
VarSetCapacity(buf, 3*A_PtrSize + Size*A_PtrSize, 0) ; Size of Pointer + Size of Length + Size of Message
NumPut(4194305, buf, 0, "Ptr")
NumPut(Size*2, buf, A_PtrSize, "UInt")
NumPut(&msg, buf, A_PtrSize * 2, "Ptr")
SendMessage 0x4a, 0, &buf, , ahk_id %HWND%
Return 0
}
MsgFromXY(wParam, lParam, msg, hwnd) {
StringAddress := NumGet(lParam + 2*A_PtrSize, "Ptr")
CopyOfData := StrGet(StringAddress)
cbData := NumGet(lParam + A_PtrSize, "UInt")/2
DataReceived := SubStr(CopyOfData, 1, cbData)
MsgBox % DataReceived
Return DataReceived
}