Jump to content

help


IcyFire
 Share

Recommended Posts

  • Moderators

All you have to do is make the Ini file, I did the whole thing... you can IM me at KneelB4Me@Hotmail.com

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Alright man, I've been waiting for 40 minutes now... I'm about to go to bed:

I sent you a PM with the correct hotmail account: Kneel_B4_Me@hotmail.com

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Opt("WintitleMatchMode", 4); MAKING SURE WE HAVE THE RIGHT WINDOW TO DO OUR FUNCTIONS IN
 Opt("MouseCoordMode", 0); ASSUMING YOUR USING WINDOW COORDINATES FROM AUTOINFO TOOL, IF YOUR USING SCREEN COORDS THEN REPLACE O WITH A 1, OR CLIENT COORDS REPLACE WITH A 2
  
 ; NOTE: VARIABLES ARE DEFINED BY A LEADING DOLLAR SIGN
  
  Global $WINDOW = "DIABLO 2 TITLE NAME"; USING THIS SO THAT YOU DON'T ALWAYS HAVE TO BE MAXIMIZED
  
 $Validate_UserName = IniRead(@desktopdir & "\MyIni.ini", "Section1", "UserName", ""); MAKE SURE THE USER HAS SUBMITTED A USERNAME AND PASSWORD
 $Validate_PassWord = IniRead(@desktopdir & "\MyIni.ini", "Section1", "Password", ""); MAKE SURE THE USER HAS SUBMITTED A USERNAME AND PASSWORD
  
 If $Validate_UserName = "" And $Validate_Password = "" Then; IF THE USER HAS NOT SUBMITTED A USERNAME AND PASSWORD PROMPT THE USER TOO!
 $UserName = InputBox("Registration User Name", "Please Enter A Valid User Name", "", "", 80, 100); FIRST INPUT BOX TO GET THE USERNAME CONTAINED IN A VARIABLE
 $Password = InputBox("Registration Password", "Please Enter A Valid Password", "", "", 80, 100); 2ND INPUT BOX TO GET THE PASSWORD CONTAINED IN A VARIABLE
  IniWrite(@desktopdir & "\MyIni.ini", "Section1", "UserName", $UserName); WRITE THE USERNAME TO THE INI FILE
  IniWrite(@desktopdir & "\MyIni.ini", "Section1", "Password", $Password); WRITE THE PASSWORD TO THE INI FILE
  MsgBox(48, "Registration", "Thank you for registering", 2)
  Else
  While 1; CREATE A LOOP IN CASE THE USER DOESN'T ENTER THE RIGHT USERNAME
 $UserName = InputBox("User Name", "Please Enter A Valid User Name", "", "", 80, 100); FIRST INPUT BOX TO GET THE USERNAME CONTAINED IN A VARIABLE
  If $UserName <> $Validate_Username Then
  MsgBox(48, "Not Valid", "You didn't enter a valid User Name!", 2)
  Else
  ExitLoop
  EndIf
  WEnd
  While 1; CREATE A LOOP IN CASE THE USER DOESN'T ENTER THE RIGHT PASSWORD
  MsgBox(0, "", $Validate_PassWord)
 $Password = InputBox("Password", "Please Enter A Valid Password", "", "", 80, 100); 2ND INPUT BOX TO GET THE PASSWORD CONTAINED IN A VARIABLE
  If $Password <> $Validate_PassWord Then
  MsgBox(48, "Not Valid", "You didn't enter a valid Password!", 2)
  Else
  ExitLoop
  EndIf
  WEnd
  EndIf
  
 If Not WinActive($WINDOW) Then WinActivate($WINDOW); MAKE SURE THAT IF YOUR WINDOW ISN'T ACTIVE THAT IT ACTIVATES SO YOU CAN SEND AND CLICK PROPERLY
  
  If WinExists($WINDOW)Then
 ; sleep for 15 seconds
  Sleep(15000)
  
  Sleep(500)
  Send("{Enter}")
  Sleep(500)
  Send("/f a justin {Enter}")
  Send("{Enter}")
  Sleep(500)
  Send("/f m yo nig123 {Enter}")
  MouseClick("left")
  Sleep(500)
  Send("{Enter}")
  Sleep(500)
  Send("/f r justin {Enter}")
  Send("{n}")
  MouseClick("left")
  
 ; press i on keyboard
  Send("i")
  MouseClick("Left", 450, 300, 1, 1)
  MouseClick("Left", 300, 300, 1, 1)
  EndIf

i want users to be able to edit there username , by using a .ini file , so the script checks it then writes it into the diablo log in place ... by a mouse coordinate

Link to comment
Share on other sites

Well, the script you posted already appears to read a username and password pair from an INI file. You will need to determine the necessary mouse coordinates using AutoIt Window Info, and then you'll probably want the MouseClick() function to move to that location and click. Send() will send the password as keystrokes.

Tip: Many people find that Send() doesn't work as expected in games without a minor adjustment:

opt("sendKeyDownDelay", 50)
 ; change to 100 if it still doesn't send the keys

Place that instruction near the top of your script, before your first Send() instruction.

Link to comment
Share on other sites

The way the script is written, it will be looking for a MyIni.ini file sitting on your desktop in this format:

[Section1]
 Username=bob
 Password=qwerty12

If the MyIni.ini file were to contain exactly that, then the script would attempt to log in with those details.

Link to comment
Share on other sites

  • Moderators

Ha... waiting for you to criticize my top half of the script LxP... He doesn't know how to setup an INI is the only problem.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...