Jump to content

Call Autoit Dll From Within Vba With Registration


Ronan M
 Share

Recommended Posts

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

I'm in a work environment where I can't install AutoIt...

perhaps you can register it
regsvr32 AutoItX3.dll
check 'AutoItX3 1.0 Type Library' in References and do stuff like that
Private 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

perhaps you can register it

regsvr32 AutoItX3.dll
check 'AutoItX3 1.0 Type Library' in References and do stuff like that
Private 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...