Search code examples
autohotkey

How to get the active window's title with AutoHotKey?


I wrote this short test code, but it didn't work. What am I doing wrong?

F12::
WinGetTitle, Title, A ;
MsgBox, "%Title%"

The displayed result was ""


Solution

  • I removed a ; and added return and this worked...

    F12::
    WinGetTitle, title, A
    MsgBox, "%title%"
    return