schoel Posted January 29, 2009 Posted January 29, 2009 Hello, I am sure my question has been asked before but after search for it, I can not find anything, probably because I don't know what to search for. How do I get Autoit to work within C++? I want to do it without any IDEs Thanks for any help Joel
Authenticity Posted January 29, 2009 Posted January 29, 2009 Like what? calling AutoIt functions within your C++ project?
martin Posted January 29, 2009 Posted January 29, 2009 Hello,I am sure my question has been asked before but after search for it, I can not find anything, probably because I don't know what to search for.How do I get Autoit to work within C++? I want to do it without any IDEsThanks for any helpJoelYou need AutoItX. It's supplied with the AutoIt download, look in Program Files\AutoIt3\AutoItX. There's a help file there to explain it all. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
syko Posted January 29, 2009 Posted January 29, 2009 i look in autoitx help file but it give no help, only C++ code. could someone give example of how to do a few things in C++ with the autoit dll?
Authenticity Posted January 29, 2009 Posted January 29, 2009 // Empty project additions: // Added "AutoIt3.h" include // Added "AutoItX3.lib" to the input linker libraries // // AutoItX3.dll needs to be in the run path during execution #include <Windows.h> #include <tchar.h> #include "AutoIt3.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // You can now call AutoIt commands, e.g. to send the keystrokes "hello" AU3_Sleep(1000); AU3_Run(_T("notepad.exe"), _T(""), 1); AU3_WinWaitActive(_T("Untitled -"), _T(""), 0); AU3_Send(_T("Hello{!}"), 0); // Get the text in the status bar //char szText[1000]; //AU3_StatusbarGetText("Untitled -", "", 2, szText, 1000); //MessageBox(NULL, szText, "Text:", MB_OK); return 0; } This is the example file provided with AutoIt installation. You'll need to change few things because for some reason it call function with LPCWSTR instead of LPCTSTR so you'll need to use the wide version or just change every occurrence using CTRL+H in the development environment as an easy solution. Also make sure the dll is in the same folder as the project or the system's folder, and that the linker input includes the AutoItX3.lib file.
martin Posted January 29, 2009 Posted January 29, 2009 i look in autoitx help file but it give no help, only C++ code. could someone give example of how to do a few things in C++ with the autoit dll?Do you mean it only give VB code?For a C++ example look in \Program Files\AutoIt3\AutoItX\StandardDLL\VC6\Example.For support it's best to use use the ActiveX/COM Help and Support (AutoItX) forum. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Developers Jos Posted January 29, 2009 Developers Posted January 29, 2009 ... and it also helps when you have basic understanding of C++. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
rahoolm Posted August 31, 2010 Posted August 31, 2010 (edited) Thanks to Authenticity! Edited August 31, 2010 by rahoolm
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now