Jump to content

Recommended Posts

Posted

Hi guys, recently I started to mess around with C++, and I ended up with a 270line failure of a tool which I made.

The sole purpose of this code, was to open a game, in this case Warcraft 3.

Then to press the button "B" to enter the logon menu, which you could enter in a config.ini file, then to write the values written there, example:

[config]

username=usernamehere

password=passwordhere

Then the program would automaticly enter the Username given in the ini, press TAB, write the password and hit enter.

I did manage to make it work more or less, just that the prog pressed the wrong buttons.

Now, to my point, is it possible to make a ini reading executable that does such as stated above?

And in addition, somewhere along the lines in the ini, point to the destination of the exe and run it?

If anyone could point me in the right direction, that'd be helpful thanks.

I'm not asking for an entire source code, just pretty much for the ini write/read and enter it part :)

Thanks, sincerely

Alex.

Posted

I don't generally get involved in threads that reference games but for the INI part of it, have a look in the help file for IniRead() and IniWrite.

$sIni = @ScriptDir & "\config.ini"
$pass = IniRead($sIni, "Config", "username", "")

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Posted (edited)

Thanks for the quick reply JohnOne.

May you give me an example of a variable? thanks.

EDIT: Searched the help section, got 137 hits for "Variable." though none of them strikes me as "THIS IS THE ONE"

Edited by ACrapid
Posted (edited)

Haha, thanks guys.

I'm sorry for my noobyness, but at this

"THIS IS A VARIABLE"

What should I put in THISISAVARIABLE :)?

The sections of the .ini or what?

Edited by ACrapid
Posted

whatever you want. The equals sign assigns whatever is to the left to the variable on the right. You need to search the help file now because every example in the help file uses variables.

Posted (edited)

The Section would be "Config". This is the only section from this example:

[config]

username=usernamehere

password=passwordhere

The Key would be either "username" or "password".

Edited by dantay9

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