Code:
;Created by Yazuak of MMOwned
#NoTrayIcon
$switch = 0
$muted = 0
HotKeySet("{F2}", "activate")
Hotkeyset("{F3}","quit")
if Not WinExists("World of Warcraft") Then
MsgBox(0,"Error","Error: World of warcraft is not running, or the window's name is not 'World of Warcraft'.")
Exit
Else
MsgBox(0,"Secrecy","Secrecy is now running. press F2 to toggle the display of WoW. Press F3 to exit the script.")
EndIf
func activate()
if $switch = 1 Then
$switch = 0
Else
$switch = 1
EndIf
EndFunc
Func quit()
Exit
EndFunc
Func main()
if $switch Then
if $muted = 0 Then
ControlSend("World of Warcraft", "", "", "{ctrldown}")
ControlSend("World of Warcraft", "", "", "s")
ControlSend("World of Warcraft", "", "", "{ctrlup}")
ControlSend("World of Warcraft", "", "", "{ctrldown}")
ControlSend("World of Warcraft", "", "", "m")
ControlSend("World of Warcraft", "", "", "{ctrlup}")
$muted = 1
Else
EndIf
WinSetState("World of Warcraft", "", @SW_HIDE)
Else
if $muted = 1 Then
ControlSend("World of Warcraft", "", "", "{ctrldown}")
ControlSend("World of Warcraft", "", "", "s")
ControlSend("World of Warcraft", "", "", "{ctrlup}")
ControlSend("World of Warcraft", "", "", "{ctrldown}")
ControlSend("World of Warcraft", "", "", "m")
ControlSend("World of Warcraft", "", "", "{ctrlup}")
$muted = 0
Else
EndIf
WinSetState("World of Warcraft", "", @SW_SHOW)
EndIf
EndFunc
while 1
main()
WEnd
;Feel free to edit and improve apon my script. Some credit would be nice too, if you are so inclined.
Just a couple of tips: