; ; AutoHotkey Version: 1.x ; Language: English ; Platform: Win9x/NT ; Author: A.N.Other ; ; Script Function: ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder) ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. Hidden = 0 ItemCount = DirList1 = Dirlist2 = AppPath1 = C:\Documents and Settings\All Users\Start Menu\Programs\ AppPath2 = C:\Documents and Settings\%A_UserName%\Start Menu\Programs\ Loop, %AppPath1%*, 1 { ItemCount += 1 If A_LoopFileAttrib not contains H continue DirList1 = %DirList1%%A_LoopFileName%`n ; AppPath = %AppPath%%A_LoopFileFullPath%`n } Loop, %AppPath2%*, 1 { ItemCount += 1 If A_LoopFileAttrib not contains H continue DirList2 = %DirList2%%A_LoopFileName%`n ; AppPath = %AppPath%%A_LoopFileFullPath%`n } ; Create the GUI Screen Gui, Add, Text, xp+3 yp+25, Select the program(s) to unhide: ; Join both Directory listings into a single variable FullList = %DirList1%%DirList2% ; Remove duplicate items Sort FullList, UD`n ; If there is nothing to process If FullList = { MsgBox Nothing to unhide. ExitApp } ; Populate the GUI Loop, Parse, FullList, `n { if A_LoopField = ; Ignore the blank item at the end of the list. continue if ItemCount > 20 NumberPerColumn := 20 else NumberPerColumn := 10 Pos := (NumberPerColumn-1)*20 If !A_LoopField Break If A_Index = 1 { Gui, Add, CheckBox, Checked%hidden% xp+3 yp+40 gClicked vCheckBox%A_Index%, %A_LoopField% Continue } If !Mod((A_Index-1), NumberPerColumn) Gui, Add, CheckBox, Checked%hidden% xp+250 yp-%Pos% gClicked vCheckBox%A_Index%, %A_LoopField% Else Gui, Add, CheckBox, Checked%hidden% xp+0 yp+20 gClicked vCheckBox%A_Index%, %A_LoopField% } Gui, Show,, Select Applications to Hide ; Gui, Add, Button, , OK ; Gui, Add, Button, , Cancel Return Clicked: GuiControlGet, state, , %A_GuiControl% GuiControlGet, Name, , %A_GuiControl%, Text If (state = 1) { FileSetATTrib, -H, %AppPath1%%Name%, 1, 1 FileSetATTrib, -H, %AppPath2%%Name%, 1, 1 ; Reload ; MsgBox Checked %AppPath%%Name% } Return ButtonCancel: GuiClose: GuiEscape: ExitApp