Version 28 of AutoIt

Updated 2014-08-09 10:33:10 by HJG

AutoIt is a closed-source freely-downloadable BASIC-like scripting language designed for automating the Windows GUI and general scripting".

Attributes

current version
3.3.8.1
release time
2012-01-29

Download

AuotItDLL.zip : just the DLL

See Also

Description

The days where it was just "a simple tool that can simulate key presses, mouse movements and window commands (maximize, minimize, wait for, etc.) " are long gone.

Example: Bring Application to the Foreground

'Nother example of why it's handy to have AutoIt around: Suppose you've launched a program that puts itself in the background. Rather than use Win32 calls to bring it to the foreground and make it active, you can

exec AutoIt focus.aut '+self.filename' -$TheApplication

where focus.aut has contents

WinShow,%1%,
WinActivate,%1%,

escargo 2006-03-19: What version of AutoIt was this for? How compatible would it be with the current (19 Mar 2006) version?

Wrapper

Michael Jacobson 2002-09: Ffidl wrapper code of the AutoIt DLL.

load ffidl05.dll      ;# load the ffidl package
set DLL AutoItDLL.dll ;# save instead of retypeing this name in for each function
# This dll needs to be in the path or system directory (so it is found by ffidl)

# below are all the public interfaces to AutoIt 
ffidl::callout AUTOIT_BlockInput {int} int [ffidl::symbol $DLL AUTOIT_BlockInput]

ffidl::callout AUTOIT_ClipGet {pointer-utf8} int [ffidl::symbol $DLL AUTOIT_ClipGet]
ffidl::callout AUTOIT_ClipPut {pointer-utf8} int [ffidl::symbol $DLL AUTOIT_ClipPut]

ffidl::callout AUTOIT_DetectHiddenText {int} int [ffidl::symbol $DLL AUTOIT_DetectHiddenText]

ffidl::callout AUTOIT_IfWinActive {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_IfWinActive]
ffidl::callout AUTOIT_IfWinExist {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_IfWinExist]
ffidl::callout AUTOIT_Init {} int [ffidl::symbol $DLL AUTOIT_Init]
ffidl::callout AUTOIT_IniDelete {pointer-utf8 pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_IniDelete]
ffidl::callout AUTOIT_IniRead {pointer-utf8 pointer-utf8 pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_IniRead]
ffidl::callout AUTOIT_IniWrite {pointer-utf8 pointer-utf8 pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_IniWrite]

ffidl::callout AUTOIT_LeftClick {int int} int [ffidl::symbol $DLL AUTOIT_LeftClick]
ffidl::callout AUTOIT_LeftClickDrag {int int int int} int [ffidl::symbol $DLL AUTOIT_LeftClickDrag]

ffidl::callout AUTOIT_MouseMove {int int} int [ffidl::symbol $DLL AUTOIT_MouseMove]
ffidl::callout AUTOIT_MouseGetPosX {} int [ffidl::symbol $DLL AUTOIT_MouseGetPosX]
ffidl::callout AUTOIT_MouseGetPosY {} int [ffidl::symbol $DLL AUTOIT_MouseGetPosY]

ffidl::callout AUTOIT_RightClick {int int} int [ffidl::symbol $DLL AUTOIT_RightClick]
ffidl::callout AUTOIT_RightClickDrag {int int int int} int [ffidl::symbol $DLL AUTOIT_RightClickDrag]

ffidl::callout AUTOIT_Send {pointer-utf8} int [ffidl::symbol $DLL AUTOIT_Send]
ffidl::callout AUTOIT_SetCapslockState {int} int [ffidl::symbol $DLL AUTOIT_SetCapslockState]
ffidl::callout AUTOIT_SetKeyDelay {int} int [ffidl::symbol $DLL AUTOIT_SetKeyDelay]
ffidl::callout AUTOIT_SetStoreCapslockMode {int} int [ffidl::symbol $DLL AUTOIT_SetStoreCapslockMode]
ffidl::callout AUTOIT_SetTitleMatchMode {int} int [ffidl::symbol $DLL AUTOIT_SetTitleMatchMode]
ffidl::callout AUTOIT_SetWinDelay {int} int [ffidl::symbol $DLL AUTOIT_SetWinDelay]
ffidl::callout AUTOIT_Shutdown {int} int [ffidl::symbol $DLL AUTOIT_Shutdown]
ffidl::callout AUTOIT_Sleep {int} int [ffidl::symbol $DLL AUTOIT_Sleep]

ffidl::callout AUTOIT_WinWait {pointer-utf8 pointer-utf8 int} int [ffidl::symbol $DLL AUTOIT_WinWait]
ffidl::callout AUTOIT_WinWaitActive {pointer-utf8 pointer-utf8 int} int [ffidl::symbol $DLL AUTOIT_WinWaitActive]
ffidl::callout AUTOIT_WinWaitNotActive {pointer-utf8 pointer-utf8 int} int [ffidl::symbol $DLL AUTOIT_WinWaitNotActive]
ffidl::callout AUTOIT_WinWaitClose {pointer-utf8 pointer-utf8 int} int [ffidl::symbol $DLL AUTOIT_WinWaitClose]
ffidl::callout AUTOIT_WinHide {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinHide]
ffidl::callout AUTOIT_WinRestore {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinRestore]
ffidl::callout AUTOIT_WinMinimize {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinMinimize]
ffidl::callout AUTOIT_WinMaximize {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinMaximize]
ffidl::callout AUTOIT_WinMinimizeAll {} int [ffidl::symbol $DLL AUTOIT_WinMinimizeAll]
ffidl::callout AUTOIT_WinActivate {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinActivate]
ffidl::callout AUTOIT_WinClose {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinClose]
ffidl::callout AUTOIT_WinMove {pointer-utf8 pointer-utf8 int int int int} int [ffidl::symbol $DLL AUTOIT_WinMove]
ffidl::callout AUTOIT_WinSetTitle {pointer-utf8 pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinSetTitle]
ffidl::callout AUTOIT_WinGetActiveTitle {pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinGetActiveTitle]
ffidl::callout AUTOIT_WinShow {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinShow]
ffidl::callout AUTOIT_WinKill {pointer-utf8 pointer-utf8} int [ffidl::symbol $DLL AUTOIT_WinKill]
ffidl::callout AUTOIT_WinMinimizeAllUndo {} int [ffidl::symbol $DLL AUTOIT_WinMinimizeAllUndo]

# to use any of these fucntion in Tcl just use the assign Tcl proc name (after callout)
# example below will minize all the windows on the screen ;-)
AUTOIT_WinMinimizeAll

Who can help me use ffidl define AU3 function?

///////////////////////////////////////////////////////////////////////////////
// Exported functions
///////////////////////////////////////////////////////////////////////////////

AU3_API void WINAPI AU3_Init(void);
AU3_API long AU3_error(void);

AU3_API long WINAPI AU3_AutoItSetOption(LPCWSTR szOption, long nValue);

AU3_API void WINAPI AU3_BlockInput(long nFlag);

