Have you been naughty 2 is finally here! Better than ever.
List of windows, you can add "Safe" windows
All windows are hidden and show using a Unique ID this removed an old glitch
Saves options
Mutes
And A Screen Save option
Any Ideas, tips, comments or bugs please post below.
Code:
SoundGetWaveVolume, lastvol
dir = SIDerHider\save.spdr
name = SIDerHider
time = 500
IfExist, %name%
{
IfExist, %dir%
{
Loop, Read, %dir%
{
if A_Index = 1
aot = %A_LoopReadLine%
else if A_Index = 2
mute = %A_LoopReadLine%
else if A_Index = 3
screen = %A_LoopReadLine%
}
}
else
{
FileAppend,0`n1`n0, %dir%
aot = 0
mute = 1
screen = 0
}
}
else
{
FileCreateDir, %name%
FileAppend,0`n1`n0, %dir%
aot = 0
mute = 1
screen = 0
}
Gui, +ToolWindow
Gui, Add, Tab2, tab Buttons, Apps|Hidden|Options|Credits
Gui, Tab, 1
Gui, Add, Text,, Select "Safe" Apps
Gui, Add, listview, vlistview CHECKED, Name|Class|ID
Gui, +Resize
Gui, Tab, 2
Gui, Add, Button,, Unhide
Gui, Add, listview, vhidenlistview, Name|Class|ID
Gui, Tab, 3
Gui, Add, Text,, Please select the Hide Hotkey
if aot = 1
Gui, Add, CheckBox,x10 y95 gaot CHECKED vAOT,Always On Top
else
Gui, Add, CheckBox,x10 y95 gaot vAOT,Always On Top
if mute = 1
Gui, Add, CheckBox, x10 y115 gmute vmute CHECKED, Silence
else
Gui, Add, CheckBox, x10 y115 gmute vmute, Silence
if screen = 1
Gui, Add, CheckBox, x10 y135 vscreen CHECKED, Screen Saver
else
Gui, Add, CheckBox, x10 y135 vscreen, Screen Saver
Gui, Add, Button,, Save
Gui, Tab, 4
Gui, Add, Text,, Created by SpiderGames.`nTips and ideas are welcome.
Gui, Show,, %name%
Gui, Listview, listview
WinGet, id, list,,, Program Manager
Loop, %id%
{
this_id := id%A_Index%
WinGetClass, this_class, ahk_id %this_id%
WinGetTitle, this_title, ahk_id %this_id%
WinGet, this_ID,ID, ahk_id %this_id%
if this_title !=
{
LV_Add("",this_title,this_class,this_ID)
LV_ModifyCol()
}
}
SetTimer, reload, %time%
Return,
ButtonSave:
Gui, Submit, Nohide
FileDelete, %dir%
FileAppend, %aot%`n%mute%`n%screen%`n, %dir%
Return,
aot:
Gui, Submit, Nohide
if aot = 1
WinSet, AlwaysOnTop, On, %name%
else if aot = 0
WinSet, AlwaysOnTop, Off, %name%
Return,
mute:
Gui, Submit, Nohide
if mute = 0
{
SoundSetWaveVolume, %lastvol%
}
Return,
GuiSize:
if ErrorLevel = 1 ; The window has been minimized. No action needed.
return
; Otherwise, the window has been resized or maximized. Resize the Edit control to match.
NewWidth := A_GuiWidth - 40
NewHeight := A_GuiHeight - 60
GuiControl, Move, listview, W%NewWidth% H %NewHeight%
GuiControl, Move, tab, W%NewWidth% H%NewHeight%
NewHeight -= 40
GuiControl, Move, hidenlistview, W%NewWidth% H %NewHeight%
return
reload:
WinGet, id, list,,, Program Manager
Loop, %id%
{
if time = 0
break
this_id := id%A_Index%
WinGetClass, this_class, ahk_id %this_id%
WinGetTitle, this_title, ahk_id %this_id%
WinGet, this_ID,ID, ahk_id %this_id%
if this_title !=
{
Loop % LV_GetCount()
{
if time = 0
break
LV_GetText(RetrievedText, A_Index,3)
if this_ID = %RetrievedText%
Break,
if A_Index = % LV_GetCount()
{
LV_Add("",this_title,this_class,this_ID)
LV_ModifyCol()
}
}
}
}
Loop % LV_GetCount()
{
if time = 0
break
LV_GetText(RetrievedText, A_Index)
IfWinNotExist, %RetrievedText%
LV_Delete(A_Index)
}
Return,
^!s::
Hide:
Gui, Submit, NoHide
RowNumber = 0
time = Off
SetTimer, reload, %time%
Gui, Listview, listview
Loop % LV_GetCount()
{
RowNumber = % LV_GetNext(RowNumber,"Checked")
if CheckedRows not contains %RowNumber%
{
if CheckedRows != 0
{
CheckedRows = %CheckedRows%%RowNumber%`,
}
}
}
Loop, parse, CheckedRows, `,
{
Row%A_LoopField% = CHECKED
}
Loop, % LV_GetCount()
{
Gui, Listview, listview
if Row%A_Index% != CHECKED
{
LV_GetText(RetrievedText, A_Index)
LV_GetText(RetrievedText2, A_Index, 2)
LV_GetText(RetrievedText3, A_Index, 3)
WinHide,ahk_ID %RetrievedText3%
ifWinExist, %RetrievedText%
{
WinHide, %RetrievedText%
}
Sleep, 100
Gui, Listview, hidenlistview
LV_Add("",RetrievedText,RetrievedText2,RetrievedText3)
LV_ModifyCol()
}
}
Gui, Submit, NoHide
Gui, Listview, listview
time = 500
SetTimer, reload, %time%
if mute = 1
{
SoundGetWaveVolume, lastvol
SoundSetWaveVolume, 0
}
if screen = 1
{
Sleep, 1000
SendMessage, 0x112, 0xF170, 2,, Program Manager
}
Return,
OnExit:
ButtonUnHide:
time = Off
SetTimer, reload, %time%
Gui, Listview, hidenlistview
Loop, % LV_GetCount()
{
Gui, Listview, hidenlistview
LV_GetText(text, A_Index,3)
WinShow, ahk_ID %text%
Sleep, 100
}
LV_Delete()
Gui, Listview, listview
time = 500
SetTimer, reload, %time%
Return,
Guiclose:
ExitApp,