Renian
08-18-2009, 12:24 PM
So I was messing around with AutoIt today, trying to learn it, and made a small little program that hides your Stormfront/Wizard windows when you hit Ctrl+Alt+D, and unhides them if you hit it again. Ctrl+Alt+Q closes the script.
OPEN SOURCE BITCHES
hidesimu.au3
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=hidesimu.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
Opt("WinTitleMatchMode", 2)
HotKeySet("^!d", "WindowManip")
HotKeySet("^!q", "Quit")
HotKeySet("^!m", "ShowState")
While True
Sleep(100)
WEnd
Func WindowManip()
$windowarray = WinList("The Wizard")
$windowarray2 = WinList("StormFront")
For $i = 1 TO $windowarray[0][0] Step 1
;MsgBox(0, "lol", $windowarray[$i][0])
;MsgBox(0, $i, WinGetState($windowarray[$i][0]))
If WinGetState($windowarray[$i][0]) = 7 Or WinGetState($windowarray[$i][0]) = 15 Then
WinSetState($windowarray[$i][0], "", @SW_HIDE)
ElseIf WinGetState($windowarray[$i][0]) = 5 Or WinGetState($windowarray[$i][0]) = 13 Then
WinSetState($windowarray[$i][0], "", @SW_SHOW)
EndIf
Next
For $i = 1 TO $windowarray2[0][0] Step 1
;MsgBox(0, "lol", $windowarray[$i][0])
;MsgBox(0, $i, WinGetState($windowarray[$i][0]))
If WinGetState($windowarray2[$i][0]) = 7 Or WinGetState($windowarray[$i][0]) = 15 Then
WinSetState($windowarray2[$i][0], "", @SW_HIDE)
ElseIf WinGetState($windowarray2[$i][0]) = 5 Or WinGetState($windowarray[$i][0]) = 13 Then
WinSetState($windowarray2[$i][0], "", @SW_SHOW)
EndIf
Next
EndFunc
Func ShowState()
$windowarray = WinList("The Wizard")
$windowarray2 = WinList("StormFront")
For $i = 1 TO $windowarray[0][0] Step 1
MsgBox(0, "Wizard Window " + $i, WinGetState($windowarray[$i][0]))
Next
For $i = 1 TO $windowarray2[0][0] Step 1
MsgBox(0, "StormfrontWindow " + $i, WinGetState($windowarray2[$i][0]))
Next
EndFunc
Func Quit()
MsgBox(0, "Script Closing", "Now closing script.")
Exit 0
EndFunc
Also compiled script so you don't need AutoIt attached. It's disturbingly large for the amount of code I made.
OPEN SOURCE BITCHES
hidesimu.au3
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=hidesimu.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
Opt("WinTitleMatchMode", 2)
HotKeySet("^!d", "WindowManip")
HotKeySet("^!q", "Quit")
HotKeySet("^!m", "ShowState")
While True
Sleep(100)
WEnd
Func WindowManip()
$windowarray = WinList("The Wizard")
$windowarray2 = WinList("StormFront")
For $i = 1 TO $windowarray[0][0] Step 1
;MsgBox(0, "lol", $windowarray[$i][0])
;MsgBox(0, $i, WinGetState($windowarray[$i][0]))
If WinGetState($windowarray[$i][0]) = 7 Or WinGetState($windowarray[$i][0]) = 15 Then
WinSetState($windowarray[$i][0], "", @SW_HIDE)
ElseIf WinGetState($windowarray[$i][0]) = 5 Or WinGetState($windowarray[$i][0]) = 13 Then
WinSetState($windowarray[$i][0], "", @SW_SHOW)
EndIf
Next
For $i = 1 TO $windowarray2[0][0] Step 1
;MsgBox(0, "lol", $windowarray[$i][0])
;MsgBox(0, $i, WinGetState($windowarray[$i][0]))
If WinGetState($windowarray2[$i][0]) = 7 Or WinGetState($windowarray[$i][0]) = 15 Then
WinSetState($windowarray2[$i][0], "", @SW_HIDE)
ElseIf WinGetState($windowarray2[$i][0]) = 5 Or WinGetState($windowarray[$i][0]) = 13 Then
WinSetState($windowarray2[$i][0], "", @SW_SHOW)
EndIf
Next
EndFunc
Func ShowState()
$windowarray = WinList("The Wizard")
$windowarray2 = WinList("StormFront")
For $i = 1 TO $windowarray[0][0] Step 1
MsgBox(0, "Wizard Window " + $i, WinGetState($windowarray[$i][0]))
Next
For $i = 1 TO $windowarray2[0][0] Step 1
MsgBox(0, "StormfrontWindow " + $i, WinGetState($windowarray2[$i][0]))
Next
EndFunc
Func Quit()
MsgBox(0, "Script Closing", "Now closing script.")
Exit 0
EndFunc
Also compiled script so you don't need AutoIt attached. It's disturbingly large for the amount of code I made.