Skip to content

Instantly share code, notes, and snippets.

@apsun
Created October 20, 2015 00:07
Show Gist options
  • Select an option

  • Save apsun/eadfc1d96c462e2d81ed to your computer and use it in GitHub Desktop.

Select an option

Save apsun/eadfc1d96c462e2d81ed to your computer and use it in GitHub Desktop.
#NoEnv
#Warn
#NoTrayIcon
#SingleInstance Force
#Include CommonFunctions.ahk
SendMode Input
; Change the following line to match your computer locale!
; If you don't change it, there will be issues
; when the all programs category is already expanded.
backButtonText := "Back"
startMenuClass := "DV2ControlHost"
expandClassNN := "Button1"
searchClassNN := "DirectUIHWND1"
clicked := false
while true
{
if (clicked)
{
if (!ClassExists(startMenuClass))
{
clicked := false
}
}
else
{
WaitClassActive(startMenuClass)
if (GetControlText(startMenuClass, expandClassNN) != backButtonText)
{
ClickControl(startMenuClass, expandClassNN)
FocusControl(startMenuClass, searchClassNN)
ClickControl(startMenuClass, searchClassNN)
clicked := true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment