Jump to content

Recommended Posts

Posted (edited)

Posted Image

is it possible to join that game// if i get that message

and if that guy ( Evanescence. ) join next game 'Kill-baal-02'

then he joins 'Kill-baal-02' and then 03 // 04 etc etc

thnx :)

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Posted

jes that is exactly what i mean!

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Posted

Maybe, but the only way I can think of would be to write a script to read the pixels on the screen, then translate that into readable text. Then you would have to make a string out of it. Then you would have to extract the correct text. Then you would need to script a bot to leave/join games.

Unless the other person had a program to send the info to you when they joined/left games.

But, either way it'll be a lot of work. :)

Posted

MouseClick("left", 710, 480)


AutoItSetOption("WinTitleMatchMode", 4) 

; Get the handle of the diablo window 
$handle = WinGetHandle("classname=Diablo II", "") 
If @error Then 
    MsgBox(4096, "Error", "Could not find the correct window") 
    exit 
Else 
$i = 0
Do
    
    


;   MsgBox(4096, "success", "The window handle is " & $handle) 
   ; Send some text directly to this window's edit control 
   ;ControlClick("handle=" & $handle, "", "", "left") 
    sleep(3000)
    ControlSend("handle=" & $handle, "", "", "{G}") 
    sleep(35) 
    ControlSend("handle=" & $handle, "", "", "{A}") 
    sleep(35)
    ControlSend("handle=" & $handle, "", "", "{M}") 
    sleep(35)
    ControlSend("handle=" & $handle, "", "", "{E}") 
    sleep(35)
    ControlSend("handle=" & $handle, "", "", "{N}") 
    sleep(35) 
    ControlSend("handle=" & $handle, "", "", "{A}") 
    sleep(35)
    ControlSend("handle=" & $handle, "", "", "{M}") 
    sleep(35)
    ControlSend("handle=" & $handle, "", "", "{E}") 
    $i = $i + 1
    Until $i = 1

EndIf

exit

MouseClick("left", 710, 480)

that will press on the 'Join' button

the rest will type 'GAMENAME'

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Posted

Writing the script to join the game is the easy part. However, the name "GAMENAME" is not going to be the correct name every time. You need to get the correct game name to join the correct game.

One other option would be by using a packet sniffer. But that is going to entail a little bit of work too. My advise is to start doing some research if you're serious about wanting to do what you asked.

BTW, this would eliminate a lot of those lines in your script:

ControlSend("handle=" & $handle, "", "", "GAMENAME")

You don't need to sleep between the sends, the default setting will work, I've done it on that game. But if you wanted you could use:

Opt("SendKeyDelay", 35)

to give you the 35 millisecond sleep between the keystrokes. :)

Posted (edited)

what i want to say is i dont need the whole line only the last number ( 01, 02, 03, 04, 05 etc )

+ thanks i didnt know that :)

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Posted

Then do a count for each time you join a game a set a variable, like this:

$GameCount = 00

;Start a conditional loop or something here
ControlSend($handle, "", "", "GAMENAME" & $GameCount)
$GameCount = $GameCount + 1
;
;more script for whatever until you're ready to join another game
;end the loop

That's about as far as I will go. I'm not going to write the entire script for you, but I am willing to help when people need it.

I hope this helps,

Nomad

Posted

yes it did help much :)

but last question how do i get this:

MouseClick("left", 420, 250)

into the ControlSend part? ^

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Posted

You can't put it in the ControlSend part, it has to be kept separate. But that doesn't mean you can't include it in the loop if you need to, which you do. Just use it before the ControlSend so it opens the join game screen.

Posted

isnt that possible i thought it was something like this:

ControlClick("handle=" & $handle, "", "", "left, 420, 250")

or something :/

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Posted

ControlClick ($Handle, "", controlID, "left", clicks)

This will not work here because the buttons on the screen are not controls in the true sense since you can't get a control ID off of them.

Posted (edited)

oke,, moderators you can close//remove this topic

and many thanks for helping <a href='https://www.autoitscript.com/forum/index.php?showuser=12155'>Nomad</a>

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Posted

No problem. All of this you could've gotten from looking through the help menu though. You should really try to figure this stuff out by looking through there first. Part of programming is learning things on your own. Then you not only learn what you needed to learn at the given time, but you usually pick up some things that you will use later. Not to mention that sometimes it opens up new ideas because you found a particular function or option you didn't even know existed. :)

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...