However, while workspaces are being opened, various other unrelated and minimized windows are caused to open momentarily.
This does not appear to interfere with the script's function, but I'd like to prevent the extraneous window openings anyway.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#Persistent
#SingleInstance Force
title := "Open Workspace Warning"
Loop
{
WinWaitActive, %title% ; waits until window is active
ControlClick, Open Windows with Items Enabled, %title%
Sleep, 50
}