I need to replace a desktop applications functionality. I'll call it App "A".
The application has defined 2 hot keys one that toggles between it and another window, App "B", and one that triggers keystrokes to App "B" to get data where App "A" can access it. Then tells app "A" to fire off processing of data.. Unfortunately when App "B" is a 64bit application this functionality no longer works.
For now I've hobbled together a work a round solution by using 2 apps with what appears to be similar abilities. AutoIt and a desktop application that allows me to define the 2 hot keys. The SutoItX Dll is great for my processes within App "A" as it uses VBA for event driven tasks.
The second app allows me to define the Hot keys and which windows they belong to.
My fail is on how to use AutoIT to define the hot Keys and link to specific windows.
So as I see this working:
App "A" launches and fires off internal VBA code that in turn sets up HotKeys. If App "B" is not found code shuts down without enabling the hotkeys.
A hot key of CTRL-F1 toggles, activates window, back and forth between App "A and "B" So the hotkey is captured only when either App "A" or "B" is currently the active focus. and swaps the active focus application window.
A hot key of CTRL-F2 from App "B", Send Key strokes to App "B" to place App "B" windows' content into windows clip board then switch to App "A" and send a keystroke, CTRL-F3, to trigger processing the clip board through App "A"'s normal event handlers. App "A" already knows that CTRL-F3 means to run custom VBA code to process the clipboard.
Any help would be appreciated here, thanks.

Just wanted to share this for those of us that work with AutoItx3.dll with our Delphi apps. I hand coded the first header file from a C .h header file, but could only get about 60% of the routines to work (my fault, not autoit) I recently went back, and with many hours work and testing, finally came up with this. autoitx3.pas

The following files are provided to allow .NET use: AutoItX3.Assembly.dll - The .NET Assembly for using AutoItX.AutoItX3.Assembly.xml - The Visual Studio Intellisense help file for the .NET Assembly.AutoItX3.dll - The main AutoItX DLL (x86)AutoItX3_x64.dll - The main AutoItX DLL (x64)Using the Assembly from VB/C# within in Visual Studio is very easy: Add a reference to AutoItX3.Assembly.dll to your projectAdd a using AutoIt; statement in the files you want to use AutoIt functionsWrite code like this C# example:using AutoIt;
...
// Wow, this is C#!
AutoItX.Run("notepad.exe");
AutoItX.WinWaitActive("Untitled");
AutoItX.Send("I'm in notepad");
IntPtr winHandle = AutoItX.WinGetHandle("Untitled");
AutoItX.WinKill(winHandle);Distribute your final executable with the files AutoItX3.Assembly.dll, AutoItX3.dll, AutoItX3_x64.dll.

I see couple of ways to import module , one with specifying absolute path of the file to get imported, by this logic i believe to import a specific module will be like #include <c:\modulepath\duplicatemodule.au3>
but i see some registry changes also made in this link , can someone explain why that registry change is really required.

I am trying to execute a exe file in auto it as elevated previlage , but not successful till now . below are the methods i tried till now.
Disabled UAC access from windows and selected run only as administrator from executable properties. i logged in as administrator but still exe needs to launch as run as administrator.
Used Below methods from forum still no luck. anything i missing? i tried to use powershell.ps1 intead of exe as well.
1. Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, $RUN_LOGON_NOPROFILE, "c:\Exec.exe", "", @SW_SHOWMAXIMIZED)
2. RunWait("C:\Automation\TestScripts\Writefilter.exe", @WindowsDir, @SW_MAXIMIZE) - Std out error
This command gives out put as running with admin rights
#include <MsgBoxConstants.au3>
#include <AutoItConstants.au3>
#include <MsgBoxConstants.au3>
#RequireAdmin
Example()
Func Example()
; Change the username and password to the appropriate values for your system.
Local $sUserName = "Admin"
Local $sPassword = "PASSWORD"
Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, 0, "noetpad.exe", "", @SW_SHOWMAXIMIZED)
; Run Notepad with the window maximized. Notepad is run under the user previously specified.
;~ RunWait(@WindowsDir & "C:\automation\TestScripts\Writefilter.exe", @WindowsDir, @SW_MAXIMIZE)
EndFunc

Hello,
I have below code which execute well when all prerequisite met, when window pop up is not available its throwing an error. i want to capture error instead of error out.
error handling added in the code to capture it but it does not work still giving me error saying Variable must be of type "Object".
$oCurWin.FindAll($treescope_subtree, $oCondition, $pElements)
$oCurWin^ ERROR
How to catch error properly .

Hello,
I have to execute below block of code in elevated previllage, as that particular wmic class will work only with admin previlage.
i am getting out put when i launch autoit as administrator, but i will not be able to launch autoit as admin in this particular case but my user have admin rights.
is there any better way i can run those command as administrator.?
tried below steps:
i have tried #RequireAdmin but that creates a user prompt
Tried using Runas command but gives error as wrong username or password , stuck with that step.

Hi
UPDATED Notes: ===============================================================================
UPDATED: My main and second questions answered. Here the answers:
To add/access WinMenuSelectItem you need to [Thanks to Fernando_Marinho]:
Add AutoItX.Dotnet in Manage NuGet Packages
Right Click in your Project -> Add -> Reference... -> COM ( Type Libraries )than, check the option AutoItX3 1.0 Type Library
using AutoItX3Lib;
AutoItX3 au3 = new AutoItX3();
au3.WinMenuSelectItem("", ...)
My full source code in C# exists in 11 posts in below.
How to access those overloaded methods in AutoitX3 that are not accessible via above method!? Or how to fix AutoitX3 DLL Registration need in target computers without Autoit pre-installed on them!? Please check my post at 14 posts below!
=============================================================================== Original Post:
I was writing a small app in Autoit to close µTorrent app. It was working. Then I try to import AutoItX into C#, but unfortunately this method
WinMenuSelectItem
Couldn't find by IntelliSense and If I typed completely it still give me this message:
Please check the image. I Google it and I found this QA at stackoverflow: Autoit error within C# application I saw they use this line:
au = new AutoItX3Lib.AutoItX3Class();
I figure it how to add 'AutoItX3Lib' to project (by adding 'AutoItX3.dll' to reference) but again! When I use this line:
var au = new AutoItX3Class();
I got this error message: Interop type 'AutoItX3Class' cannot be embedded. Use the applicable interface instead.
My system info:
Visual Studio 2017 Enterprise - v15.5.4
X64 Windows 10 Enterprise 1607
Thanks in advanced
IgImAx

I need to select an item from a SAP combobox, could anyone help me or did something like that? I tried to use some AutoIt functions but without success.
When i try to identify the combobox with au3Info, this is the return:
Could anyone help me with this challange?

I recently tried to use ControlClick method to send a mouse click command to a button in a application, but I noticed that it is not working when I give first parameter as a window handle (HWND). But, when I give class name or window title, it works fine. I used AutoItX3 and VBScript.
Following are the commands I tried in VBScript:
Dim WINAPI: Set WINAPI = WScript.CreateObject("WinAPIWrapper.WINAPI")
Dim AutoItX3: Set AutoItX3 = WScript.CreateObject("AutoItX3.Control")
Dim WindowHandle: WindowHandle = WINAPI.WinAPI_FindWindow("my window title", "my window class") 'Window handle obtains fine by my wrapper function
'Above window handle is obtained as a hexadecimal string. (I.E. - 0x00000000)
I tried it like:
WScript.Echo CStr(AutoItX3.ControlClick(WindowHandle, "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK
WScript.Echo CStr(AutoItX3.ControlClick(CLng("&h" + Replace(WindowHandle, "0x", "")), "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK
WScript.Echo CStr(AutoItX3.ControlClick(000000, "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK
WScript.Echo CStr(AutoItX3.ControlClick(0x00000000, "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK
Only following commands work:
WScript.Echo CStr(AutoItX3.ControlClick("[CLASS:my window class]", "", "[CLASS:Button; INSTANCE:1]")) // WORKS FINE
WScript.Echo CStr(AutoItX3.ControlClick("My window title", "", "[CLASS:Button; INSTANCE:1]")) // WORKS FINE
If any of your suggestions don't work, I will have to write a wrapper function myself to send mouse click commands. I chosen AutoIt V3 because it is good specially when comes to send keystrokes to applications. Please tell me why this won't work when I give window handle as first parameter.
Thanks in advance.

Hi experts.
I'm trying to get this to work:
https://www.autoitscript.com/forum/topic/173949-using-the-autoit-powershell-cmdlets/
but I get an error: error: syntax error (illegal character)
"Import-Module .\"
Can anyone help me?

Hi Experts,
I want to integrate AutoIT with Eclipse to write my code in java for automating the desktop base application, i have integrate jacob 1.18 and verify the dll's also but i am getting How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51 issue.
I am using 32 bit windows xp with java 1.6 version.
Java 1.7 is unsupported in 32 bit windows xp. is there any solution for the same.

Hi Experts,
I am getting error: _ExcelBookOpen() undefined function in auto IT scite whenever i execute any program using functions.
i defined the functions name also but this error is not getting resolved.
_ExcelBookOpen(): undefined function
_ExcelReadCell():undefined function
require your inputs to fix this issue. I'm going through the forums and examples, but can't find anything and follow the suggestions but this issue hasn't got resolved.

I am trying to automate the windows GUI application, in the main window of this application i have one gridview control in it, and when you click on the any row of the gridview separate windows will be opened based on the selection of the row.
we have our existing framework implemented using the core java, i have used AutoITX4java.jar file to automate the above application. and controlCommandListView options used to click on grid view row item. nothing is working.
my question is AutoIT can be used/called directly from java file??? instead of using the AutoITX4java.jar file???
AutoIT supports GridView automation??? like gridview count and gridivew row item click event automation ect...????
Any help would be really appricate!!
Thanks
Srini
srini20483@gmail.com

Hello every body!!!
I was try this code is work in AutoIt (au3)
#include <MsgBoxConstants.au3>
#include <GuiListView.au3>
Global $hWndWindow = WinGetHandle("Form1")
Global $hWndLv = ControlGetHandle($hWndWindow, "", "WindowsForms10.SysListView32.app.0.bf7771_r11_ad11")
MsgBox($MB_SYSTEMMODAL, "", ControlListView($hWndWindow, "", $hWndLv, "GetItemCount"))
_GUICtrlListView_ClickItem($hWndLv, 1, "left", False, 2)
But now, I want to use _GUICtrlListView_ClickItem in C#. I was add reference AutoItX3.dll and AutoItX3.Assembly.dll for my project but i could not found any function which same _GUICtrlListView_ClickItem from them. Please help me

Good day!!! In the process of the script vbs I use as an information window function ToolTip, example: Set objAutoItTT = WScript.CreateObject("AutoItX3.Control")
strTT = "Update Adress Book. " & VbLf & "#############################" & VbLf
objAutoItTT.ToolTip strTT & "Preparation, checks." , 50, 50In the process of writing the script used AutoitX3.dll library version 3.3.8.1 Everything worked great. After upgrading to version 3.3.14.2 of the library, the script works, but the windows are not displayed tooltip. Help me please!!!

Hi, im new to autoit and i have a little problem i have to do a app to start some web pages and some windows base programs oane of them is Skype, the problem is that Skype starts but only in system tray and i do not know how to appear on desktop the code i use is below: public static String jvmBitVersion(){
return System.getProperty("sun.arch.data.model");
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
String jacobDllVersionToUse;
if (jvmBitVersion().contains("32")){
jacobDllVersionToUse = "jacob-1.18-M2-x86.dll";
}
else {
jacobDllVersionToUse = "jacob-1.18-M2-x64.dll";
}
File file = new File("lib", jacobDllVersionToUse);
System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath());
AutoItX x = new AutoItX();
x.run("C:\\Program Files (x86)\\Skype\\Phone\\Skype.exe");
x.sleep(2000);
x.winWaitActive("Skype");
x.winActivate("Skype");
}

It seems the AutoIt community does not much venture into AutoItX and the real programmers do not need much to understand how to implement the DLLs -> is there some guidance with explanantions available? This part of the AutoIt site is definitely not getting as much traffic as the rest. Obviously a lot of assumed knowledge and skill applies... I have searched for AutoItX but can not find a single tutorial. There are examples - but what I would really like is a ZIPped project, that explains the C layout, and the link to the AutoIT DLLs. A bit more narrative than code so that I can also learn how... Is there maybe a static Wiki/FAQ on AutoItX that I have missed?

When I check the list of commands in the Powershell included with Windows 10, I found Assert-AU3IsAdmin, from the module AutoItX. Is anybody else getting this, or did Powershell include AutoItX as one of its modules automatically for everybody? Did you know about this, Jon? To reproduce, start PowerShell and enter "Help Admin". I got Assert-AU3IsAdmin which returns 1 if run as admin and 0 if not. The AU3 in the middle got my attention and I thought to check here. "Help AU3" gave me a huge list of entries. Any ideas?