AceLoc Posted May 28, 2006 Share Posted May 28, 2006 (edited) is it possible to join that game// if i get that messageand if that guy ( Evanescence. ) join next game 'Kill-baal-02' then he joins 'Kill-baal-02' and then 03 // 04 etc etcthnx Edited May 28, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Nomad Posted May 28, 2006 Share Posted May 28, 2006 What? Do you mean make a script that will auto-join the same games as that person? Link to comment Share on other sites More sharing options...
AceLoc Posted May 28, 2006 Author Share Posted May 28, 2006 jes that is exactly what i mean! [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Nomad Posted May 28, 2006 Share Posted May 28, 2006 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. Link to comment Share on other sites More sharing options...
AceLoc Posted May 28, 2006 Author Share Posted May 28, 2006 expandcollapse popupMouseClick("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] Link to comment Share on other sites More sharing options...
Nomad Posted May 28, 2006 Share Posted May 28, 2006 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. Link to comment Share on other sites More sharing options...
AceLoc Posted May 28, 2006 Author Share Posted May 28, 2006 (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 May 28, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Nomad Posted May 28, 2006 Share Posted May 28, 2006 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 Link to comment Share on other sites More sharing options...
AceLoc Posted May 28, 2006 Author Share Posted May 28, 2006 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] Link to comment Share on other sites More sharing options...
Nomad Posted May 28, 2006 Share Posted May 28, 2006 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. Link to comment Share on other sites More sharing options...
AceLoc Posted May 28, 2006 Author Share Posted May 28, 2006 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] Link to comment Share on other sites More sharing options...
Nomad Posted May 28, 2006 Share Posted May 28, 2006 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. Link to comment Share on other sites More sharing options...
AceLoc Posted May 28, 2006 Author Share Posted May 28, 2006 (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 May 28, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Nomad Posted May 28, 2006 Share Posted May 28, 2006 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. Link to comment Share on other sites More sharing options...
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