just a text works fine but a variable doesnt
Code: Select all
#NoEnv
#SingleInstance Force
loop, read, c:\file.txt
total = %a_index%
Gui Add, Button, x95 y13 w90 h23, &this not works
Gui Add, Button, x1 y13 w90 h23, &this works
Gui Show, w186 h46, test123
IfWinActive, test123
{
hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND
OnMessage(0x200,"WM_MOUSEMOVE")
Return
}
WM_MOUSEMOVE(wParam, lParam, Msg)
{
Global hCurs
MouseGetPos,,,,ctrl
If ctrl in Button1
ToolTip % total
If ctrl in Button2
WM_MOUSEMOVE := "test text"
ToolTip % WM_MOUSEMOVE
If ctrl in Button1,Button2
DllCall("SetCursor","UInt",hCurs)
Return
}
Return
GuiEscape:
GuiClose:
ExitApp