Jump to content

Cannot Allocate Memory Error [code included]


Recommended Posts

I have been working hours and hours on this. Now I am nearing the end but it is being stupid and using lots of memory.

-I think I may need to set my big arrays/variables back to single values or something like that. Though I have no idea if thats what I need to do...

Any suggestions to make this AutoIt program faster would be greatly appreciated.

-Look at the first few lines... this is where I have 3 [dims] that add up to 403 slots. I think this is when my program started reporting memory allocation errors.

Well, if anyone can make this run faster, thanks! Knowing the AutoIt forums, as I do now, I don't think I will be disappointed ;)

-Please help because this is very important to me.

[autoit]TrayTip("Leoj's WoW Tool", "To show/hide WoW press [F9] at any time." & @CRLF & "To show/hide LWT press [F10] at any time.", 8, 0)

#region Functions that relate to GUI

$file1 = FileOpen("myservers.txt", 0)

Dim $server[201]

For $x = 1 to 200

$server[$x] = FileReadLine($file1, $x)

If $server[$x] == "" Then

$server[$x] = "us.logon.worldofwarcraft.com"

EndIf

Next

FileClose($file1)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$file8 = FileOpen("myaccounts.txt", 0)

Dim $account[101]

For $d = 1 to 100

$account[$d] = FileReadLine($file8, $d)

If $account[$d] == "" Then

$account[$d] = "*Username..."

EndIf

Next

FileClose($file8)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$file9 = FileOpen("mypasswords.txt", 0)

Dim $password[101]

For $h = 1 to 100

$password[$h] = FileReadLine($file9, $h)

If $password[$h] == "" Then

$password[$h] = "*Password..."

EndIf

Next

FileClose($file9)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

#endregion

#include <GUIConstants.au3>

#include <GuiList.au3>

#region Main GUI

Global $CharLvl, $GrayLvl, $DesLvl, $ExpGained, $Exp2Lvl, $a[4], $b[4], $aLabel[4], $bLabel[4], $ZD, $s

$dlgTabbed = GUICreate("Leoj's WoW Tool v1.8", 512, 399, 302, 218)

GUISetIcon("D:05.ico")

;GUICtrlCreateLabel("Greetings, " & @UserName & ".", 20, 342, 300, 300)

;$Btn_Launch_With_Script = GUICtrlCreateButton("Script Launch", 20, 342, 101, 31)

$Label_Profile = GUICtrlCreateLabel("Loaded Profile: " & IniRead("settings2.ini", "last profile", "loaded profile", ""), 239, 372, 300, 300)

$Rad_Fullscreen = GUICtrlCreateRadio("Fullscreen", 20, 328, 97, 25)

$Rad_Minimized = GUICtrlCreateRadio("Minimized", 20, 350, 97, 25)

;GUICtrlSetState(-1, $GUI_CHECKED)

$Chck_Silent_Mode = GUICtrlCreateCheckbox("Silent Mode", 20, 372)

$Btn_Launch_Game = GUICtrlCreateButton("&Launch Game", 239, 335, 101, 31)

GUICtrlSetColor(-1, 0x335EA8)

$Btn_The_Exit = GUICtrlCreateButton("&Exit", 342, 335, 76, 31)

GUICtrlSetColor(-1, 0x335EA8)

$Btn_About = GUICtrlCreateButton("&About", 420, 335, 76, 31)

GUICtrlSetColor(-1, 0x335EA8)

$Tab_Root_1 = GUICtrlCreateTab(16, 16, 481, 305)

;;;;FILES TAB

$Tab_Files = GUICtrlCreateTabItem("Files")

$Gr_File_Locations = GUICtrlCreateGroup("File Locations", 40, 70, 425, 185)

GUICtrlCreateLabel("WoW Directory:", 50, 100, 95, 36)

$UI_Directory = GUICtrlCreateInput("C:\\Program Files\World of Warcraft\", 150, 98, 300, 24, -1, $WS_EX_CLIENTEDGE)

GUICtrlCreateLabel("Saved Realms:", 50, 130, 95, 36)

$UI_Realms_Txt = GUICtrlCreateInput("myservers.txt", 150, 128, 300, 24, -1, $WS_EX_CLIENTEDGE)

GUICtrlSetState(-1, $GUI_DISABLE)

GUICtrlCreateLabel("Accounts:", 50, 160, 95, 36)

$UI_Accounts_Txt = GUICtrlCreateInput("myaccounts.txt", 150, 158, 300, 24, -1, $WS_EX_CLIENTEDGE)

GUICtrlSetState(-1, $GUI_DISABLE)

GUICtrlCreateLabel("Passwords:", 50, 190, 95, 36)

$UI_Passwords_Txt = GUICtrlCreateInput("mypasswords.txt", 150, 188, 300, 24, -1, $WS_EX_CLIENTEDGE)

GUICtrlSetState(-1, $GUI_DISABLE)

GUICtrlCreateLabel("Realmlist:", 50, 220, 95, 36)

$UI_Realmlist_Txt = GUICtrlCreateInput("realmlist.wtf", 150, 218, 300, 24, -1, $WS_EX_CLIENTEDGE)

;GUICtrlSetState(-1, $GUI_DISABLE)

;GUICtrlCreateLabel("Note: editing .txt filenames will create new files.", 50, 90, 330, 36)

$Btn_Validate = GUICtrlCreateButton("Validate", 200, 270, 89, 25)

GUICtrlSetState(-1, $GUI_DEFBUTTON)

$Btn_Default = GUICtrlCreateButton("Defaults", 100, 270, 89, 25)

;;;;PROFILES TAB

$Tab_Files = GUICtrlCreateTabItem("Profiles")

GUICtrlSetState(-1, $GUI_SHOW)

$Gr_Profiles = GUICtrlCreateGroup("Profile List", 40, 48, 425, 185)

$Li_Profiles = GUICtrlCreateList("", 48, 80, 305, 150, -1, $WS_EX_CLIENTEDGE)

$Btn_Delete_Selected_Profile = GUICtrlCreateButton("Delete", 368, 128, 89, 25)

$Btn_Delete_All_Profiles = GUICtrlCreateButton("Delete All", 368, 160, 89, 25)

$Btn_Load_Profile = GUICtrlCreateButton("Load Profile", 368, 192, 89, 25)

$Gr_Add_Profile = GUICtrlCreateGroup("Save Current Settings to a Profile", 40, 240, 425, 65)

$UI_Add_Profile = GUICtrlCreateInput("", 48, 264, 305, 24, -1, $WS_EX_CLIENTEDGE)

$Btn_Save_Profile = GUICtrlCreateButton("Save Profile", 368, 264, 89, 25)

GUICtrlSetState(-1, $GUI_DEFBUTTON)

;;;;REALMLIST TAB

$Tab_Realmlist = GUICtrlCreateTabItem("Realmlist")

$Gr_Servers = GUICtrlCreateGroup("Servers", 40, 48, 425, 185)

$Li_Servers = GUICtrlCreateList("us.logon.worldofwarcraft.com", 48, 80, 305, 150, -1, $WS_EX_CLIENTEDGE)

For $z=1 To 200

GUICtrlSetData(-1,$server[$z])

Next

GUICtrlSetData(-1,"eu.logon.worldofwarcraft.com")

;$Btn_Open_Realmlist = GUICtrlCreateButton("Realmlist.wtf", 368, 96, 89, 25)

$Btn_Delete_Added = GUICtrlCreateButton("Delete All", 368, 128, 89, 25)

$Btn_Show_Current = GUICtrlCreateButton("Show Current", 368, 160, 89, 25)

$Btn_Update_Now = GUICtrlCreateButton("Update Now", 368, 192, 89, 25)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Gr_Add_Server = GUICtrlCreateGroup("Add Servers", 40, 240, 425, 65)

$UI_Add_Server = GUICtrlCreateInput("us.logon.worldofwarcraft.com", 48, 264, 305, 24, -1, $WS_EX_CLIENTEDGE)

$Btn_Add_Server = GUICtrlCreateButton("Add Server", 368, 264, 89, 25)

GUICtrlSetState(-1, $GUI_DEFBUTTON)

GUICtrlCreateGroup("", -99, -99, 1, 1)

;;;;ACCOUNT LOG IN TAB

$Tab_Log_In = GUICtrlCreateTabItem("Login")

$Gr_Add_Account = GUICtrlCreateGroup("Add Account", 32, 72, 153, 190)

GUICtrlCreateLabel("Account Name", 40, 96, 92, 20)

GUICtrlSetColor(-1, 0x6FA1D9)

GUICtrlCreateLabel("Password", 40, 179, 64, 20)

GUICtrlSetColor(-1, 0x6FA1D9)

$UI_Password = GUICtrlCreateInput("", 40, 201, 137, 24, -1, $WS_EX_CLIENTEDGE)

$UI_Account_Name = GUICtrlCreateInput("", 40, 120, 137, 24, -1, $WS_EX_CLIENTEDGE)

$Btn_Add_Account = GUICtrlCreateButton("Add", 40, 150, 65, 25)

$Btn_Add_Password = GUICtrlCreateButton("Add", 40, 230, 65, 25)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Gr_Accounts = GUICtrlCreateGroup("Accounts", 192, 72, 169, 240)

$Li_Accounts = GUICtrlCreateList("*Username...", 200, 96, 153, 108, -1, $WS_EX_CLIENTEDGE)

For $g=1 To 100

GUICtrlSetData(-1,$account[$g])

Next

$Li_Passwords = GUICtrlCreateList("*Password...", 200, 202, 153, 108, -1, $WS_EX_CLIENTEDGE)

For $u=1 To 100

GUICtrlSetData(-1,$password[$u])

Next

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Gr_Account_Options = GUICtrlCreateGroup("Options", 368, 72, 113, 81)

$Rad_Enable_Account = GUICtrlCreateRadio("Enabled", 376, 96, 89, 25)

;GUICtrlSetState(-1, $GUI_CHECKED)

$Rad_Disable_Account = GUICtrlCreateRadio("Disabled", 376, 120, 97, 25)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Gr_Account_Actions = GUICtrlCreateGroup("Actions", 368, 160, 113, 89)

$Btn_Delete_Accounts = GUICtrlCreateButton("Delete All", 376, 184, 97, 25)

$Btn_Account_Now = GUICtrlCreateButton("Test Now", 376, 216, 97, 25)

GUICtrlSetState(-1, $GUI_DEFBUTTON)

GUICtrlCreateGroup("", -99, -99, 1, 1)

;;;;CHARACTER SELECT TAB

$Tab_Character = GUICtrlCreateTabItem("Char.")

$Gr_Character = GUICtrlCreateGroup("Character", 48, 48, 129, 265)

$Rad_Char_1 = GUICtrlCreateRadio("Character 1", 56, 72, 97, 17)

;GUICtrlSetState(-1, $GUI_CHECKED)

$Rad_Char_2 = GUICtrlCreateRadio("Character 2", 56, 96, 97, 17)

$Rad_Char_3 = GUICtrlCreateRadio("Character 3", 56, 120, 97, 17)

$Rad_Char_4 = GUICtrlCreateRadio("Character 4", 56, 144, 97, 17)

$Rad_Char_5 = GUICtrlCreateRadio("Character 5", 56, 192, 97, 17)

$Rad_Char_6 = GUICtrlCreateRadio("Character 6", 56, 168, 97, 17)

$Rad_Char_7 = GUICtrlCreateRadio("Character 7", 56, 216, 97, 17)

$Rad_Char_8 = GUICtrlCreateRadio("Character 8", 56, 240, 97, 17)

$Rad_Char_9 = GUICtrlCreateRadio("Character 9", 56, 264, 97, 17)

$Rad_Char_10 = GUICtrlCreateRadio("Character 10", 56, 288, 97, 17)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Gr_Time_Delay = GUICtrlCreateGroup("Time Delay", 184, 48, 153, 169)

$Rad_1_Sec = GUICtrlCreateRadio("1 Second", 200, 72, 113, 17)

$Rad_5_Sec = GUICtrlCreateRadio("5 Seconds", 200, 96, 121, 17)

$Rad_10_Sec = GUICtrlCreateRadio("10 Seconds", 200, 120, 113, 17)

;GUICtrlSetState(-1, $GUI_CHECKED)

$Rad_15_Sec = GUICtrlCreateRadio("15 Seconds", 200, 144, 105, 17)

$Rad_20_Sec = GUICtrlCreateRadio("20 Seconds", 200, 168, 113, 17)

$Rad_25_Sec = GUICtrlCreateRadio("25 Seconds", 200, 192, 105, 17)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Gr_Character_Options = GUICtrlCreateGroup("Options", 344, 48, 121, 81)

$Rad_Enable_Character = GUICtrlCreateRadio("Enabled", 352, 72, 105, 17)

;GUICtrlSetState(-1, $GUI_CHECKED)

$Rad_Disable_Character = GUICtrlCreateRadio("Disabled", 352, 96, 105, 17)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Gr_Character_Actions = GUICtrlCreateGroup("Actions", 344, 136, 121, 81)

$Btn_Character_Now = GUICtrlCreateButton("Test Now", 360, 168, 89, 25)

GUICtrlSetState(-1, $GUI_DEFBUTTON)

GUICtrlCreateGroup("", -99, -99, 1, 1)

GUICtrlCreateLabel("Character: the slot (counting down from top) that a character occupies in the character selection screen.", 184, 224, 286, 52)

GUICtrlSetColor(-1, 0x85878C)

GUICtrlCreateLabel("Time Delay: the time between logon and automated character selection.", 184, 280, 277, 36)

GUICtrlSetColor(-1, 0x85878C)

;;;;ANTI AFK BOT TAB

$Tab_Anti_AFK = GUICtrlCreateTabItem("Anti AFK")

$Gr_Setup_AFK = GUICtrlCreateGroup("Settings", 51, 62, 409, 180)

GUICtrlCreateLabel("-wait time (in seconds) before running Anti AFK. ", 163, 100, 286, 20)

GUICtrlCreateLabel("-wait from this amount of time (in seconds) to...", 163, 132, 286, 20)

GUICtrlCreateLabel("this amount of time (in seconds) between jumps.", 163, 164, 286, 20)

GUICtrlCreateLabel("-number of times to jump.", 163, 196, 286, 20)

;GUICtrlCreateLabel("Note: pressing [F11] will stop Anti AFK." & @CRLF & "Note: all times are in seconds. (60 sec = 1 min)", 170, 250, 294, 40)

$UI_Load_Wait = GUICtrlCreateInput("120", 83, 100, 73, 24, -1, $WS_EX_CLIENTEDGE)

$UI_Jump_Sleep = GUICtrlCreateInput("60", 83, 132, 73, 24, -1, $WS_EX_CLIENTEDGE)

$UI_Jump_Sleep2 = GUICtrlCreateInput("60", 83, 164, 73, 24, -1, $WS_EX_CLIENTEDGE)

$UI_Jump_Times = GUICtrlCreateInput("180", 83, 196, 73, 24, -1, $WS_EX_CLIENTEDGE)

$Gr_Run_AFK = GUICtrlCreateGroup("Actions", 51, 245, 125, 60)

$Btn_Jump_Now = GUICtrlCreateButton("Test Now", 70, 268, 89, 25)

GUICtrlSetState(-1, $GUI_DEFBUTTON)

$Gr_Run_AFK = GUICtrlCreateGroup("Options", 186, 245, 125, 60)

$Rad_Enable_AFK = GUICtrlCreateRadio("Enabled", 210, 264, 80, 17)

;GUICtrlSetState(-1, $GUI_CHECKED)

$Rad_Disable_AFK = GUICtrlCreateRadio("Disabled", 210, 284, 80, 17)

GUICtrlCreateGroup("", -99, -99, 1, 1)

;;;;LEVEL CALCULATOR TAB

$Tab_Level_Calc = GUICtrlCreateTabItem("Calc.")

$CLvlLabel = GuiCtrlCreateLabel("Character Level:", 150, 50, 100, 20)

$CLvlInput = GuiCtrlCreateInput("1", 250, 50, 30, 20)

$CalcButton = GUICtrlCreateButton("Calculate", 285, 50, 80, 20)

GUICtrlSetState(-1, $GUI_DEFBUTTON)

$Gr_Kill_Calc = GuiCtrlCreateGroup("Number of Monsters You Need to Kill", 60, 80, 390, 155)

$Lvl1a = GuiCtrlCreateLabel("1 Level above you:", 260, 110, 115, 50)

$aLabel[0] = GuiCtrlCreateLabel("?", 383, 110, 50, 20)

$Lvl2a = GuiCtrlCreateLabel("2 levels above you:", 260, 140, 120, 50)

$aLabel[1] = GuiCtrlCreateLabel("?", 383, 140, 50, 20)

$Lvl3a = GuiCtrlCreateLabel("3 levels above you:", 260, 170, 120, 50)

$aLabel[2] = GuiCtrlCreateLabel("?", 383, 170, 50, 20)

$Lvl4a = GuiCtrlCreateLabel("4 levels above you:", 260, 200, 120, 50)

$aLabel[3] = GuiCtrlCreateLabel("?", 383, 200, 50, 20)

$Lvl1b = GuiCtrlCreateLabel("1 level below you:" , 80, 110, 110, 50)

$bLabel[0] = GuiCtrlCreateLabel("?", 200, 110, 85, 20)

$Lvl2b = GuiCtrlCreateLabel("2 levels below you:", 80, 140, 115, 50)

$bLabel[1] = GuiCtrlCreateLabel("?", 200, 140, 85, 20)

$Lvl3b = GuiCtrlCreateLabel("3 levels below you:", 80, 170, 115, 50)

$bLabel[2] = GuiCtrlCreateLabel("?", 200, 170, 85, 20)

$Lvl4b = GuiCtrlCreateLabel("4 levels below you:", 80, 200, 115, 50)

$bLabel[3] = GuiCtrlCreateLabel("?", 200, 200, 85, 20)

$Gr_Other_Calc = GuiCtrlCreateGroup("Other Information", 60, 240, 390, 50)

$Mobs = GuiCtrlCreateLabel("Mobs your level:", 80, 262, 100, 100)

$MNeededLabel = GUICtrlCreateLabel("?", 182, 262, 100, 20)

;;;;DEV TOOLS TAB

$Tab_Process_Edit = GUICtrlCreateTabItem("Tools")

$Gr_Setup_AFK = GUICtrlCreateGroup("Choose Priority", 51, 52, 409, 172)

$Rad_0_Priority = GUICtrlCreateRadio("0 - Idle/Low", 59, 71, 380, 25)

$Rad_1_Priority = GUICtrlCreateRadio("1 - Below Normal (Not supported on Windows 95/98/ME)", 59, 95, 380, 25)

$Rad_2_Priority = GUICtrlCreateRadio("2 - Normal", 59, 119, 380, 25)

GUICtrlSetState(-1, $GUI_CHECKED)

$Rad_3_Priority = GUICtrlCreateRadio("3 - Above Normal (Not supported on Windows 95/98/ME)", 59, 143, 380, 25)

$Rad_4_Priority = GUICtrlCreateRadio("4 - High", 59, 167, 380, 25)

$Rad_5_Priority = GUICtrlCreateRadio("5 - Realtime (Use with caution, may make the system unstable)", 59, 191, 390, 25)

$Btn_Set_Priority = GUICtrlCreateButton("Set Priority", 36, 247, 97, 25)

GUICtrlSetState(-1, $GUI_DEFBUTTON)

$Btn_Close_WoW = GUICtrlCreateButton("Close WoW", 140, 247, 97, 25)

$Btn_Check_Ping = GUICtrlCreateButton("Check Ping", 244, 247, 97, 25)

$Btn_Set_On_Top = GUICtrlCreateButton("Always on Top", 348, 247, 97, 25)

;;;;TABS TO COME:;;;;

;;;;MACRO EDIT TAB

;;$Tab_Macro_Edit = GUICtrlCreateTabItem("Macro Edit")

;;;;SETTINGS TAB

;$Tab_Settings = GUICtrlCreateTabItem("Settings")

;;;;LINKS TAB

;$Tab_Links = GUICtrlCreateTabItem("Links")

;$TreeView1 = GUICtrlCreateTreeView(24, 48, 465, 257)

;$TreeView1_0 = GUICtrlCreateTreeViewItem("Exploits, Hacks, Programs", $TreeView1)

;$TreeView1_1 = GUICtrlCreateTreeViewItem("www.mmowned.com", $TreeView1_0)

;$TreeView1_2 = GUICtrlCreateTreeViewItem("www.hsforum.net", $TreeView1_0)

;$TreeView1_3 = GUICtrlCreateTreeViewItem("www.elitepvpers.de", $TreeView1_0)

;$TreeView1_4 = GUICtrlCreateTreeViewItem("Databases", $TreeView1)

;$TreeView1_5 = GUICtrlCreateTreeViewItem("Official Sites", $TreeView1)

;$TreeView1_6 = GUICtrlCreateTreeViewItem("Private Servers", $TreeView1)

GUICtrlCreateTabItem("")

GUISetState(@SW_SHOW)

#endregion

;;;;;;;;;;;;;;;;ABOUT POPUP GUI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

#region About Popup GUI

$Ch_About = GUICreate("About", 399, 260, 302, 218)

$GroupBox1 = GUICtrlCreateGroup("", 10, 10, 375, 228)

$Image1 = GUICtrlCreatePic("C:\Documents and Settings\Candace\Desktop\Joels Crap\Other\leoj-avatar.jpg", 20, 30, 129, 119)

GUICtrlCreateLabel("Leoj's WoW Tool", 187, 30, 108, 20)

GUICtrlCreateLabel("Version 1.2", 187, 59, 70, 20)

GUICtrlCreateLabel("Copyright Leoj (2007)", 20, 168, 129, 20)

GUICtrlCreateLabel("www.Leoj.info", 20, 197, 84, 20)

GUICtrlCreateLabel("LeojCorp@yahoo.com", 240, 200, 140, 20)

GUICtrlCreateGroup("", -99, -99, 1, 1)

GUISetState(@SW_HIDE)

#endregion

;;;;;;;;;;;;;;;;MY CREATED FUNCTIONS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

#region _MyCreatedFunctions

Opt("SendKeyDelay", 100)

Opt("SendKeyDownDelay", 100)

$noLaunch = 0

$LoadedProfile = IniRead("settings2.ini", "last profile", "loaded profile", "")

Func readProfileNames()

$names = IniReadSectionNames("settings.ini")

For $p = 1 To (Ubound($names) - 1)

GUIctrlSetData($Li_Profiles, $names[$p])

Next

;GUICtrlSetData($Li_Profiles, "[default]")

EndFunc

Call("readProfileNames")

Func loadProfile()

If GUICtrlRead($Li_Profiles) = "" Then

MsgBox(0, "Error", "No profile selected.")

ElseIf GUICtrlRead($Li_Profiles) = "[default]" Then

Call("setBackToDefaultProfile")

Else

;;;Fullscreen or Minimized (radio)?

If IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Fullscreen", "null") = "checked" Then

GUICtrlSetState($Rad_Fullscreen, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Minimized", "null") = "checked" Then

GUICtrlSetState($Rad_Minimized, $GUI_CHECKED)

EndIf

;;;Silent Mode (checkbox)?

If IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Chck_Silent_Mode", "null") = "checked" Then

GUICtrlSetState($Chck_Silent_Mode, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Chck_Silent_Mode", "null") = "unchecked" Then

GUICtrlSetState($Chck_Silent_Mode, $GUI_UNCHECKED)

EndIf

;;;Directory (input)?

GUICtrlSetData($UI_Directory, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "UI_Directory", "C:\\Program Files\World of Warcraft\"))

;;;Realmlist (input)?

GUICtrlSetData($UI_Realmlist_Txt, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "UI_Realmlist_Txt", "realmlist.wtf"))

;;;Server (select)?

_GUICtrlListSelectString($Li_Servers, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Li_Servers", "eu.logon.worldofwarcraft.com"))

;;;Username (select)?

_GUICtrlListSelectString($Li_Accounts, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Li_Accounts", "*Username..."))

;;;Password (select)?

_GUICtrlListSelectString($Li_Passwords, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Li_Passwords", "*Password..."))

;;;Login - Enable/Disable (radio)?

If IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Enable_Account", "null") = "checked" Then

GUICtrlSetState($Rad_Enable_Account, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Disable_Account", "null") = "checked" Then

GUICtrlSetState($Rad_Disable_Account, $GUI_CHECKED)

EndIf

;;;Character (radio)?

If IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_1", "null") = "checked" Then

GUICtrlSetState($Rad_Char_1, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_2", "null") = "checked" Then

GUICtrlSetState($Rad_Char_2, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_3", "null") = "checked" Then

GUICtrlSetState($Rad_Char_3, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_4", "null") = "checked" Then

GUICtrlSetState($Rad_Char_4, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_5", "null") = "checked" Then

GUICtrlSetState($Rad_Char_5, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_6", "null") = "checked" Then

GUICtrlSetState($Rad_Char_6, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_7", "null") = "checked" Then

GUICtrlSetState($Rad_Char_7, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_8", "null") = "checked" Then

GUICtrlSetState($Rad_Char_8, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_9", "null") = "checked" Then

GUICtrlSetState($Rad_Char_9, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Char_10", "null") = "checked" Then

GUICtrlSetState($Rad_Char_10, $GUI_CHECKED)

EndIf

;;;Time Delay (radio)?

If IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_1_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_1_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_5_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_5_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_10_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_10_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_15_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_15_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_20_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_20_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_25_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_25_Sec, $GUI_CHECKED)

EndIf

;;;Char. - Enable/Disable (radio)?

If IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Enable_Character", "null") = "checked" Then

GUICtrlSetState($Rad_Enable_Character, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Disable_Character", "null") = "checked" Then

GUICtrlSetState($Rad_Disable_Character, $GUI_CHECKED)

EndIf

;;;Wait time b4 anti AFK (input)?

GUICtrlSetData($UI_Load_Wait, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "UI_Load_Wait", "120"))

;;;Wait from this time... (input)?

GUICtrlSetData($UI_Jump_Sleep, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "UI_Jump_Sleep", "60"))

;;;to this time (input)?

GUICtrlSetData($UI_Jump_Sleep2, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "UI_Jump_Sleep2", "60"))

;;;Number of times to jump (input)?

GUICtrlSetData($UI_Jump_Times, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "UI_Jump_Times", "180"))

;;;Anti AFK - Enable/Disable (radio)?

If IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Enable_AFK", "null") = "checked" Then

GUICtrlSetState($Rad_Enable_AFK, $GUI_CHECKED)

ElseIf IniRead("settings.ini", GUICtrlRead($Li_Profiles), "Rad_Disable_AFK", "null") = "checked" Then

GUICtrlSetState($Rad_Disable_AFK, $GUI_CHECKED)

EndIf

;;;Character Level (input)?

GUICtrlSetData($CLvlInput, IniRead("settings.ini", GUICtrlRead($Li_Profiles), "CLvlInput", "1"))

;;;End---

$LoadedProfile = GUICtrlRead($Li_Profiles)

GUICtrlSetData($Label_Profile, "Loaded Profile: " & GUICtrlRead($Li_Profiles))

EndIf

EndFunc

Func saveProfile()

If GUICtrlRead($UI_Add_Profile) = "" Then

MsgBox(0, "Error", "No profile name entered.")

Else

;;;Fullscreen or Minimized (radio)?

If GUICtrlRead($Rad_Fullscreen) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Fullscreen", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Fullscreen", "unchecked")

EndIf

If GUICtrlRead($Rad_Minimized) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Minimized", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Minimized", "unchecked")

EndIf

;;;Silent Mode (checkbox)?

If GUICtrlRead($Chck_Silent_Mode) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Chck_Silent_Mode", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Chck_Silent_Mode", "unchecked")

EndIf

;;;Directory (input)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "UI_Directory", GUICtrlRead($UI_Directory))

;;;Relmlist (input)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "UI_Realmlist_Txt", GUICtrlRead($UI_Realmlist_Txt))

;;;Server (select)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Li_Servers", GUICtrlRead($Li_Servers))

;;;Username (select)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Li_Accounts", GUICtrlRead($Li_Accounts))

;;;Password (select)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Li_Passwords", GUICtrlRead($Li_Passwords))

;;;Login - Enable/Disable (radio)?

If GUICtrlRead($Rad_Enable_Account) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Enable_Account", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Enable_Account", "unchecked")

EndIf

If GUICtrlRead($Rad_Disable_Account) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Disable_Account", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Disable_Account", "unchecked")

EndIf

;;;Character (radio)?

If GUICtrlRead($Rad_Char_1) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_1", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_1", "unchecked")

EndIf

If GUICtrlRead($Rad_Char_2) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_2", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_2", "unchecked")

EndIf

If GUICtrlRead($Rad_Char_3) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_3", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_3", "unchecked")

EndIf

If GUICtrlRead($Rad_Char_4) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_4", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_4", "unchecked")

EndIf

If GUICtrlRead($Rad_Char_5) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_5", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_5", "unchecked")

EndIf

If GUICtrlRead($Rad_Char_6) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_6", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_6", "unchecked")

EndIf

If GUICtrlRead($Rad_Char_7) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_7", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_7", "unchecked")

EndIf

If GUICtrlRead($Rad_Char_8) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_8", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_8", "unchecked")

EndIf

If GUICtrlRead($Rad_Char_9) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_9", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_9", "unchecked")

EndIf

If GUICtrlRead($Rad_Char_10) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_10", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Char_10", "unchecked")

EndIf

;;;Time Delay (radio)?

If GUICtrlRead($Rad_1_Sec) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_1_Sec", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_1_Sec", "unchecked")

EndIf

If GUICtrlRead($Rad_5_Sec) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_5_Sec", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_5_Sec", "unchecked")

EndIf

If GUICtrlRead($Rad_10_Sec) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_10_Sec", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_10_Sec", "unchecked")

EndIf

If GUICtrlRead($Rad_15_Sec) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_15_Sec", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_15_Sec", "unchecked")

EndIf

If GUICtrlRead($Rad_20_Sec) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_20_Sec", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_20_Sec", "unchecked")

EndIf

If GUICtrlRead($Rad_25_Sec) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_25_Sec", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_25_Sec", "unchecked")

EndIf

;;;Char. - Enable/Disable (radio)?

If GUICtrlRead($Rad_Enable_Character) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Enable_Character", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Enable_Character", "unchecked")

EndIf

If GUICtrlRead($Rad_Disable_Character) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Disable_Character", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Disable_Character", "unchecked")

EndIf

;;;Wait time b4 anti AFK (input)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "UI_Load_Wait", GUICtrlRead($UI_Load_Wait))

;;;Wait from this time... (input)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "UI_Jump_Sleep", GUICtrlRead($UI_Jump_Sleep))

;;;to this time (input)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "UI_Jump_Sleep2", GUICtrlRead($UI_Jump_Sleep2))

;;;Number of times to jump (input)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "UI_Jump_Times", GUICtrlRead($UI_Jump_Times))

;;;Anti AFK - Enable/Disable (radio)?

If GUICtrlRead($Rad_Enable_AFK) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Enable_AFK", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Enable_AFK", "unchecked")

EndIf

If GUICtrlRead($Rad_Disable_AFK) = 1 Then

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Disable_AFK", "checked")

Else

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "Rad_Disable_AFK", "unchecked")

EndIf

;;;Character Level (input)?

IniWrite("settings.ini", GUICtrlRead($UI_Add_Profile), "CLvlInput", GUICtrlRead($CLvlInput))

;;;End---

GUICtrlSetData($Label_Profile, "Loaded Profile: " & GUICtrlRead($UI_Add_Profile))

$LoadedProfile = GUICtrlRead($UI_Add_Profile)

GUICtrlSetData($UI_Add_Profile, "")

Call("readProfileNames")

_GUICtrlListSelectString($Li_Profiles, $LoadedProfile)

EndIf

EndFunc

Func deleteAllProfiles()

$file10 = FileOpen("settings.ini", 2)

If $file10 = -1 Then

MsgBox(0, "Error", "Cannot find settings.ini.")

Exit

EndIf

FileClose($file10)

IniWrite("settings2.ini", "last profile", "loaded profile", "")

$LoadedProfile = ""

Call("setBackToDefaultProfile")

GUICtrlSetData($Li_Profiles, "")

GUICtrlSetData($Li_Profiles, "[default]")

Call("readProfileNames")

Call("selectOnProfileList")

EndFunc

Func deleteSelectedProfile()

$Check1 = GUICtrlRead($Li_Profiles)

$Check2 = IniRead("settings2.ini", "last profile", "loaded profile", "")

If $Check1 = $Check2 Then ;;;If the currently selected profile (the one the user is trying to delete) as specified by the ini is = to the currently loaded profile... Then do...

IniWrite("settings2.ini", "last profile", "loaded profile", "") ;;;erase the loaded profile from the ini.

$LoadedProfile = "" ;;;Make the currently loaded profile = nothing because it is going to be deleted.

Call("setBackToDefaultProfile") ;;;reset all settings

ElseIf $LoadedProfile = $Check1 Then ;;;Or if the currently selected profile as specified by the variable $LoadedProfile is = to the currently loaded profile... Then do...

$LoadedProfile = "" ;;;Make the currently loaded profile = nothing because it is going to be deleted.

Call("setBackToDefaultProfile") ;;;reset all settings

EndIf

IniDelete("settings.ini", $Check1)

GUICtrlSetData($Li_Profiles, "") ;;;clear the profile list of all contents before refreshing.

GUICtrlSetData($Li_Profiles, "[default]")

Call("readProfileNames") ;;;refresh the profile list.

Call("selectOnProfileList")

EndFunc

Func selectOnProfileList()

If $LoadedProfile = "" Then

_GUICtrlListSelectString($Li_Profiles, "[default]")

Else

_GUICtrlListSelectString($Li_Profiles, $LoadedProfile)

EndIf

EndFunc

