Administrators Jon Posted August 30, 2013 Administrators Share Posted August 30, 2013 (edited) Edit: This is now part of the general AutoIt Beta. Edited December 17, 2013 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 30, 2013 Author Administrators Share Posted August 30, 2013 Usage COM / Native DLL Imports As per help file. C# Add a reference to "AutoItX3.Assembly.dll" to your .NET project. Add "using AutoIt;" Use the wrappers AutoItX.FunctionName You'll need "AutoItX3.Assembly.dll" and "AutoItX3.dll" in the same folder as your .exe. PowerShell Import-Module .\AutoItX3.psd1 Get-Command *AU3* Get-Help Get-AU3WinText Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 30, 2013 Author Administrators Share Posted August 30, 2013 Currently Complete Commands These are the currently complete PowerShell CmdLets (and by extension, the C# wrappers) expandcollapse popupCommandType Name ModuleName ----------- ---- ---------- Cmdlet Assert-AU3IsAdmin AutoItX3 Cmdlet Assert-AU3WinActive AutoItX3 Cmdlet Assert-AU3WinExists AutoItX3 Cmdlet Close-AU3Win AutoItX3 Cmdlet Get-AU3Clip AutoItX3 Cmdlet Get-AU3ControlHandle AutoItX3 Cmdlet Get-AU3ControlPos AutoItX3 Cmdlet Get-AU3ErrorCode AutoItX3 Cmdlet Get-AU3MousePos AutoItX3 Cmdlet Get-AU3StatusbarText AutoItX3 Cmdlet Get-AU3WinCaretPos AutoItX3 Cmdlet Get-AU3WinClassList AutoItX3 Cmdlet Get-AU3WinClientSize AutoItX3 Cmdlet Get-AU3WinHandle AutoItX3 Cmdlet Get-AU3WinPos AutoItX3 Cmdlet Get-AU3WinProcess AutoItX3 Cmdlet Get-AU3WinState AutoItX3 Cmdlet Get-AU3WinText AutoItX3 Cmdlet Get-AU3WinTitle AutoItX3 Cmdlet Initialize-AU3 AutoItX3 Cmdlet Invoke-AU3Run AutoItX3 Cmdlet Invoke-AU3RunAs AutoItX3 Cmdlet Invoke-AU3RunAsWait AutoItX3 Cmdlet Invoke-AU3RunWait AutoItX3 Cmdlet Invoke-AU3Shutdown AutoItX3 Cmdlet Move-AU3Win AutoItX3 Cmdlet Send-AU3Key AutoItX3 Cmdlet Set-AU3Clip AutoItX3 Cmdlet Set-AU3Option AutoItX3 Cmdlet Set-AU3WinOnTop AutoItX3 Cmdlet Set-AU3WinState AutoItX3 Cmdlet Set-AU3WinTitle AutoItX3 Cmdlet Set-AU3WinTrans AutoItX3 Cmdlet Show-AU3WinActivate AutoItX3 Cmdlet Show-AU3WinMinimizeAll AutoItX3 Cmdlet Show-AU3WinMinimizeAllUndo AutoItX3 Cmdlet Wait-AU3Win AutoItX3 Cmdlet Wait-AU3WinActive AutoItX3 Cmdlet Wait-AU3WinClose AutoItX3 Cmdlet Wait-AU3WinNotActive AutoItX3 Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 30, 2013 Author Administrators Share Posted August 30, 2013 Updated the download. Changes since last full AutoIt beta: - Added: AutoItX3_DLL.cs - a C# wrapper for the DLL (in progress). - Added: DLL Import: AU3_WinGetPos. - Added: DLL Import: AU3_ControlGetPos. - Added: DLL Import: AU3_MouseGetPos. - Added: DLL Import: AU3_WinGetClientSize. - Added: DLL Import: AU3_WinGetCaretPos. - Removed: DLL Imports: AU3_WinGetPosX, AU3_WinGetPosY, AU3_WinGetPosWidth, AU3_WinGetPosHeight. - Removed: DLL Imports: AU3_ControlGetPosX, AU3_ControlGetPosY, AU3_ControlGetPosWidth, AU3_ControlGetPosHeight. - Removed: DLL Imports: AU3_MousePosX, AU3_MouseGetPosY - Removed: DLL Imports: AU3_WinGetClientSizeWidth, AU3_WinGetClientSizeHeight. - Removed: DLL Imports: AU3_WinGetCaretPosX, AU3_WinGetCaretPosY. - Removed: DLL Imports: AU3_CDTray, AU3_BlockInput. - Removed: COM Methods: CDTray, BlockInput. - Removed: All registry functions. The support was limited and the host language will certainly have registry functions. - Removed: All Ini file functions. As per registry functions. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted September 1, 2013 Author Administrators Share Posted September 1, 2013 I've updated the download. I've completed the C# wrapper part so there are now friendly wrapper functions for all the DLL Imports. As part of that, instead of supplying a .cs file I've simply compiled it into a CLR 2.0 Assembly that you can just add as a reference to any .NET aware application (Or of course, Visual Studio C# VB, etc). The Assembly files are: AutoItX3.Assembly.dll AutoItX3.Assembly.xml The .xml file is a very sparse documentation/intellisense file. But it's better than nothing The PowerShell cmdlets file has been renamed to AutoItX3.PowerShell.dll (which is turn uses the AutoItX3.Assembly.dll). This is imported using the new manifest file AutoItX3.psd1. Using the Assembly from VB/C# is very easy: - Add a reference to "AutoItX3.Assembly.dll" to your project - Add a "using AutoIt;" statement in the files you want to use AutoIt functions - Write code like this: using AutoIt; ... // No way, this is C# AutoItX.Run("notepad.exe"); AutoItX.WinWaitActive("Untitled"); AutoItX.Send("I'm in notepad"); IntPtr winHandle = AutoItX.WinGetHandle("Untitled"); AutoItX.WinKill(winHandle); Next step is to finish off adding the PowerShell cmdlets for the useful functions and then after that I can see if there are any new functions from AutoIt that should be added. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
James Posted September 1, 2013 Share Posted September 1, 2013 Someone is on fire! Jon 1 Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Kyokoshin Posted November 12, 2013 Share Posted November 12, 2013 wow nice work. Can you add the Tooltip Funktion pls? Link to comment Share on other sites More sharing options...
BrewManNH Posted November 12, 2013 Share Posted November 12, 2013 You can do the ToolTip functions directly from C/C++/<insert language of choice> take a look at the GUIToolTip.au3 file that comes with AutoIt to see how it's done in there. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Kyokoshin Posted November 12, 2013 Share Posted November 12, 2013 hmm but i need a gloabl tooltip, not the gui-version. and i cant find a good solution that works like the au3.tooltip. :/ Link to comment Share on other sites More sharing options...
BrewManNH Posted November 12, 2013 Share Posted November 12, 2013 Not even sure what that means. The tooltips in the GUIToolTip UDF are created using the CreateWindowExW function from user32.dll, you don't need a GUI to use them. You don't even need AutoIt, which was my first point. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
MrGadget Posted November 25, 2013 Share Posted November 25, 2013 Looking for HotKeySet...is it there under another name? Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 30, 2013 Share Posted November 30, 2013 Looking for HotKeySet...is it there under another name? You can't set hot keys in the dll as you need a window handle to receive the events. Use the tools provided by your target language to do this instead. Link to comment Share on other sites More sharing options...
Recommended Posts