Jump to content

Auto Login fo WoW


Recommended Posts

Guest kurt182

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?

; 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
Link to post
Share on other sites
Guest kurt182

If anyone else wants to use it:

; 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
Link to post
Share on other sites

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 to

send($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

Link to post
Share on other sites

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 to

send($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?
Link to post
Share on other sites

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.

Link to post
Share on other sites

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)

Link to post
Share on other sites

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:

800x600

1024x768

1280x1024

1600x1200

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
EndSelect

The 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 800x600

460/800 = .575

So your click X would be: $clickX = Round(@DesktopWidth * .575)

Follow the same procedure for the Y axis.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to post
Share on other sites
  • 2 weeks later...
Guest Bullet

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.

Link to post
Share on other sites

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
EndSelect

The 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 800x600

460/800 = .575

So 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?

Link to post
Share on other sites

$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

Link to post
Share on other sites
  • 3 weeks later...

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.

Link to post
Share on other sites

$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 :evil: 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. :)

Link to post
Share on other sites
  • 1 year later...

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...