; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author: Relz (thanks to Ziao for helping me clean up and fix the code)
;
; Script Function:
; WoW Thing! 2.0
;
; ----------------------------------------------------------------------------
; Script Start
#include <GUIConstants.au3>
#NoTrayIcon
;--------------------------opening section start
---------------------------
;If no is clicked, WoW thing! closes.
$answer = MsgBox(4, "WoW Thing! v2.0", "WoW Thing! 2.0 ready to load! Continue?")
If $answer = 7 Then
MsgBox(0, "WoW Thing!", "WoW Thing! 2.0 Closing")
Exit
EndIf
;Shows a message reminding you of a hotkey
MsgBox(0,"WoW Thing! 2.0", "Remember, pressing Alt+w will allow you to rename the window for safety! Alt+H to hide window and Alt+S to show!")
;Makes the window
GUICreate("WoW Thing!", 500, 150)
;Changes window color
GUISetBkColor (0x000000)
;---------------------------------opening section end----------------------------
;----------------------Hotkey section Start -----------------------------
;Note: ! means press the Alt button
WinActivate("WoW Thing!", "")
HotKeySet("!w", "setWinTitle")
HotKeySet("!h", "hidegui")
HotKeySet("!s", "showgui")
;--------------------hotkey section end---------------------------------
;------------------WoW thing window show/hide/rename section start -------------
;Hiding W!T window
Func hidegui()
GUISetState (@SW_HIDE)
EndFunc
;Showing W!T window
Func showgui()
GUISetState (@SW_SHOW)
EndFunc
;Setting W!T window name
Func setWinTitle()
$input = InputBox("Set Window Name", "What do you want to name WoW Thing!'s window?")
$wincurtitle = WinGetTitle("WoW Thing!")
WinSetTitle($wincurtitle, "", $input)
EndFunc
;------------------WoW thing window show/hide/rename section end ---------------
;--------------------------other stuff start---------------------
GuiSetState()
GuiCtrlCreateLabel("Version 2", 398, 100)
GUICtrlSetColor(-1,0xFFFFFF)
GuiCtrlCreateLabel("Dashboard", 0, 0)
GUICtrlSetColor(-1,0xFFFFFF)
;--------------------------other stuff end
-----------------------
;--------------------------button section start---------------------
;Buttons to press when W!T window is shown
$button1= GUICtrlCreateButton("Launch WoW", 5, 25, 100, 30)
$button2= GUICtrlCreateButton("Close WoW", 110, 25, 100, 30)
$button3= GUICtrlCreateButton("Show WoW", 215, 25, 100, 30)
$button4= GUICtrlCreateButton("Hide WoW", 5, 65, 100, 30)
$button5= GUICtrlCreateButton("Run mmowned.com", 110, 65,100 ,30)
$button6= GUICtrlCreateButton("Run WoW.com", 215, 65, 100, 30)
$button7= GUICtrlCreateButton("Run ThottBot", 5, 105, 100, 30)
;--------------------------button section end---------------------
;--------------Button action section start----------------
;Actions
While 1
$msg = GUIGetMsg()
Select
Case $msg = $button1
$input = InputBox("Password", "Type in your password to auto-login")
Run("C:\Program Files\World of Warcraft\WoW.exe")
WinWaitActive("World of Warcraft")
Send($input)
Sleep(500)
Send("{enter}")
Case $msg = $button2
WinActivate("World of Warcraft", "")
WinKill("World of Warcraft", "")
Case $msg = $button5
Send("#r")
WinWaitActive("Run")
Send("Http://MMOwned.com/{Enter}")
Case $msg = $button6
Send("#r")
WinWaitActive("Run")
Send("Http://worldofwarcraft.com/{Enter}")
Case $msg = $button7
Send("#r")
WinWaitActive("Run")
Send("Http://Thottbot.com/{Enter}")
Case $msg = $button3
Global $Show = 1
WinSetState("World of Warcraft", "", @SW_SHOW)
WinSetState("World of Warcraft", "", @SW_MAXIMIZE)
WinActivate("World of Warcraft", "")
Case $msg = $Button4
Global $Show = 0
WinSetState("World of Warcraft","", @SW_MINIMIZE)
WinSetState("World of Warcraft", "", @SW_HIDE)
EndSelect
If $msg = $GUI_EVENT_CLOSE Then MsgBox(0,"Credits", "Created by Relz of MMOwned.com for Chow")
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd