(Windows) Focus Grafana Over All Other Windows

Windows is not the optimal system on which to run a full screen instance of a Grafana display, but with certain automation tools it can be pretty solid.

Why is this necessary? Because you may have other applications running on your Grafana display that might pop messages up on the screen. If that happens, Windows will fire this job within 60 seconds and focus the Grafana display overĀ the topĀ of whatever message has popped up.

NOTE: This will not work with the Windows Update pop-up because the Windows update pop-up does not respond to focus commands. Windows Updates are now compulsory and you kinda just have to deal with them.

This is a Windows specific tutorial.

See also:


  • Windows PC
  • An operational Grafana instance

1. Install AutoHotKey

Then click on the AutoHotKey install file:


Click Express Installation:


And then click Exit:


2. Create AutoHotKey script to focus Grafana

Open Notepad and copy the code below into it:

     WinActivate ; use the window found above
     WinActivate, Calculator

Replace "WINDOW_TITLE_HERE" with the title of the Grafana dashboard you will be displaying. In order to retrieve the Grafana dashboard title, you can hover your mouse cursor over the relevant browser tab, wait a second, and the full title of that Grafana dashboard will pop up :


Now go to File -> Save As... to save this Notepad instance as "file_name.AHK".



The .AHK extension indicates that this is an AutoHotKey script that will fire the containing script when it runs. Replace "file_name" with whatever is convenient for you.

NOTE: It may be necessary to force Windows Explorer to show you file extensions - if that's the case, open a Windows Explorer instance and check the box indicated in the graphic below:


Once the file name extensions have been revealed, you will be able to save the Notepad file to a .AHK extension.

3. Create a Task Scheduler job to fire the AHK script on a certain interval

Go to the Cortana search bar and type "Task Scheduler", then click on Task Scheduler.


In the resulting Task Scheduler window, click Create Task from the Actions menu.


Give this job a name like Focus Grafana:


Now go to the Triggers tab and click New:


  • Set the schedule to Daily
  • Check repeat task every and input 1 minute
  • Set for a duration of to Indefinite
  • Name sure Enabled is checked


Go to the Actions tab and click New:


Click Browse and browse to the location of the AHK script and double-click it.


Then click OK:


Windows will now fire the Focus Grafana AHK script every 60 seconds while a user is logged in.

Back to top