Sign in to follow this  
Followers 0
Swift

Control*() Functions

7 posts in this topic

#1 ·  Posted (edited)

I was tring to use a better way of logging into Diablo II, unlike when I first begun.

I have tried these functions, but its not sending/clicking anything.

All Coord's Are Correct, And The Window Title Is Correct, Because WinWait, And WinMove() Work.

$Realm="USEast"
$AccountName="accountgoeshere"
$AccountPassword="passwordhere"
ShellExecute("C:\Program Files\Diablo II\Game.exe", "-w -skiptobnet")
WinWait("Diablo II")
Sleep(2000)
WinMove("Diablo II", "", 1, 1)
SendDiabloIIText("{ESC}")
Sleep(750)
SendDiabloIIClick(406, 408)
Switch $Realm
    Case "USEast"
        SendDiabloIIClick(406, 408)
        SendDiabloIIText("{ENTER}")
    Case "USWest"
        SendDiabloIIClick(387, 382)
        SendDiabloIIText("{ENTER}")
    Case "Asia"
        SendDiabloIIClick(382, 430)
        SendDiabloIIText("{ENTER}")
    Case "Europe"
        SendDiabloIIClick(369, 459)
        SendDiabloIIText("{ENTER}")
EndSwitch
SendDiabloIIClick(403, 378)
Sleep(1500)
SendDiabloIIClick(472, 365, 2)
Sleep(500)
SendDiabloIIText($AccountName)
SendDiabloIIText("{TAB}")
SendDiabloIIText($AccountPassword)
SendDiabloIIText("{ENTER}")
Func SendDiabloIIClick($_Coord1, $_Coord2, $_Clicks=1)
    ControlClick("Diablo II", "", -1, "left", $_Clicks, $_Coord1, $_Coord2)
EndFunc
Func SendDiabloIIText($_Text)
    ControlSend("Diablo II", "", -1, $_Text)
EndFunc
Edited by Swift

Share this post


Link to post
Share on other sites



Does anyone know why this is not working?

@Everyone, this is not a bot, it's just meant to log me onto battle.net easier. (Maybe im not getting any answers because people think it's a bot)

Share this post


Link to post
Share on other sites

what is SendDiabloIIClick


" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites

Might help if I read. What is your controlID -1?


" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites

I just want it to send to the window...No specific control.

Share this post


Link to post
Share on other sites

Wow Zedna! Thanks! It worked!

Share this post


Link to post
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
Sign in to follow this  
Followers 0