AU3_API long WINAPI AU3_CDTray(LPCWSTR szDrive, LPCWSTR szAction);
AU3_API void WINAPI AU3_ClipGet(LPWSTR szClip, int nBufSize);
AU3_API void WINAPI AU3_ClipPut(LPCWSTR szClip);
AU3_API long WINAPI AU3_ControlClick(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl, LPCWSTR szButton, long nNumClicks, /*[in,defaultvalue(AU3_INTDEFAULT)]*/long nX, /*[in,defaultvalue(AU3_INTDEFAULT)]*/long nY);
AU3_API void WINAPI AU3_ControlCommand(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl, LPCWSTR szCommand, LPCWSTR szExtra, LPWSTR szResult, int nBufSize);
AU3_API void WINAPI AU3_ControlListView(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl, LPCWSTR szCommand, LPCWSTR szExtra1, LPCWSTR szExtra2, LPWSTR szResult, int nBufSize);
AU3_API long WINAPI AU3_ControlDisable(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl);
AU3_API long WINAPI AU3_ControlEnable(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl);
AU3_API long WINAPI AU3_ControlFocus(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl);
AU3_API void WINAPI AU3_ControlGetFocus(LPCWSTR szTitle, LPCWSTR szText, LPWSTR szControlWithFocus, int nBufSize);
AU3_API void WINAPI AU3_ControlGetHandle(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, LPCWSTR szControl, LPWSTR szRetText, int nBufSize);
AU3_API long WINAPI AU3_ControlGetPosX(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl);
AU3_API long WINAPI AU3_ControlGetPosY(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl);
AU3_API long WINAPI AU3_ControlGetPosHeight(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl);
AU3_API long WINAPI AU3_ControlGetPosWidth(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl);
AU3_API void WINAPI AU3_ControlGetText(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl, LPWSTR szControlText, int nBufSize);
AU3_API long WINAPI AU3_ControlHide(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl);
AU3_API long WINAPI AU3_ControlMove(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl, long nX, long nY, /*[in,defaultvalue(-1)]*/long nWidth, /*[in,defaultvalue(-1)]*/long nHeight);
AU3_API long WINAPI AU3_ControlSend(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl, LPCWSTR szSendText, /*[in,defaultvalue(0)]*/long nMode);
AU3_API long WINAPI AU3_ControlSetText(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl, LPCWSTR szControlText);
AU3_API long WINAPI AU3_ControlShow(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl);
AU3_API void WINAPI AU3_ControlTreeView(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl, LPCWSTR szCommand, LPCWSTR szExtra1, LPCWSTR szExtra2, LPWSTR szResult, int nBufSize);

AU3_API void WINAPI AU3_DriveMapAdd(LPCWSTR szDevice, LPCWSTR szShare, long nFlags, /*[in,defaultvalue("")]*/LPCWSTR szUser, /*[in,defaultvalue("")]*/LPCWSTR szPwd, LPWSTR szResult, int nBufSize);
AU3_API long WINAPI AU3_DriveMapDel(LPCWSTR szDevice);
AU3_API void WINAPI AU3_DriveMapGet(LPCWSTR szDevice, LPWSTR szMapping, int nBufSize);

AU3_API long WINAPI AU3_IniDelete(LPCWSTR szFilename, LPCWSTR szSection, LPCWSTR szKey);
AU3_API void WINAPI AU3_IniRead(LPCWSTR szFilename, LPCWSTR szSection, LPCWSTR szKey, LPCWSTR szDefault, LPWSTR szValue, int nBufSize);
AU3_API long WINAPI AU3_IniWrite(LPCWSTR szFilename, LPCWSTR szSection, LPCWSTR szKey, LPCWSTR szValue);
AU3_API long WINAPI AU3_IsAdmin(void);

AU3_API long WINAPI AU3_MouseClick(/*[in,defaultvalue("LEFT")]*/LPCWSTR szButton, /*[in,defaultvalue(AU3_INTDEFAULT)]*/long nX, /*[in,defaultvalue(AU3_INTDEFAULT)]*/long nY, /*[in,defaultvalue(1)]*/long nClicks, /*[in,defaultvalue(-1)]*/long nSpeed);
AU3_API long WINAPI AU3_MouseClickDrag(LPCWSTR szButton, long nX1, long nY1, long nX2, long nY2, /*[in,defaultvalue(-1)]*/long nSpeed);
AU3_API void WINAPI AU3_MouseDown(/*[in,defaultvalue("LEFT")]*/LPCWSTR szButton);
AU3_API long WINAPI AU3_MouseGetCursor(void);
AU3_API long WINAPI AU3_MouseGetPosX(void);
AU3_API long WINAPI AU3_MouseGetPosY(void);
AU3_API long WINAPI AU3_MouseMove(long nX, long nY, /*[in,defaultvalue(-1)]*/long nSpeed);
AU3_API void WINAPI AU3_MouseUp(/*[in,defaultvalue("LEFT")]*/LPCWSTR szButton);
AU3_API void WINAPI AU3_MouseWheel(LPCWSTR szDirection, long nClicks);

AU3_API long WINAPI AU3_Opt(LPCWSTR szOption, long nValue);

AU3_API unsigned long WINAPI AU3_PixelChecksum(long nLeft, long nTop, long nRight, long nBottom, /*[in,defaultvalue(1)]*/long nStep);
AU3_API long WINAPI AU3_PixelGetColor(long nX, long nY);
AU3_API void WINAPI AU3_PixelSearch(long nLeft, long nTop, long nRight, long nBottom, long nCol, /*default 0*/long nVar, /*default 1*/long nStep, LPPOINT pPointResult);
AU3_API long WINAPI AU3_ProcessClose(LPCWSTR szProcess);
AU3_API long WINAPI AU3_ProcessExists(LPCWSTR szProcess);
AU3_API long WINAPI AU3_ProcessSetPriority(LPCWSTR szProcess, long nPriority);
AU3_API long WINAPI AU3_ProcessWait(LPCWSTR szProcess, /*[in,defaultvalue(0)]*/long nTimeout);
AU3_API long WINAPI AU3_ProcessWaitClose(LPCWSTR szProcess, /*[in,defaultvalue(0)]*/long nTimeout);
AU3_API long WINAPI AU3_RegDeleteKey(LPCWSTR szKeyname);
AU3_API long WINAPI AU3_RegDeleteVal(LPCWSTR szKeyname, LPCWSTR szValuename);
AU3_API void WINAPI AU3_RegEnumKey(LPCWSTR szKeyname, long nInstance, LPWSTR szResult, int nBufSize);
AU3_API void WINAPI AU3_RegEnumVal(LPCWSTR szKeyname, long nInstance, LPWSTR szResult, int nBufSize);
AU3_API void WINAPI AU3_RegRead(LPCWSTR szKeyname, LPCWSTR szValuename, LPWSTR szRetText, int nBufSize);
AU3_API long WINAPI AU3_RegWrite(LPCWSTR szKeyname, LPCWSTR szValuename, LPCWSTR szType, LPCWSTR szValue);
AU3_API long WINAPI AU3_Run(LPCWSTR szRun, /*[in,defaultvalue("")]*/LPCWSTR szDir, /*[in,defaultvalue(1)]*/long nShowFlags);
AU3_API long WINAPI AU3_RunAsSet(LPCWSTR szUser, LPCWSTR szDomain, LPCWSTR szPassword, int nOptions);
AU3_API long WINAPI AU3_RunWait(LPCWSTR szRun, /*[in,defaultvalue("")]*/LPCWSTR szDir, /*[in,defaultvalue(1)]*/long nShowFlags);

AU3_API void WINAPI AU3_Send(LPCWSTR szSendText, /*[in,defaultvalue("")]*/long nMode);
AU3_API void WINAPI AU3_SendA(LPCSTR szSendText, /*[in,defaultvalue("")]*/long nMode);
AU3_API long WINAPI AU3_Shutdown(long nFlags);
AU3_API void WINAPI AU3_Sleep(long nMilliseconds);
AU3_API void WINAPI AU3_StatusbarGetText(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, /*[in,defaultvalue(1)]*/long nPart, LPWSTR szStatusText, int nBufSize);

AU3_API void WINAPI AU3_ToolTip(LPCWSTR szTip, /*[in,defaultvalue(AU3_INTDEFAULT)]*/long nX, /*[in,defaultvalue(AU3_INTDEFAULT)]*/long nY);

