Ronan M Posted April 5, 2006 Share Posted April 5, 2006 Hi All, I'm in a work environment where I can't install AutoIt, but I can use AutoIt by just going to the executable. I'd like to call the AutoIt from with MS Access VBA using something like the following code. Unfortunately, it doesn't work. Help is greatly appreciated, Ronan San Diego, CA ---------------------- ' Enter on single line in Declarations section of Module window. Declare Function AutoIt Lib "C:\Usefuls\PC_Utils\autoit-v3\AutoItX\AutoItX3.dll" (ByVal hWnd As Long) As Long Sub Test() Dim intWindowHandle As Long intWindowHandle = Screen.ActiveForm.hWnd Dim oShell Dim oAutoIt Dim wshShell '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Initialise Variables & Objects '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Set oAutoIt = AutoIt(intWindowHandle) ..... Link to comment Share on other sites More sharing options...
piccaso Posted April 5, 2006 Share Posted April 5, 2006 I'm in a work environment where I can't install AutoIt...perhaps you can register itregsvr32 AutoItX3.dllcheck 'AutoItX3 1.0 Type Library' in References and do stuff like thatPrivate Sub Test() Dim oAu3 As New AutoItX3Lib.AutoItX3 oAu3.ToolTip ("Help Me...") oAu3.Sleep (5000) oAu3.ToolTip ("") End Sub CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Ronan M Posted April 5, 2006 Author Share Posted April 5, 2006 perhaps you can register itregsvr32 AutoItX3.dllcheck 'AutoItX3 1.0 Type Library' in References and do stuff like thatPrivate Sub Test() Dim oAu3 As New AutoItX3Lib.AutoItX3 oAu3.ToolTip ("Help Me...") oAu3.Sleep (5000) oAu3.ToolTip ("") End Sub Amazingly, this works! Thanks! (Unfortunately, I don't have any points to award -- just kudos) Respectfully, Ronan San Diego, CA Link to comment Share on other sites More sharing options...
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