Use Autoit in C++ programs menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Miguel9614's Avatar Member
    Reputation
    25
    Join Date
    Aug 2007
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Use Autoit in C++ programs

    Well I've been a leecher much too long, so I'm way overdue on giving something back. Hopefully this will be useful to some people, as I had trouble with it when I first tried. I apologize if this has been covered before, I have not seen any topics on it.

    This guide is how to set up AutoitX3.dll to use in you C++ programs. I will cover both Visual C++ and Bloodshed Dev-C++. You will need to download AutoIt from AutoIt v3 - Downloads .
    I'd recommend downloading the full installation.

    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:
    AU3_
    . So in AutoIt the command is
    Code:
    Sleep(1000)
    And using the dll it would be
    Code:
    AU3_Sleep(1000);
    As I said before, all the functions are in the AutoIt3.h file. Look there to see how to use them.


    I hope this guide was helpful to anyone. Just trying to contribute

    Use Autoit in C++ programs
  2. #2
    antihero998's Avatar Member
    Reputation
    3
    Join Date
    Sep 2007
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice post +rep

Similar Threads

  1. [guide] how to create a wow bot using autoit (memory reading)
    By zamba1587 in forum WoW Memory Editing
    Replies: 17
    Last Post: 01-23-2017, 03:27 PM
  2. Replies: 0
    Last Post: 04-15-2013, 03:41 PM
  3. Giving Achievments Using Navicat or alt program
    By mastermania in forum WoW EMU Guides & Tutorials
    Replies: 5
    Last Post: 01-03-2009, 01:50 PM
  4. Some Useful AutoIT Scripts
    By barnyonfire1 in forum World of Warcraft Bots and Programs
    Replies: 21
    Last Post: 11-22-2006, 01:25 AM
All times are GMT -5. The time now is 10:40 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search