World of Warcraft Auto Login Script!

Discussion in 'Mac and PC Games' started by Keytachi, Aug 27, 2007.

  1. Keytachi macrumors regular

    Joined:
    Sep 14, 2006
    #1
    I wrote this very simple script to start WoW, input your password and take you straight to the character screen automaticaly.
    First you need to open Script Editor in HD (hard drive) -> Applications -> AppleScript -> Script Editor
    Paste the code into the Untitled script, replacing "passwordhere" with your password. Save the script as an Application (file format -> application), with the run only box checked.
    Enjoy!

    Code:
    set CR to ASCII character of 13
    tell application "System Events"
    	tell application "World of Warcraft" to activate
    	keystroke "passwordhere" & CR
    end tell
    
    This IS allowed by Blizzard
     
  2. jmp478 macrumors newbie

    Joined:
    Mar 3, 2008
    #2
    Better Version

    I wrote the same script a while ago, but mine checks if WoW is open first and other functions.

    *Note: if you do use my script, be aware that anybody can EASILY sign onto your account or extract your password from the applet. I'm not sure if this is allowed by Blizzard. You've been warned*

    Code:
    tell application "System Events"
    		tell application "World of Warcraft" to activate
    		tell application "Finder" to set frontApp to the name of first process whose frontmost is true
    		if frontApp is "World of Warcraft" then
    			keystroke "yourpassword"
    		end if
    		delay 0.25
    		tell application "Finder" to set frontApp to the name of first process whose frontmost is true
    		if frontApp is "World of Warcraft" then
    			keystroke return
    		end if
    --This part will select the character and signs on. Not required if you have different characters.
    		delay 4
    		tell application "Finder" to set frontApp to the name of first process whose frontmost is true
    		if frontApp is "World of Warcraft" then
    			keystroke return
    		end if
    	end tell
     
  3. redsteven macrumors 6502a

    redsteven

    Joined:
    Aug 22, 2006
    #3
    wow that's pretty cool guys. never tried doing that
     
  4. merc669 macrumors 6502

    merc669

    Joined:
    Jun 7, 2006
    Location:
    Southern MD, USA
    #4
    Do you mean This IS or IS NOT allowed? Thanks!

    Bill.....
     
  5. kkat69 macrumors 68020

    kkat69

    Joined:
    Aug 30, 2007
    Location:
    Atlanta, Ga
    #5
    Yah when you add **WARNING** that kinda gives a negative "is not" feeling.

    Personally I wouldn't like (although it's a very sweet script) doing this only because it will allow anyone to log into your account that could get on your computer. Buddy playing prank, deletes your epic gear, etc. OR some sort of sniffer app that now knows to do a text search for "password" to get your wow password.

    We know these things don't exist in the wild on Macs but they can/could and now they would know where and how to find this information out.
     
  6. redsteven macrumors 6502a

    redsteven

    Joined:
    Aug 22, 2006
    #6
    Lol best quote ever.

    I didn't realize they were captive-bred.
     
  7. jmp478 macrumors newbie

    Joined:
    Mar 3, 2008
    #7
    Yeah it wouldn't be a very good app to release publicly. But I just made it to use on my computer.

    I also added to the script for it to check if anyone on my network is using world of warcraft when it's launched, My sister plays on my account sometimes and If I sign into WoW it kicks her off. Here it is so far.


    *Note: if you do use my script, be aware that anybody can EASILY sign onto your account or extract your password from the applet. I'm not sure if this is allowed by Blizzard. You've been warned*

    Code:
    set theUser to do shell script "whoami"
    tell application "System Events" to (name of processes) contains "World of Warcraft"
    if the result is false then
    -- if i'm the user, it checks my sisters computer and vice versa
    	if theUser is "josh" then
    		tell application "Finder" of machine "eppc://amy:*****@amys-computer.local" to (name of processes) contains "World of Warcraft"
    		if the result is true then
    			display dialog "The account is already being used" with icon stop buttons {"OK"} default button 1
    		else
    			logIn()
    		end if
    	else if theUser is "amy" then
    		tell application "Finder" of machine "eppc://josh:*******@joshs-computer.local" to (name of processes) contains "World of Warcraft"
    		if the result is true then
    			display dialog "The account is already being used" with icon stop buttons {"OK"} default button 1
    		else
    			logIn()
    		end if
    	end if
    end if
    
    on logIn()
    	tell application "System Events"
    		my activateApp()
    		delay 0.25
    		keystroke "password"
    		my activateApp()
    		delay 0.25
    		keystroke return
    		my activateApp()
    		delay 4.5
    		keystroke return
    	end tell
    end logIn
    
    on activateApp()
    	try
    		tell application "World of Warcraft" to activate
    	on error
    		continue quit
    	end try
    end activateApp
     
  8. kkat69 macrumors 68020

    kkat69

    Joined:
    Aug 30, 2007
    Location:
    Atlanta, Ga
    #8
    You like that eh :D

    I knew SOMEONE would pick up on it.

    Still kewl script. Would this work with 2 WoW applications? When I actually DO play, I usually have 2 windows open. 1 account is mine, and 1 is my son. I'm leveling 2 toons at the same time. Also I'm running wailing caverns to get gear for his twink. I'll have to try this out later.
     
  9. jmp478 macrumors newbie

    Joined:
    Mar 3, 2008
    #9
    I dunno

    If you can get finder to differentiate the different windows then I'm sure you can. I thought you could only have one window open at once though?
     
  10. redsteven macrumors 6502a

    redsteven

    Joined:
    Aug 22, 2006
    #10
    Well the two windows are from having two different instances of the application being open (not something you can "normally" do). This thread talks about it http://www.macosxhints.com/article.php?story=20030711041351836

    The easier way to do it (though it's not really 2 "instances"... it's just a copy) is to duplicate the application.

    Regardless, he can only do so because he's using separate accounts.
     
  11. kkat69 macrumors 68020

    kkat69

    Joined:
    Aug 30, 2007
    Location:
    Atlanta, Ga
    #11
    Yep, per the actual Blizzard Mac support I have 2 WoW folders and essentially 2 WoW.app's. I run both at the same time.
     
  12. jmp478 macrumors newbie

    Joined:
    Mar 3, 2008
    #12
    I figured out how to have the two apps open with different names

    Finder gets the process's name from the executable file. If you right click World of Warcraft.app and select Show Package Contents you can find it under "Contents - MacOS"

    You can change the name of the file but WoW wont launch with the .app package. To get it to start you have to use the "do shell script" command and open the file from the .app package instead.

    you can then tell applescript to "tell application "whatever the name of the .app package"

    to get Finder to find the process you must use the name of the executable file.

    I know it's confusing but as far as I know it's the only way to do it.
    If you need help just send me a message or email me at jmp478@yahoo.com
     
  13. Keytachi thread starter macrumors regular

    Joined:
    Sep 14, 2006
    #13

Share This Page