This will be the third script I've ever made when completed. It is a script that uses a .ini file to input a user's name and password and sign them in automatically to Battle.Net using Diablo II. However, when it comes time to put in the variable, the program puts in the default "Not_Found" text in place of the person's Account Name and Password. I believe the problem may be in the formatting of my .ini file, but after experimenting with several different ways of trying it, nothing has changed. I need someone to check my coding if possible.
The coding for the script:
; ----------------------------------------------------------------------------
; AutoIt Version: 3.1.0
; Author: Austin Brashear <alloy45224@gmail.com>
; Script Function:
; Allows you to log-in to your Diablo II account quickly and automatically.
; ----------------------------------------------------------------------------
#NoTrayIcon
Run("C:\Program Files\Diablo II\Diablo II.exe")
WinWaitActive("Diablo II")
Sleep(3500)
MouseClick("left",512,384,3)
Sleep(500)
MouseClick("left",402,352,1,0)
Sleep(2000)
MouseClick("left",396,335,1,0)
Dim $AccountName, $Password
$DiabloIIAccountName = IniRead("C:/Program Files/Diablo II Auto-Login/Settings.ini", "AccountName", "Name", "")
$Password = IniRead("C:/Program Files/Diablo II Auto-Login/Settings.ini", "Password", "Password", "")
Send("{CTRLDOWN}a{CTRLUP}{DELETE}")
Send($DiabloIIAccountName, 1)
Send("{TAB}")
Send($Password, 1)
Send("{ENTER}")
Here is the code inside the .ini file:
[AccountName]
Name=TyIzael
[Password]
Password=xxx
All help is greatly appreciated!