Func getLastProfile() ;;;===> to be run on startup

$LastProfile = IniRead("settings2.ini", "last profile", "loaded profile", "")

If $LastProfile = "" Then

Call("setBackToDefaultProfile")

Else ;;;===> do a mass update of these from load when load is done!

;;;Fullscreen or Minimized?

If IniRead("settings.ini", $LastProfile, "Rad_Fullscreen", "null") = "checked" Then

GUICtrlSetState($Rad_Fullscreen, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Minimized", "null") = "checked" Then

GUICtrlSetState($Rad_Minimized, $GUI_CHECKED)

EndIf

;;;Silent Mode Checkbox

If IniRead("settings.ini", $LastProfile, "Chck_Silent_Mode", "null") = "checked" Then

GUICtrlSetState($Chck_Silent_Mode, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Chck_Silent_Mode", "null") = "unchecked" Then

GUICtrlSetState($Chck_Silent_Mode, $GUI_UNCHECKED)

EndIf

;;;Select $LastProfile on list in profiles tab

_GUICtrlListSelectString($Li_Profiles, $LastProfile)

;;;Directory (input)?

GUICtrlSetData($UI_Directory, IniRead("settings.ini", $LastProfile, "UI_Directory", "C:\\Program Files\World of Warcraft\"))

;;;Realmlist (input)?

GUICtrlSetData($UI_Realmlist_Txt, IniRead("settings.ini", $LastProfile, "UI_Realmlist_Txt", "realmlist.wtf"))

;;;Server (select)?

_GUICtrlListSelectString($Li_Servers, IniRead("settings.ini", $LastProfile, "Li_Servers", "eu.logon.worldofwarcraft.com"))

;;;Username (select)?

_GUICtrlListSelectString($Li_Accounts, IniRead("settings.ini", $LastProfile, "Li_Accounts", "*Username..."))

;;;Password (select)?

_GUICtrlListSelectString($Li_Passwords, IniRead("settings.ini", $LastProfile, "Li_Passwords", "*Password..."))

;;;Login - Enable/Disable (radio)?

If IniRead("settings.ini", $LastProfile, "Rad_Enable_Account", "null") = "checked" Then

GUICtrlSetState($Rad_Enable_Account, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Disable_Account", "null") = "checked" Then

GUICtrlSetState($Rad_Disable_Account, $GUI_CHECKED)

EndIf

;;;Character (radio)?

If IniRead("settings.ini", $LastProfile, "Rad_Char_1", "null") = "checked" Then

GUICtrlSetState($Rad_Char_1, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Char_2", "null") = "checked" Then

GUICtrlSetState($Rad_Char_2, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Char_3", "null") = "checked" Then

GUICtrlSetState($Rad_Char_3, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Char_4", "null") = "checked" Then

GUICtrlSetState($Rad_Char_4, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Char_5", "null") = "checked" Then

GUICtrlSetState($Rad_Char_5, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Char_6", "null") = "checked" Then

GUICtrlSetState($Rad_Char_6, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Char_7", "null") = "checked" Then

GUICtrlSetState($Rad_Char_7, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Char_8", "null") = "checked" Then

GUICtrlSetState($Rad_Char_8, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Char_9", "null") = "checked" Then

GUICtrlSetState($Rad_Char_9, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Char_10", "null") = "checked" Then

GUICtrlSetState($Rad_Char_10, $GUI_CHECKED)

EndIf

;;;Time Delay (radio)?

If IniRead("settings.ini", $LastProfile, "Rad_1_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_1_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_5_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_5_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_10_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_10_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_15_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_15_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_20_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_20_Sec, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_25_Sec", "null") = "checked" Then

GUICtrlSetState($Rad_25_Sec, $GUI_CHECKED)

EndIf

;;;Char. - Enable/Disable (radio)?

If IniRead("settings.ini", $LastProfile, "Rad_Enable_Character", "null") = "checked" Then

GUICtrlSetState($Rad_Enable_Character, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Disable_Character", "null") = "checked" Then

GUICtrlSetState($Rad_Disable_Character, $GUI_CHECKED)

EndIf

;;;Wait time b4 anti AFK (input)?

GUICtrlSetData($UI_Load_Wait, IniRead("settings.ini", $LastProfile, "UI_Load_Wait", "120"))

;;;Wait from this time... (input)?

GUICtrlSetData($UI_Jump_Sleep, IniRead("settings.ini", $LastProfile, "UI_Jump_Sleep", "60"))

;;;to this time (input)?

GUICtrlSetData($UI_Jump_Sleep2, IniRead("settings.ini", $LastProfile, "UI_Jump_Sleep2", "60"))

;;;Number of times to jump (input)?

GUICtrlSetData($UI_Jump_Times, IniRead("settings.ini", $LastProfile, "UI_Jump_Times", "180"))

;;;Anti AFK - Enable/Disable (radio)?

If IniRead("settings.ini", $LastProfile, "Rad_Enable_AFK", "null") = "checked" Then

GUICtrlSetState($Rad_Enable_AFK, $GUI_CHECKED)

ElseIf IniRead("settings.ini", $LastProfile, "Rad_Disable_AFK", "null") = "checked" Then

GUICtrlSetState($Rad_Disable_AFK, $GUI_CHECKED)

EndIf

;;;Character Level (input)?

GUICtrlSetData($CLvlInput, IniRead("settings.ini", $LastProfile, "CLvlInput", "1"))

;;;;make sure [default] is in profile list

GUICtrlSetData($Li_Profiles, "[default]")

EndIf

EndFunc

Call("getLastProfile")

Func setLastProfile() ;;;===> to be run on shutdown

IniWrite("settings2.ini", "last profile", "loaded profile", $LoadedProfile)

EndFunc

Func setBackToDefaultProfile()

GUICtrlSetData($Li_Profiles, "[default]")

GUICtrlSetData($Label_Profile, "Loaded Profile: [default]")

_GUICtrlListSelectString($Li_Profiles, "[default]")

;;;Fullscreen or Minimized (radio)?

GUICtrlSetState($Rad_Minimized, $GUI_CHECKED)

;;;Silent Mode (checkbox)

GUICtrlSetState($Chck_Silent_Mode, $GUI_CHECKED)

;;;Directory (input)?

GUICtrlSetData($UI_Directory, "C:\\Program Files\World of Warcraft\")

;;;Realmlist (input)?

GUICtrlSetData($UI_Realmlist_Txt, "realmlist.wtf")

;;;Server (select)?

_GUICtrlListSelectString($Li_Servers, "us.logon.worldofwarcraft.com")

;;;Username (select)?

_GUICtrlListSelectString($Li_Accounts, "*Username...")

;;;Password (select)?

_GUICtrlListSelectString($Li_Passwords, "*Password...")

;;;Login - Enable/Disable (radio)?

GUICtrlSetState($Rad_Disable_Account, $GUI_CHECKED)

;;;Character (radio)?

GUICtrlSetState($Rad_Char_1, $GUI_CHECKED)

;;;Time Delay (radio)?

GUICtrlSetState($Rad_10_Sec, $GUI_CHECKED)

;;;Char. - Enable/Disable (radio)?

GUICtrlSetState($Rad_Disable_Character, $GUI_CHECKED)

;;;Wait time b4 anti AFK (input)?

GUICtrlSetData($UI_Load_Wait, "120")

;;;Wait from this time... (input)?

GUICtrlSetData($UI_Jump_Sleep, "60")

;;;to this time (input)?

GUICtrlSetData($UI_Jump_Sleep2, "60")

;;;Number of times to jump (input)?

GUICtrlSetData($UI_Jump_Times, "180")

;;;Anti AFK - Enable/Disable (radio)?

GUICtrlSetState($Rad_Disable_AFK, $GUI_CHECKED)

;;;Character Level (input)?

GUICtrlSetData($CLvlInput, "1")

EndFunc

Func theExit()

Call("setLastProfile")

Exit

EndFunc

Func showAboutGUI()

GUISetState(@SW_SHOW, $Ch_About)

EndFunc

Func closeGUIWindow()

If WinActive("About") Then

GUISetState(@SW_HIDE, $Ch_About)

ElseIf WinActive("Leoj's WoW Tool") Then

Call("setLastProfile")

Exit

Else

Exit

EndIf

EndFunc

Func checkBeforeLaunch()

If GUICtrlRead($Li_Accounts) = "*Username..." Then

MsgBox(0, "Error", "You have not selected a username.")

$noLaunch = 1

ElseIf GUICtrlRead($Li_Passwords) = "*Password..." Then

MsgBox(0, "Error", "You have not selected a password.")

$noLaunch = 1

EndIf

EndFunc

Func launchGame()

TrayTip("Leoj's WoW Tool", "Launching World of Warcraft...", 5, 0)

$Does_Dir_Exist = DirGetSize(GUICtrlRead($UI_Directory), 2)

If $Does_Dir_Exist <= -1 Then

MsgBox(0, "Error", "Directory may not exist.")

ElseIf WinExists("World of Warcraft") = 0 Then

Run(GUICtrlRead($UI_Directory) & "WoW.exe", "", @SW_SHOWDEFAULT)

Else

TrayTip("Leoj's WoW Tool", "World of Warcraft detected...", 5, 0)

Sleep(1000)

EndIf

EndFunc

$n = WinGetTitle("")

$tray = 0

$tray2 = 0

$stop = 0

$stop2 = 0

$hide = 0

Func hideAfterLaunch()

WinWait("World of Warcraft")

If GUICtrlRead($Chck_Silent_Mode) = 1 Then

WinSetState("World of Warcraft","",@SW_MINIMIZE)

If GUICtrlRead($Rad_Fullscreen) == 1 Then

WinSetState("World of Warcraft","",@SW_SHOW) ;;;changed from showdefault

EndIf

WinSetState("World of Warcraft","",@SW_HIDE)

TrayTip("Leoj's WoW Tool", "WoW has been hidden. Please wait...", 5, 0)

Sleep(2000)

EndIf

If GUICtrlRead($Chck_Silent_Mode) = 1 Then

$hide = 1

Else

$hide = 0

EndIf

EndFunc

Func checkBeforeLogin()

If WinExists("World of Warcraft") Then

HotKeySet("{F11}")

HotKeySet("{F11}", "stopScript")

$tray2 = 0 ;will tell us that script has stopped only if it was already running

$stop2 = 0

$wait3 = 0

$once = 0

$state = WinGetState("World of Warcraft", "")

If NOT WinExists("World of Warcraft") Then

Do

Sleep(1000)

$wait3 = $wait3 + 1

Until $stop2 = 1 OR $wait3 = 10

EndIf

$m = 0

$checked = 0

TrayTip("Leoj's WoW Tool", "Checking if WoW is ready to receive info..." & @CRLF & "Press [F11] to cancel the check.", 20, 0)

Do

$tray2 = 1

If $stop2 = 1 Then Return ''

$wait3 = 0

If $once > 0 Then

Do

Sleep(1000)

$wait3 = $wait3 + 1

Until $stop2 = 1 OR $wait3 = 15

EndIf

ClipPut(" ")

$n = WinGetTitle("")

If $stop2 = 1 Then Return ''

sleep(300)

If $stop2 = 1 Then Return ''

ControlSend("World of Warcraft", "", "", "{CTRLDOWN}{a}{CTRLUP}")

$n = WinGetTitle("")

If $stop2 = 1 Then Return ''

sleep(300)

If $stop2 = 1 Then Return ''

ControlSend("World of Warcraft", "", "", "1010")

$n = WinGetTitle("")

If $stop2 = 1 Then Return ''

sleep(300)

If $stop2 = 1 Then Return ''

ControlSend("World of Warcraft", "", "", "{CTRLDOWN}{a}{CTRLUP}")

$n = WinGetTitle("")

If $stop2 = 1 Then Return ''

sleep(200)

If $stop2 = 1 Then Return ''

If $hide = 1 Then

WinSetState("World of Warcraft","",@SW_HIDE)

EndIf

$n = WinGetTitle("")

If NOT WinActive("World of Warcraft") Then WinActivate("World of Warcraft")

If $stop2 = 1 Then Return ''

If GUICtrlRead($Rad_Fullscreen) == 1 Then

WinSetState("World of Warcraft","",@SW_MINIMIZE)

EndIf

If $stop2 = 1 Then Return ''

If $hide = 1 Then

WinSetState("World of Warcraft","",@SW_HIDE)

EndIf

If $stop2 = 1 Then Return ''

If GUICtrlRead($Rad_Fullscreen) == 1 Then

TrayTip("Leoj's WoW Tool", "Please wait 5 seconds - Opening WoW." & @CRLF & "Do not use your mouse or keyboard during this time.", 6)

sleep(4000) ;;;user may click some other window during this time!! -- Wait only needed when in fullscreen mode.

EndIf

If $stop2 = 1 Then Return ''

ControlSend("World of Warcraft", "", "", "{CTRLDOWN}{c}{CTRLUP}")

sleep(200)

If GUICtrlRead($Chck_Silent_Mode) = 1 Then

WinActivate($n)

EndIf

If $stop2 = 1 Then Return ''

sleep(200)

If $stop2 = 1 Then Return ''

$n = WinGetTitle("")

If $stop2 = 1 Then Return ''

sleep(200)

If $stop2 = 1 Then Return ''

If ClipGet() == 1010 Then

TrayTip("this clears any tray tip","",0)

Call("accountNow")

$m = 1

EndIf

$once = $once + 1

$checked = $checked + 1

If $checked >= 3 Then

TrayTip("Leoj's WoW Tool", "Checked " & $checked & " times. There must be an error." & @CRLF & "Please wait while WoW is debugged." & @CRLF & "Press [F11] to cancel.", 25, 0)

If $stop2 = 1 Then Return ''

If WinExists("World of Warcraft") Then

$once = 0

$hide = 0

WinSetState("World of Warcraft","",@SW_SHOW)

If $stop2 = 1 Then Return ''

WinActivate("World of Warcraft")

If $stop2 = 1 Then Return ''

Else

$stop2 = 1

EndIf

Else

TrayTip("Leoj's WoW Tool", "WoW is not ready to receive account info yet." & @CRLF & "Checked " & $checked & " times." & @CRLF & "Press [F11] to cancel the check.", 25, 0)

EndIf

Until $m = 1

Else

MsgBox(0, "Error", "Please start WoW and enter the login screen. Then rerun the logon script.")

EndIf

TrayTip("this clears any tray tip","",0)

$once = 0

$hide = 0

EndFunc

Func accountNow()

If GUICtrlRead($Li_Accounts) = "*Username..." Then

MsgBox(0, "Error", "You have not selected a username.")

ElseIf GUICtrlRead($Li_Passwords) = "*Password..." Then

MsgBox(0, "Error", "You have not selected a password.")

Else

$tray = 0

If WinExists("World of Warcraft") Then

TrayTip("Leoj's WoW Tool", "Now running the login script.", 5, 0)

ControlSend("World of Warcraft", "", "", "{CTRLDOWN}{a}{CTRLUP}{DEL}")

Sleep(300)

ControlSend("World of Warcraft", "", "", GUICtrlRead($Li_Accounts))

Sleep(300)

ControlSend("World of Warcraft", "", "", "{TAB}")

Sleep(300)

ControlSend("World of Warcraft", "", "", GUICtrlRead($Li_Passwords))

Sleep(1000)

ControlSend("World of Warcraft", "", "", "{ENTER}")

Else

MsgBox(0, "Error", "Please start WoW and enter the login screen. Then rerun the logon script.")

EndIf

If WinExists("World of Warcraft") == 1 Then

TrayTip("Leoj's WoW Tool", "Login complete.", 5, 0)

EndIf

EndIf

EndFunc

Func characterSelectNow()

If GUICtrlRead($Rad_Char_1) = 1 Then

$Rad_Char_Pick = 0

ElseIf GUICtrlRead($Rad_Char_2) = 1 Then

$Rad_Char_Pick = 1

ElseIf GUICtrlRead($Rad_Char_3) = 1 Then

$Rad_Char_Pick = 2

ElseIf GUICtrlRead($Rad_Char_4) = 1 Then

$Rad_Char_Pick = 3

ElseIf GUICtrlRead($Rad_Char_5) = 1 Then

$Rad_Char_Pick = 4

ElseIf GUICtrlRead($Rad_Char_6) = 1 Then

$Rad_Char_Pick = 5

ElseIf GUICtrlRead($Rad_Char_7) = 1 Then

$Rad_Char_Pick = 6

ElseIf GUICtrlRead($Rad_Char_8) = 1 Then

$Rad_Char_Pick = 7

ElseIf GUICtrlRead($Rad_Char_9) = 1 Then

$Rad_Char_Pick = 8

ElseIf GUICtrlRead($Rad_Char_10) = 1 Then

$Rad_Char_Pick = 9

Else

$Rad_Char_Pick = 1

EndIf

If GUICtrlRead($Rad_1_Sec) = 1 Then

$Rad_Sec_Pick = 1000

ElseIf GUICtrlRead($Rad_5_Sec) = 1 Then

$Rad_Sec_Pick = 5000

ElseIf GUICtrlRead($Rad_10_Sec) = 1 Then

$Rad_Sec_Pick = 10000

ElseIf GUICtrlRead($Rad_15_Sec) = 1 Then

$Rad_Sec_Pick = 15000

ElseIf GUICtrlRead($Rad_20_Sec) = 1 Then

$Rad_Sec_Pick = 20000

ElseIf GUICtrlRead($Rad_25_Sec) = 1 Then

$Rad_Sec_Pick = 25000

Else

$Rad_Sec_Pick = 10000

EndIf

If WinExists("World of Warcraft") Then

TrayTip("Leoj's WoW Tool", "Now running the character selection script.", 5, 0)

Sleep($Rad_Sec_Pick)

TrayTip("Leoj's WoW Tool", "Now selecting the character.", 5, 0)

$sendRepeat = 0

Do

ControlSend("World of Warcraft", "", "", "{DOWN}")

Sleep(1000)

$sendRepeat = $sendRepeat + 1

Until $sendRepeat >= $Rad_Char_Pick

Sleep(1000)

ControlSend("World of Warcraft", "", "", "{ENTER}")

Else

MsgBox(0, "Error", "Please start WoW and enter the character selection screen. Then rerun the character selection script.")

EndIf

If WinExists("World of Warcraft") == 1 Then

TrayTip("Leoj's WoW Tool", "Character selection complete.", 5, 0)

EndIf

EndFunc

Func stopScript()

$stop2 = 1

If $tray2 = 1 Then

TrayTip("Leoj's WoW Tool", "The script has been stopped.", 5, 0)

$tray2 = 0

EndIf

EndFunc

Func antiAFKnow()

HotKeySet("{F11}")

HotKeySet("{F11}", "stopJump")

$tray = 0 ;will tell us that script has stopped only if it was already running

$stop = 0

If GUICtrlRead($UI_Jump_Sleep) < 1 Then

GUICtrlSetData($UI_Jump_Sleep, 1)

EndIf

If GUICtrlRead($UI_Jump_Sleep2) < 1 Then

GUICtrlSetData($UI_Jump_Sleep2, 1)

EndIf

If GUICtrlRead($UI_Jump_Times) < 1 Then

GUICtrlSetData($UI_Jump_Times, 1)

EndIf

If GUICtrlRead($UI_Load_Wait) < 1 Then

GUICtrlSetData($UI_Load_Wait, 1)

EndIf

If GUICtrlRead($UI_Jump_Sleep) == GUICtrlRead($UI_Jump_Sleep2) Then

$r = GUICtrlRead($UI_Jump_Sleep2)

GUICtrlSetData($UI_Jump_Sleep2, $r+1)

EndIf

While 1

If $stop = 1 Then Return ''

If WinExists("World of Warcraft") == 1 Then

$tray = 1

TrayTip("Leoj's WoW Tool", "Now running the Anti AFK script." & @CRLF & "Press [F11] to cancel.", 5, 0)

$wait2 = 0

Do

Sleep(1000)

$wait2 = $wait2 + 1

Until $stop = 1 OR $wait2 = GUICtrlRead($UI_Load_Wait)

$delay = 1

$p = 0

While $p <= GUICtrlRead($UI_Jump_Times)

If $stop = 1 Then Return ''

$wait = 0

TrayTip("Leoj's WoW Tool", Int($delay) & " seconds until next jump." & @CRLF & "Anti AFK has jumped " & $p & " times." & @CRLF & "Press [F11] to stop jumping.", 20, 0)

If $stop = 1 Then Return ''

Do

Sleep(1000)

$wait = $wait + 1

Until $stop = 1 OR $wait = Int($delay)

If $stop = 1 Then Return ''

;ToolTip(Int($delay) & " seconds until next jump." & @CRLF & "Anti AFK has jumped " & $p + 1 & " times." & @CRLF & "Press [F11] to stop jumping.")

ControlSend("World of Warcraft", "", "", "{SPACE}")

If $stop = 1 Then Return ''

$p = $p + 1

$delay = Random(GUICtrlRead($UI_Jump_Sleep),GUICtrlRead($UI_Jump_Sleep2))

If $stop = 1 Then Return ''

WEnd

TrayTip("Leoj's WoW Tool", "Anti AFK has completed.", 5, 0)

Else

$tray = 0

MsgBox(0, "Error", "Please log on to your desired character and then rerun Anti AFK.")

Return ''

EndIf

WEnd

EndFunc

Func stopJump()

$stop = 1

If $tray = 1 Then

TrayTip("Leoj's WoW Tool", "Anti AFK has been stopped.", 5, 0)

$tray = 0

EndIf

EndFunc

HotKeySet("{F9}", "hideWoW")

HotKeySet("{F10}", "hideLWT")

Func hideWoW()

$hide = 0

$win = WinGetTitle('World of Warcraft')

$state = WinGetState("World of Warcraft", "")

If BitAnd($state, 2) Then

WinSetState($win,'',@SW_HIDE)

TrayTip("Leoj's WoW Tool", "WoW has been hidden." & @CRLF & "Press [F9] to show it.", 5, 0)

Else

WinSetState($win,'',@SW_SHOW)

If WinExists("World of Warcraft") == 1 Then

TrayTip("Leoj's WoW Tool", "WoW is no longer hidden." & @CRLF & "Press [F9] to hide it.", 5, 0)

Else

TrayTip("Leoj's WoW Tool", "Cannot hide WoW because it is not running.", 5, 0)

EndIf

EndIf

EndFunc

Func hideLWT()

$win2 = WinGetTitle("Leoj's WoW Tool")

$state2 = WinGetState("Leoj's WoW Tool", "")

If BitAnd($state2, 2) Then

WinSetState($win2,'',@SW_HIDE)

TrayTip("Leoj's WoW Tool", "LWT has been hidden." & @CRLF & "Press [F10] to show it.", 5, 0)

Else

WinSetState($win2,'',@SW_SHOW)

If WinExists("Leoj's WoW Tool") == 1 Then

TrayTip("Leoj's WoW Tool", "LWT is no longer hidden." & @CRLF & "Press [F10] to hide it.", 5, 0)

EndIf

EndIf

EndFunc

Func setProcessPriority()

If GUICtrlRead($Rad_0_Priority) == 1 Then

$priority = 0

ElseIf GUICtrlRead($Rad_1_Priority) == 1 Then

$priority = 1

ElseIf GUICtrlRead($Rad_2_Priority) == 1 Then

$priority = 2

ElseIf GUICtrlRead($Rad_3_Priority) == 1 Then

$priority = 3

ElseIf GUICtrlRead($Rad_4_Priority) == 1 Then

$priority = 4

ElseIf GUICtrlRead($Rad_5_Priority) == 1 Then

$priority = 5

Else

$priority = 2

EndIf

If WinExists("World of Warcraft") == 1 Then

$processId = WinGetProcess("World of Warcraft")

ProcessSetPriority($processId, $priority)

TrayTip("Leoj's WoW Tool", "Window Title: World of Warcraft" & @CRLF & "Process ID: " & $processId & @CRLF & "Priority: " & $priority, 10)

Else

MsgBox(0,"Error","World of Warcraft is not running.")

EndIf

EndFunc

Func closeWoW()

If WinExists("World of Warcraft") == 1 Then

WinKill("World of Warcraft", "")

TrayTip("Leoj's WoW Tool", "World of Warcraft has been closed.", 10)

Else

MsgBox(0,"Error","World of Warcraft window not found.")

EndIf

EndFunc

Func checkPing()

$ping = Ping("www.google.com",250)

If $ping Then

Msgbox(0,"Success","Your current ping is " & $ping & ".")

Else

Msgbox(0,"Error","Please check your internet connection.")

EndIf

EndFunc

Func updateRealmlist()

$Does_Dir_Exist = DirGetSize(GUICtrlRead($UI_Directory), 2)

$Var2 = GUICtrlRead($Li_Servers)

If $Var2 = "" Then

MsgBox(0, "Error", "No server selected.")

ElseIf $Does_Dir_Exist <= -1 Then

MsgBox(0, "Error", "Directory may be invalid.")

Else

$file4 = FileOpen(GUICtrlRead($UI_Directory) & GUICtrlRead($UI_Realmlist_Txt), 2)

FileWriteLine($file4, "set realmlist " & GUICtrlRead($Li_Servers))

FileClose($file4)

$file5 = FileOpen(GUICtrlRead($UI_Directory) & GUICtrlRead($UI_Realmlist_Txt), 0)

While 1

$realm2 = FileRead($file5, 9999)

If @error = -1 Then ExitLoop

MsgBox(0, "Success", "Changed to: " & $realm2)

Wend

EndIf

EndFunc

Func currentRealmlist()

$file3 = FileOpen(GUICtrlRead($UI_Directory) & GUICtrlRead($UI_Realmlist_Txt), 0)

While 1

$realm1 = FileRead($file3, 9999)

If @error = -1 Then ExitLoop

If $realm1 = "" Then

MsgBox(0, "Error", "Directory may be invalid.")

ExitLoop

EndIf

MsgBox(0, "Realmlist Contents", $realm1)

Wend

FileClose($file3)

EndFunc

Func deleteAddedRealms()

GUICtrlSetData($Li_Servers, "")

GUICtrlSetData($Li_Servers, "eu.logon.worldofwarcraft.com")

GUICtrlSetData($Li_Servers, "us.logon.worldofwarcraft.com")

FileOpen(GUICtrlRead($UI_Realms_Txt), 2)

FileClose(GUICtrlRead($UI_Realms_Txt))

EndFunc

Func addServer()

$file2 = FileOpen(GUICtrlRead($UI_Realms_Txt), 1)

FileWriteLine($file2, GUICtrlRead($UI_Add_Server))

FileClose($file2)

$Var1 = GUICtrlRead($UI_Add_Server)

If $Var1 = "" Then

Else

GUICtrlSetData($Li_Servers, GUICtrlRead($UI_Add_Server))

EndIf

EndFunc

Func validateDirectory()

$Does_Dir_Exist = DirGetSize(GUICtrlRead($UI_Directory), 2)

If $Does_Dir_Exist <= -1 Then

MsgBox(0, "Error", "The specified directory is invalid.")

ElseIf $Does_Dir_Exist > -1 Then

Msgbox(0,"Success","The specified directory is valid.")

EndIf

If GUICtrlRead($UI_Realmlist_Txt) <> "realmlist.wtf" Then

MsgBox(0, "Warning", "A new file will be created if it doesn't already exist." & @CRLF & @CRLF & "[" & GUICtrlRead($UI_Directory) & GUICtrlRead($UI_Realmlist_Txt) & "]")

Endif

EndFunc

Func setDefaults()

GUICtrlSetData($UI_Directory, "C:\\Program Files\World of Warcraft\")

GUICtrlSetData($UI_Realmlist_Txt, "realmlist.wtf")

EndFunc

Func accountAdd()

If GUICtrlRead($UI_Account_Name) & GUICtrlRead($UI_Password) = "" Then

MsgBox(0, "Error", "Please fill in atleast one field.")

ElseIf GUICtrlRead($UI_Account_Name) = "" Then

MsgBox(0, "Error", "Please enter an account name.")

EndIf

If GUICtrlRead($UI_Account_Name) <> "" Then

$confirmbox = MsgBox(4, "Are you sure?", "Account Name: " & GUICtrlRead($UI_Account_Name))

If $confirmbox = 6 Then

$file6 = FileOpen(GUICtrlRead($UI_Accounts_Txt), 1)

FileWriteLine($file6, GUICtrlRead($UI_Account_Name))

FileClose($file6)

$Var6 = GUICtrlRead($UI_Account_Name)

If $Var6 = "" Then

Else

GUICtrlSetData($Li_Accounts, GUICtrlRead($UI_Account_Name))

EndIf

EndIf

EndIf

EndFunc

Func passwordAdd()

If GUICtrlRead($UI_Account_Name) & GUICtrlRead($UI_Password) = "" Then

MsgBox(0, "Error", "Please fill in atleast one field.")

ElseIf GUICtrlRead($UI_Password) = "" Then

MsgBox(0, "Error", "Please enter a password.")

EndIf

If GUICtrlRead($UI_Password) <> "" Then

$confirmbox = MsgBox(4, "Are you sure?", "Password: " & GUICtrlRead($UI_Password))

If $confirmbox = 6 Then

$file7 = FileOpen(GUICtrlRead($UI_Passwords_Txt), 1)

FileWriteLine($file7, GUICtrlRead($UI_Password))

FileClose($file7)

$Var7 = GUICtrlRead($UI_Password)

If $Var7 = "" Then

Else

GUICtrlSetData($Li_Passwords, GUICtrlRead($UI_Password))

EndIf

EndIf

EndIf

EndFunc

Func deleteLogin()

GUICtrlSetData($Li_Accounts, "")

GUICtrlSetData($Li_Accounts, "*Username...")

FileOpen(GUICtrlRead($UI_Accounts_Txt), 2)

FileClose(GUICtrlRead($UI_Accounts_Txt))

GUICtrlSetData($Li_Passwords, "")

GUICtrlSetData($Li_Passwords, "*Password...")

FileOpen(GUICtrlRead($UI_Passwords_Txt), 2)

FileClose(GUICtrlRead($UI_Passwords_Txt))

EndFunc

$ontop = 0

Func setOnTop()

If $ontop == 0 Then

WinSetOnTop("Leoj's WoW Tool", "", 1)

$ontop = 1

TrayTip("Leoj's WoW Tool", "LWT has been set to always on top.", 10)

ElseIf $ontop == 1 Then

WinSetOnTop("Leoj's WoW Tool", "", 0)

$ontop = 0

TrayTip("Leoj's WoW Tool", "LWT is no longer set to always on top.", 10)

EndIf

EndFunc

#endregion

;;;;;;;;;;;;;;;BORROWED SCRIPTS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

#region _BorrowedScripts

Func _GUIExtraction()

;$DesLvl = GUICtrlRead($DLvlInput)

$CharLvl = GUICtrlRead($CLvlInput)

$Exp2Lvl = Round ( ( (8 * $CharLvl) + _Diff() ) * _MXP() , -2);XP = ((8

Edited by Leoj
Link to comment
Share on other sites

I would go for this approach:

$file1 = FileRead("myservers.txt")
$server = StringSplit(StringStripCR($file1),@LF)

$file8 = FileRead("myaccounts.txt")
$account = StringSplit(StringStripCR($file8),@LF)

$file9 = FileRead("mypasswords.txt")
$account = StringSplit(StringStripCR($file9),@LF)oÝ÷ Ú)ìµæ¡ûaÆ®¶­sbb33c¶fÆSÒfÆT÷VâgV÷C¶×6W'fW'2çGBgV÷C²Â¤FÒb33c·6W'fW%³#Фf÷"b33c·ÒFò#¢b33c·6W'fW%²b33c·ÒÒfÆU&VDÆæRb33c¶fÆSÂb33c·¢bb33c·6W'fW%²b33c·ÒÓÒgV÷C²gV÷C²FVà¢b33c·6W'fW%²b33c·ÒÒgV÷C·W2æÆövöâçv÷&ÆFögv&7&gBæ6öÒgV÷C°¢VæD`¤æW@¤fÆT6Æ÷6Rb33c¶fÆS£³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³°¢b33c¶fÆSÒfÆT÷VâgV÷C¶×66÷VçG2çGBgV÷C²Â¤FÒb33c¶66÷VçE³Ð¤f÷"b33c¶BÒFò¢b33c¶66÷VçE²b33c¶EÒÒfÆU&VDÆæRb33c¶fÆSÂb33c¶B¢bb33c¶66÷VçE²b33c¶EÒÓÒgV÷C²gV÷C²FVà¢b33c¶66÷VçE²b33c¶EÒÒgV÷C²¥W6W&æÖRâââgV÷C°¢VæD`¤æW@¤fÆT6Æ÷6Rb33c¶fÆS£³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³³°¢b33c¶fÆSÒfÆT÷VâgV÷C¶×77v÷&G2çGBgV÷C²Â¤FÒb33c·77v÷&E³Ð¤f÷"b33c¶ÒFò¢b33c·77v÷&E²b33c¶ÒÒfÆU&VDÆæRb33c¶fÆSÂb33c¶¢bb33c·77v÷&E²b33c¶ÒÓÒgV÷C²gV÷C²FVà¢b33c·77v÷&E²b33c¶ÒÒgV÷C²¥77v÷&BâââgV÷C°¢VæD`¤æW@¤fÆT6Æ÷6Rb33c¶fÆS

This requires some tweaking of the rest of the code, but it will be infinitely faster afterwards!

Link to comment
Share on other sites

I could change the .txt's to .ini files. When I first started making the program I did not understand .ini files but now I do. Would doing so make the program any faster? Before I start looking into string split or w/e.

Thanks a lot for the response MANADAR!

Link to comment
Share on other sites

Wow! took like 3 minutes to implement the stringsplit and a _FileCountLines() to get a Much MUch MUCh MUCH faster program. Thanks a lot manadar and whoever made the count line UDF =P

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...