Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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 ""

like image 517
Kou Avatar asked Feb 02 '12 15:02

Kou


People also ask

What is Winactivate?

WinActivateBottom activates the bottommost matching window (typically the one least recently used). GroupActivate activates the next window that matches criteria specified by a window group. [v1. 1.20+]: If the active window is hidden and DetectHiddenWindows is turned off, it is never considered a match.

What is window spy in AutoHotkey?

Window Spy is a utility program that is installed with AutoHotkey. Window Spy allows you to see various information about a window that can be use with AutoHotkey and AutoHotkey Snippit.

How do I find my AHK window ID?

Re: How do i get a window id You can use https://autohotkey.com/docs/misc/WinTitle.htm to find the window info.


1 Answers

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

F12::
WinGetTitle, title, A
MsgBox, "%title%"
return
like image 85
Schwarzie2478 Avatar answered Oct 12 '22 10:10

Schwarzie2478