AU3_API void WINAPI AU3_WinActivate(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API long WINAPI AU3_WinActive(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API long WINAPI AU3_WinClose(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API long WINAPI AU3_WinExists(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API long WINAPI AU3_WinGetCaretPosX(void);
AU3_API long WINAPI AU3_WinGetCaretPosY(void);
AU3_API void WINAPI AU3_WinGetClassList(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, LPWSTR szRetText, int nBufSize);
AU3_API long WINAPI AU3_WinGetClientSizeHeight(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API long WINAPI AU3_WinGetClientSizeWidth(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API void WINAPI AU3_WinGetHandle(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, LPWSTR szRetText, int nBufSize);
AU3_API long WINAPI AU3_WinGetPosX(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API long WINAPI AU3_WinGetPosY(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API long WINAPI AU3_WinGetPosHeight(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API long WINAPI AU3_WinGetPosWidth(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API void WINAPI AU3_WinGetProcess(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, LPWSTR szRetText, int nBufSize);
AU3_API long WINAPI AU3_WinGetState(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API void WINAPI AU3_WinGetText(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, LPWSTR szRetText, int nBufSize);
AU3_API void WINAPI AU3_WinGetTitle(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, LPWSTR szRetText, int nBufSize);
AU3_API long WINAPI AU3_WinKill(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);
AU3_API long WINAPI AU3_WinMenuSelectItem(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, LPCWSTR szItem1, LPCWSTR szItem2, LPCWSTR szItem3, LPCWSTR szItem4, LPCWSTR szItem5, LPCWSTR szItem6, LPCWSTR szItem7, LPCWSTR szItem8);
AU3_API void WINAPI AU3_WinMinimizeAll();
AU3_API void WINAPI AU3_WinMinimizeAllUndo();
AU3_API long WINAPI AU3_WinMove(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, long nX, long nY, /*[in,defaultvalue(-1)]*/long nWidth, /*[in,defaultvalue(-1)]*/long nHeight);
AU3_API long WINAPI AU3_WinSetOnTop(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, long nFlag);
AU3_API long WINAPI AU3_WinSetState(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, long nFlags);
AU3_API long WINAPI AU3_WinSetTitle(LPCWSTR szTitle,/*[in,defaultvalue("")]*/ LPCWSTR szText, LPCWSTR szNewTitle);
AU3_API long WINAPI AU3_WinSetTrans(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, long nTrans);

AU3_API long WINAPI AU3_WinWait(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, /*[in,defaultvalue(0)]*/long nTimeout);
AU3_API long WINAPI AU3_WinWaitA(LPCSTR szTitle, /*[in,defaultvalue("")]*/LPCSTR szText, /*[in,defaultvalue(0)]*/long nTimeout);
AU3_API long WINAPI AU3_WinWaitActive(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, /*[in,defaultvalue(0)]*/long nTimeout);
AU3_API long WINAPI AU3_WinWaitActiveA(LPCSTR szTitle, /*[in,defaultvalue("")]*/LPCSTR szText, /*[in,defaultvalue(0)]*/long nTimeout);
AU3_API long WINAPI AU3_WinWaitClose(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, /*[in,defaultvalue(0)]*/long nTimeout);
AU3_API long WINAPI AU3_WinWaitCloseA(LPCSTR szTitle, /*[in,defaultvalue("")]*/LPCSTR szText, /*[in,defaultvalue(0)]*/long nTimeout);
AU3_API long WINAPI AU3_WinWaitNotActive(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, /*[in,defaultvalue(0)]*/long nTimeout);
AU3_API long WINAPI AU3_WinWaitNotActiveA(LPCSTR szTitle, /*[in,defaultvalue("")]*/LPCSTR szText, /*[in,defaultvalue(0)]*/long nTimeout);


///////////////////////////////////////////////////////////////////////////////