Valuater Posted October 9, 2005 Posted October 9, 2005 first you call the reader() then you call the writer() inside writer() you call reader() then you call Reader(),,,, again i already suggested 1 save button ( i wrote the gui for you ) 2 the while/wend loop ( i wrote for you ) 3 you call the writer Func Writer() If Not FileExists($Ini) Then IniWrite($Ini, "Configuration", "UserName", $Username) before the gui and $UserName has not been given any value yet i am lost... evry time you change you add more problems please note****i am not trying to pick on you 8)
Shyke Posted October 9, 2005 Author Posted October 9, 2005 You want to know how I feel? Completely lost... I have no idea how to do this right and it is really starting to bug me alot...
Valuater Posted October 9, 2005 Posted October 9, 2005 ok... you dont want a "save info" button on your GUI ??? 8)
Shyke Posted October 9, 2005 Author Posted October 9, 2005 No, I would like the Login button to do it automatically.
Valuater Posted October 9, 2005 Posted October 9, 2005 expandcollapse popup#include <GuiConstants.au3> ; Order = left|up|width|height $Path = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\World of Warcraft\", "InstallPath") $WoW = $Path & "WoW.exe" $Ini = $Path & "login.ini" ; set ini defaults $Title = "World of Warcraft" ;$Wow = has been set above $Char = "1" $Delay = "13000" $Delay2 = "6000" $User = "Your Name" $Pass = "123456" $WoW_Win = GUICreate("WoW Auto Login", 240, 125, (@DesktopWidth - 240) / 2, (@DesktopHeight - 125) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $LoginL = GUICtrlCreateGroup("Login", 10, 10, 220, 105) $UsernameL = GUICtrlCreateLabel("Username:", 20, 25, 50, 20) $Username = GUICtrlCreateInput($User, 80, 25, 140, 20) $PasswordL = GUICtrlCreateLabel("Password:", 20, 45, 50, 20) $Password = GUICtrlCreateInput( $Pass, 80, 45, 140, 20, $ES_PASSWORD) $CharacterL = GUICtrlCreateLabel("Character Number (1-10):", 20, 65, 120, 20) $Character = GUICtrlCreateInput( $Char, 150, 65, 70, 20) $Login = GUICtrlCreateButton("Login", 100, 87, 60, 20) DirRemove($Path & "WDB", 1) Reader() Set_info() GUISetState() While 1 $msg = GUIGetMsg() If $msg = $Login Then GUISetState( @SW_HIDE , $WoW_Win) Get_info() Run_Login() EndIf If $msg = $GUI_EVENT_CLOSE Then Exit WEnd Func Run_Login() If $Char > 10 Or $Char < 0 Then MsgBox(48, "WoW Auto Login", "Error!" & @CRLF & "You have typed a character number that is out of bounds." & @CRLF & "Click OK to continue.") GUISetState( @SW_SHOW , $WoW_Win) Return EndIf If Not FileExists($WoW) Then MsgBox(48, "WoW Auto Login", "Error!" & @CRLF & "The World of WarCraft exe File could not be found." & @CRLF & "Click OK to continue.") Exit EndIf If WinExists($Title) Then ProcessClose("WoW.exe") Sleep(5000) Run($WoW) Else Run($WoW) EndIf Sleep($Delay) Send($Username) Send("{TAB}") Send($Password) Send("{ENTER}") Sleep($Delay2) $DW = @DesktopWidth $DH = @DesktopHeight If $DW = 800 And $DH = 600 Then MouseClick("left", 701, 84, 1, 10) ElseIf $DW = 1024 And $DH = 768 Then MouseClick("left", 835, 110, 1, 10) Else MsgBox(48, "WoW Auto Login", "Error!" & @CRLF & "Your desktop resolution isn't supported, please change your desktop resolution to either 800 x 600 or 1024 x 768." & @CRLF & "Click OK to continue.") RunWait( @SystemDir & "\rundll32.exe shell32.dll,Control_RunDLL desk.cpl") GUISetState( @SW_SHOW , $WoW_Win) Return EndIf Send("{DOWN " & $Char & "}") Sleep(1000) Send("{ENTER}") Exit EndFunc ;--------------------------------------------- Functions---------------------------------------------- Func Reader() If FileExists($Ini) Then $Title = IniRead($Ini, "Configuration", "Title", "NotFound") $WoW = IniRead($Ini, "Configuration", "WoW", "NotFound") $Char = IniRead($Ini, "Configuration", "Character", "NotFound") $Delay = IniRead($Ini, "Configuration", "Delay", "NotFound") $Delay2 = IniRead($Ini, "Configuration", "Delay2", "NotFound") $User = IniRead($Ini, "Configuration", "UserName", "NotFound") $Pass = IniRead($Ini, "Configuration", "Password", "NotFound") Set_info() Else Writer() EndIf EndFunc;==>Reader Func Writer() IniWrite($Ini, "Configuration", "Title", $Title) IniWrite($Ini, "Configuration", "WoW", $WoW) IniWrite($Ini, "Configuration", "Character", $Char) IniWrite($Ini, "Configuration", "Delay", $Delay) IniWrite($Ini, "Configuration", "Delay2", $Delay2) IniWrite($Ini, "Configuration", "UserName", $User) IniWrite($Ini, "Configuration", "Password", $Pass) EndFunc;==>Writer Func Set_info() GUICtrlSetData($Username, $User) GUICtrlSetData($Password, $Pass) GUICtrlSetData($Character, $Char) ; there are no controls to set these to $Title = $Title $WoW = $Wow $Delay = $Delay $Delay2 = $Delay2 EndFunc Func Get_info() $User = GUICtrlRead($Username) $Pass = GUICtrlRead($Password) $Char = GUICtrlRead($Character) ; there are no controls to get these from $Title = $Title $WoW = $Wow $Delay = $Delay $Delay2 = $Delay2 Writer() EndFunc 8)
Shyke Posted October 9, 2005 Author Posted October 9, 2005 That is much cleaner and works a bit better but it still enters 5, 7 into WoW.
Valuater Posted October 9, 2005 Posted October 9, 2005 you can delete your original ini or you can fill in the gui and run it... it will save the new info no changes to the script are needed 8)
Valuater Posted October 9, 2005 Posted October 9, 2005 (edited) Sorry... you were right,,..... but i left the actual " getting into the game" up to your programming change thjis Sleep($Delay) Send($User);***** here Send("{TAB}") Send($Pass); **** here Send("{ENTER}") Sleep($Delay2 8) EDIT You know I dont have this game right? Edited October 9, 2005 by Valuater
Shyke Posted October 9, 2005 Author Posted October 9, 2005 (edited) I did... It still types a 5 for a username and a 7 for a password.... EDIT: I fixed it, you used "$Username" when you were supposed to use "user"... Alright, everything works! I am adding you to credits list... somehow as usual.... Edited October 9, 2005 by Shyke
Valuater Posted October 9, 2005 Posted October 9, 2005 listen... about that menu i wrote... you just didn't like the pics or the idea? 8) i have never played that game and didn't mean to make a strange menu with wierd pics in it
Valuater Posted October 10, 2005 Posted October 10, 2005 (edited) no ... i sent you a menu and you said it was cool but strange ( i think because of the pics) anyway... i thought the idea was a package ( about 7 programs +\-) and they could be launched by the menu 8) Edited October 10, 2005 by Valuater
Shyke Posted October 10, 2005 Author Posted October 10, 2005 Oh, yeah! I loved that but i would have had to edit the texts and such and allow that menu to download new software.
Valuater Posted October 10, 2005 Posted October 10, 2005 (edited) the idea was to file install all of the programs into the menu... it would just launch them when the pic is clicked on that way we can try to protect each program because it is in a shell new versions would be found by the updated menu... not each program individually 8) Edited October 10, 2005 by Valuater
Shyke Posted November 4, 2005 Author Posted November 4, 2005 (edited) is this a bot for world of warcraft?No...EDIT: Don't grave dig. Edited November 4, 2005 by Shyke
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now