I'm trying to get the window title of the active window, but my script returns nothing. What am I doing wrong?
Code: Select all
#UseHook 1
#MaxThreadsPerHotkey 4
global windowtitle := ""
f3::
{
global
windowtitle := WinGetTitle("A")
}
f4:: {
global
MsgBox windowtitle
}