Jump to content
Sign in to follow this  

Variable Problem

Recommended Posts


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.
; ----------------------------------------------------------------------------
Run("C:\Program Files\Diablo II\Diablo II.exe")
WinWaitActive("Diablo II")
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($DiabloIIAccountName, 1)
    Send($Password, 1)

Here is the code inside the .ini file:


All help is greatly appreciated!

Edited by _TyIzaeL_

Share this post

Link to post
Share on other sites

why make it read a .ini why not just make a GUI i find it alot easier

Share this post

Link to post
Share on other sites


$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", "")



Share this post

Link to post
Share on other sites

oh and for d2 u gotta assign the working directory or else u'll get a bad vesions error

Run("C:\program files\diablo II\diablo II.exe","C:\program files\diablo II")

--just a tip

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

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