Guest kurt182 Posted June 9, 2005 Posted June 9, 2005 Im a newbie at autoit scripts and this is my first script. Im lazy and hate typing in my login info every time I want to play the game. The script opens WoW, waits for the game to load and then types the name and password. I think WoW wont accept pasting the name and password. I have checked it many of times and every time it says it cant login. If I manually type in the name and pass it works. Is there a way to get autoit to type the came and password instead of putting it in the clipboard and pasting it? If the code looks shaddy can you tell me a better way to write it? expandcollapse popup; AutoIt Version: 3.0 ; Language: English ; Platform: WinXP ; Author: Oldhead ; ; Script Function: ; WoW FishBot. ; ; Wow Window Title - World of Warcraft ; WoW Window Size - w1032 x h795 ; classname=GxWindowClassD3d ; Initial shit WinActivate("World of Warcraft") HotKeySet("{PAUSE}", "EndScript") ; Script Start If FileExists(@ProgramFilesDir & "\World of Warcraft\WoW.exe") Then Run(@ProgramFilesDir & "\World of Warcraft\WoW.exe") Sleep(25000) MouseClick("left", 460, 400, 1, 2) clipput("Account Name") send("^v ") Sleep(100) MouseClick("left", 455, 477, 1, 2) clipput("Account Password") send("^v {ENTER}") EndIf ; Function to exit script Func EndScript() $exit = MsgBox(4, "WoW Log In", "End login script?") If $exit = 6 Then Exit EndIf EndFunc
RyGoTypE Posted June 9, 2005 Posted June 9, 2005 send("Account Name ") send("Password ") That's ally ou really have to do. :-D http://www.shizzkabiz.com/
Guest kurt182 Posted June 9, 2005 Posted June 9, 2005 Do i add that where i have: clipput("Account Name") clipput("Account Pass")?
RyGoTypE Posted June 9, 2005 Posted June 9, 2005 Well instead of copy/pasting your Account Name and Password, have it click the text field and just send("Account Name") send("Password") http://www.shizzkabiz.com/
RyGoTypE Posted June 9, 2005 Posted June 9, 2005 In other words, yes. Replace it. http://www.shizzkabiz.com/
Guest kurt182 Posted June 9, 2005 Posted June 9, 2005 Sweet, it works like a charm. Do you see any code that could be written out better?
Guest kurt182 Posted June 9, 2005 Posted June 9, 2005 If anyone else wants to use it: expandcollapse popup; AutoIt Version: 3.0 ; Language: English ; Platform: WinXP ; Author: Oldhead ; ; Script Function: ; WoW FishBot. ; ; Wow Window Title - World of Warcraft ; WoW Window Size - w1032 x h795 ; classname=GxWindowClassD3d ; Initial shit WinActivate("World of Warcraft") HotKeySet("{PAUSE}", "EndScript") ; Script Start If FileExists(@ProgramFilesDir & "\World of Warcraft\WoW.exe") Then Run(@ProgramFilesDir & "\World of Warcraft\WoW.exe") Sleep(25000) MouseClick("left", 460, 400, 1, 2) send("Account Name") Sleep(100) MouseClick("left", 455, 477, 1, 2) send("Account Pass") send("{ENTER}") EndIf ; Function to exit script Func EndScript() $exit = MsgBox(4, "WoW Log In", "End login script?") If $exit = 6 Then Exit EndIf EndFunc
Blue_Drache Posted June 9, 2005 Posted June 9, 2005 If anyone else wants to use it:MouseClick("left", 460, 400, 1, 2) send("Account Name") Sleep(100) MouseClick("left", 455, 477, 1, 2) send("Account Pass")Ouch, you've hard-coded mouse coordinates into your script.What happens if I run WoW in some resolution other than what you've set your script up at? I'm not going to click the correct areas of the screen and can cause a failure of this script.Also, try this at the start of the script in the "initial shit" section$account = "Account Name"$pass = "Account Pass"Then change your send lines tosend($account)send($pass)That way it's easier to find where to change the stuff at. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
RyGoTypE Posted June 9, 2005 Posted June 9, 2005 MouseClick("left", 460, 400, 1, 2) send("Account Name") Sleep(100) MouseClick("left", 455, 477, 1, 2) send("Account Pass")Ouch, you've hard-coded mouse coordinates into your script.What happens if I run WoW in some resolution other than what you've set your script up at? I'm not going to click the correct areas of the screen and can cause a failure of this script.Also, try this at the start of the script in the "initial shit" section$account = "Account Name"$pass = "Account Pass"Then change your send lines tosend($account)send($pass)That way it's easier to find where to change the stuff at.<{POST_SNAPBACK}>Hey, how would you have it click a certain thing without hard coding the mouse points? http://www.shizzkabiz.com/
t0ddie Posted June 9, 2005 Posted June 9, 2005 1.set the resolution on the computer with some code (less desirable to the user) 2. use a series of message boxes telling the user where to move the mouse... then use a hotkey function that the user activates to get the current mouse coordinates. (somewhat of a hastle) 3. make code for different resolutions, and check to see what the users resolution is (alot of code) 4. use tab and enter instead of clicking to move from account to password field. (although there is probably a setting in the registry that you can change to place a "last account logged in" account name in that field, and you could set up a .ini with the name you want in it for fast switching) 5. ahh, i had some more ideas, but i cant think of them at the moment. Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.
Marc Posted June 10, 2005 Posted June 10, 2005 Hiho, here's my version... in fact, two versions. First the simple Launcher: $pfad = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\World of Warcraft", "GamePath") Run($pfad) WinWaitActive("WORLD OF WARCRAFT") Send("UserName") Send("{TAB}") Send("Password") Send("{ENTER}") Second one is the one I am currently using on my machine. Since Blizzard is so shocking dumb to check cpu speed at startup (really, only cpu frequency, not any cpu identifier string) WoW has some problems with AMD CPUs when Cool & Quiet is activated. So the script deactivates Cool & Quiet, runs WoW and re-activates Cool & Quiet. Be warned - only works on a german XP system, you'll have to change some strings... $titel="Eigenschaften von Energieoptionen" $pfad = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\World of Warcraft", "GamePath") Run("RUNDLL32 SHELL32.DLL,Control_RunDLL powercfg.cpl") WinWaitActive($titel) Send("D") send("{ENTER}") WinWaitClose($titel) Run($pfad) WinWaitActive("WORLD OF WARCRAFT") Send("Username") Send("{TAB}") Send("Password") WinActivate("Desktop") Run("RUNDLL32 SHELL32.DLL,Control_RunDLL powercfg.cpl") sleep(5000) WinWaitActive($titel) Send("M") send("{ENTER}") WinWaitClose($titel) WinActivate("WORLD OF WARCRAFT") have fun, Marc Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)
Blue_Drache Posted June 10, 2005 Posted June 10, 2005 (edited) 3. make code for different resolutions, and check to see what the users resolution is (alot of code)4. use tab and enter instead of clicking to move from account to password field. (although there is probably a setting in the registry that you can change to place a "last account logged in" account name in that field, and you could set up a .ini with the name you want in it for fast switching)<{POST_SNAPBACK}>While option 4 is the safest, option 3 is not necessicarily(sp?) a lot of code, just a select case on the mouse click. I'm assuming (I don't own the game) that WoW can only be played in one of four different resolutions:800x6001024x7681280x10241600x1200Select Case @DesktopWidth = 800 and @DesktopHeight = 600 ;Click this X and this Y Case @DesktopWidth = 1024 and @DesktopHeight = 768 ;Click this X and this Y Case @DesktopWidth = 1280 and @DesktopHeight = 1024 ;Click this X and this Y Case @DesktopWidth = 1600 and @DesktopHeight = 1200 ;Click this X and this Y EndSelectThe other option is using a ratio.Click X / @DesktopWidth = ratio. So, the OP's orginal click X for username was: 460 and assuming he's running at 800x600460/800 = .575So your click X would be: $clickX = Round(@DesktopWidth * .575)Follow the same procedure for the Y axis. Edited June 10, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Guest Bullet Posted June 19, 2005 Posted June 19, 2005 A perhaps simpler way of doing the login part is to do: Send("Account name") Send("{TAB}") Send("Password") Send("{ENTER}") This way you can keep your script smaller and easier to understand. The part for starting up the game is good though.
RyGoTypE Posted June 19, 2005 Posted June 19, 2005 Select Case @DesktopWidth = 800 and @DesktopHeight = 600 ;Click this X and this Y Case @DesktopWidth = 1024 and @DesktopHeight = 768 ;Click this X and this Y Case @DesktopWidth = 1280 and @DesktopHeight = 1024 ;Click this X and this Y Case @DesktopWidth = 1600 and @DesktopHeight = 1200 ;Click this X and this Y EndSelectThe other option is using a ratio.Click X / @DesktopWidth = ratio. So, the OP's orginal click X for username was: 460 and assuming he's running at 800x600460/800 = .575So your click X would be: $clickX = Round(@DesktopWidth * .575)Follow the same procedure for the Y axis.<{POST_SNAPBACK}>So which way is more effective?The first or second way? http://www.shizzkabiz.com/
Knight Posted June 19, 2005 Posted June 19, 2005 expandcollapse popup$sPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\World of Warcraft\", "InstallPath") $sWoW = $sPath & "WoW.exe" $sIni = $sPath & "login.ini" If FileExists($sIni) = "0" Then $sUserName = InputBox("User Name", "Please input your User Name:", "", "", -1, 125) $sPassword = InputBox("Password", "Please input your Password:", "", "*", -1, 125) IniWrite($sIni, "Configuration", "User Name", $sUserName) IniWrite($sIni, "Configuration", "Password", $sPassword) IniWrite($sIni, "Configuration", "WoW", $sWoW) IniWrite($sIni, "Configuration", "Title", "World of Warcraft") IniWrite($sIni, "Configuration", "Delay", "13000") EndIf $zCharLocz = InputBox("Character", "Please input your Character Location (1-10):", "", "", -1, 125) IniWrite($sIni, "Configuration", "Character", $zCharLocz - 1) IniWrite($sIni, "Configuration", "Delay2", "6000") $sUserName = IniRead($sIni, "Configuration", "User Name", "NotFound") $sPassword = IniRead($sIni, "Configuration", "Password", "NotFound") $sTitle = IniRead($sIni, "Configuration", "Title", "NotFound") $sDelay = IniRead($sIni, "Configuration", "Delay", "NotFound") $sDelay2 = IniRead($sIni, "Configuration", "Delay2", "NotFound") If WinExists($sTitle) Then ProcessClose("WoW.exe") Sleep(5000) Run($sWoW) Else Run($sWoW) EndIf Sleep($sDelay) Send($sUserName) Send("{TAB}") Send($sPassword) Send("{ENTER}") Sleep($sDelay2) $DW = @DesktopWidth $DH = @DesktopHeight $zCharLocz = IniRead($sIni, "Configuration", "Character", "NotFound") If $DW = 800 And $DH = 600 Then MouseClick("left", 657, 83, 1, 10) ElseIf $DW = 1024 And $DH = 768 Then MouseClick("left", 836, 109, 1, 10) Else MsgBox(4100, "Error", "Script only compatible with 800x600 or 1024x768 screen resolutions. Cannot select character.") exit EndIf Send("{DOWN " & $zCharLocz & "}") Sleep(1000) Send("{ENTER}") If $zCharLocz > 9 OR $zCharLocz < 0 Then MsgBox(4096,"Error", "Invalid Parameter") Exit EndIf Exit
rush4hire Posted July 8, 2005 Posted July 8, 2005 Hmm i wonder where such settings as screen resolution in WoW would be saved? Then maybe autoit can detect when changes to these settings are made and update its settings in a text file. Also I'd get user name and pw (etc) from an ini or something. So ppl don't have to open the script files to change those kinda things. Decompilable game code manager for Dark Deeds 6 for Warcraft IIIA web broadcast TiVo like thing.. (this example is for 3abn.org)Finally.. AutoIt Pac-Man Digital Hymn Player
Orca Posted July 9, 2005 Posted July 9, 2005 C:\path\to\World of Warcraft\WTF\config.wtfSET gxResolution "1024x768" I AM ORCA!! A VERY POWERFUL WHALE!!!
Lemonadez Posted July 9, 2005 Posted July 9, 2005 $pfad = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\World of Warcraft", "GamePath") Run($pfad) WinWaitActive("World of Warcraft") Send("LOL") Send("{TAB}") Send("LOL") Send("{ENTER}") this one kick ass tho but too bad...what if someone dont have the autoscript program?...should make a pop up window that they put their username and password...also it save after u type it in...that would be awesome.
Zandor Posted October 15, 2006 Posted October 15, 2006 Srry if I just reopened a really old post but I want to know how to make it repeat. Im on a private server and I just want it to go till I get in. Anyone have a script for something like that?
jinxter Posted October 16, 2006 Posted October 16, 2006 private server? did you read the eula ? > there are 10 types of people in the world, those who understand binary and those who don't.
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