Use AutoIT functions in C++ code

poqun

Carder
Carder
Joined
11 yrs. 7 mth. 6 days
Messages
2,772
Reaction score
2,095
Wallet
0$
In the past,I was coding in the AutoIt language( a very easy one and very useful for automations ,eg: mouse clicks,sending keys,etc
Please, Log in or Register to view URLs content!

But I left it because the compiled exes are native detected by antiviruses as False Positives -> SO FOR ALL THE MALWARE CODERS ,AutoIt IS THE WORST LANGUAGE FOR THIS !

Anyway, some autoit functions doesn't exists in C++, but I searched on Google and I finded a way on how to use them in C++ !


You'll need to download and install an older version of autoit to correspond with the tutorial ( I think )
And it works only with the Dev++ and VC++ compilers :/

*******************************************
******************************************
Visual C++

1. start a new project
2. go to your Autoit directory (usually C:\Program Files\AutoIt\ )
3. go to the AutoItX/StandardDLL/VC6/Example folder within your Autoit directory
4. copy the following files to your project directory: AutoIt3.h AutoItX3.lib AutoItX3.dll main.cpp
5. in visual studio, go to Project->Add To Project->Files
6. change the "Files of type" dropdown to "all files"
7. Select: AutoIt3.h AutoItX3.lib and main.cpp and add them to the project
8. Your project should now compile and run. the example opens notepad and sends some text to it.
NOTE: you may need to change "APIENTRY WinMain(....)" in main.cpp to "main()" depending on the type of project you made
Now you can use AutoIt commands in your C++ program. Look at the example main.cpp file for an idea of how to use AutoIt functions. Also, look in the AutoIt3.h file for all the functions and how they are to be used.

Dev C++

1. start a new project
2. go to your Autoit directory (usually C:\Program Files\AutoIt\ )
3. go to the AutoItX/StandardDLL/DevC folder within your Autoit directory
4. copy the following files to your project directory: AutoIt3.h libautoitx3.a AutoItX3.dll main.cpp
5. in Dev-C++, go to Project->Add to project
6. Add the following files to the project: main.cpp AutoIt3.h
NOTE: You may need to remove the "main.cpp" file that Dev-C++ automatically adds before adding the autoit example. just go to Project->Remove from project or right click on the file on the left hand side and click "remove". If it asks you to save click no.
7. Now go to Project->Project Options and click on the Parameters tab
8. Click the button that says "Add library or object"
9. Select the libautoitx3.a file
10. the program should now compile and run. the example opens notepad and sends some text to it.

Now you can use AutoIt commands in your C++ program. Look at the example main.cpp file for an idea of how to use AutoIt functions. Also, look in the AutoIt3.h file for all the functions and how they are to be used.

Using AutoIt Commands

I decided to add a small section on actually using the commands, incase anyone has trouble figuring it out from the example file.
Basically all commands start as:

Code:
Please, Log in or Register to view codes content!

So in AutoIt the command is

Code:
Please, Log in or Register to view codes content!

And using the dll it would be

Code:
Please, Log in or Register to view codes content!

As I said before, all the functions are in the AutoIt3.h file. Look there to see how to use them.

******************************************
*******************************************

If the new AutoIt installer doesn't has some files like libautoitx3.a ,search for other version of autoit.
The instructions are not writted by me,I just finded them, if the steps are little annoying ,pay attention to them

I didn't managed to make this to work, but if anyone is able to follow those steps , could tell me please, if the final c++ compiled exe will still need the Autoit's DLL to work ?

Thankyou and good luck to everyone!

**If you have better ideas or opinions,please post them
 
Paid adv. expire in 2 months
CLICK to buy Advertisement !
westernunion carding Verified & Trusted WesternUnion | MoneyGram | Bank - Transferring [299$ BTC for 2000$ WU]
electronics carding Verified & Trusted Electronics Carding, Carding iPhone, Samsung Carding, MacBook Carding, Laptops Carding
Top Bottom