01-27-2017, 02:49 PM
Don't know, I cannot test. What error it shows in QM output?
---------------------------------------------------------
This macro shows various ways of using a COM dll.
Macro Macro2772
---------------------------------------------------------
This macro shows various ways of using a COM dll.
Macro Macro2772
;;this works, if the COM dll is registered
;typelib AUTOIT "C:\Program Files (x86)\AutoIt3\AutoItX\AutoItX3.dll"
;AUTOIT.AutoItX3 ai._create
;;this also works, if the COM dll is registered
;IDispatch ai._create("AutoItX3.Control")
;this will work in exe on computers where the COM dll is not registered
typelib AUTOIT "C:\Program Files (x86)\AutoIt3\AutoItX\AutoItX3.dll"
AUTOIT.AutoItX3 ai._create(0 "C:\Program Files (x86)\AutoIt3\AutoItX\AutoItX3.dll")
;The first path - where is the dll on your computer when creating exe.
;The second path - where is the dll when the exe runs.
;this works in any case
ai.Run("notepad.exe" "" 1)
ai.WinWaitActive("Untitled - Notepad" "" 0)
ai.Send("This is some text." 0)
;;this works works only if registered
;IDispatch d=ai
;d.Run("notepad.exe" "" 1)
;d.WinWaitActive("Untitled - Notepad")
;d.Send("This is some text.")