@swagfag
Code: Select all
gui,add,listbox, r5 w100, 1|2|3|4|5
gui, show, w200 h200
Return
WM_MOUSEMOVE(wParam, lParam) {
CoordMode, Mouse, Client
MouseGetPos,X, Y, Win, Control
GuiControlGet, Hwnd, Hwnd, %Control%
If (Control == "ListBox1") {
lParam2 := x & 0xFFFF | (y & 0xFFFF) << 16
FileAppend, lParam: %lParam% lParam2 %lparam2%`n,*
}
}
Im using the lParam value with this sendmessage:
Code: Select all
SendMessage, ITEMFROMPOINT:=0x01A9, 0, %lParam%, , ahk_id %Hwnd%
Item := ErrorLevel
To get the current listbox item under the mouse. I don't know why , in my code (not this example above), it only return the correct ListBox item when i use the value from lParam, lParam2 return an incorrect item