LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

import autoit

Has anyone imported the dll for either autoit or autohotkey? I would like to use this funcionality but I would rather use direct calls to the dlls rather then create scripts. I have been trying to import autoit all morning and the wizzard only recognizes one function even thought they are defined in the header file. I would also appreciate any suggestions of other ways of getting this functionality. I first tried to use windows api dlls but you have to pass pointers and that is way out of my league.
 
Terrill
0 Kudos
Message 1 of 16
(8,393 Views)
I have AutoIt. Great tool.

I couldn't get the import wizard to work either, but you don't need to use it, as AutoIt has an ActiveX interface which is easier to use. Take a look at the attached example (LabVIEW 8.2) which reproduces the notepad example that ships with AutoIt.
Message 2 of 16
(8,383 Views)

Thanks smercurio_fc.

 

I would still like to do the windows api to remove the middle man. This will have to do because of a tight time frame. Do you know the difference between the AutoIt and IAutoIt class?

 

Terrill

0 Kudos
Message 3 of 16
(8,375 Views)
Well, I'm confused now, as you're now asking to use the Windows API, but not saying what it is that you want to do. Your initial question was how to use AutoIt with LabVIEW. If that's not what you want, what is it, exactly, that you want to do?
0 Kudos
Message 4 of 16
(8,370 Views)
I want to do all the functions that AutoIt does. Mainly, launch an application, get a handle to the window, get a handle to the menu or control and change the values of the controls. The AutoIt code calls the windows api to do this so it would be nice to call the api directly and cut out the middle man. The main problem I have is passing pointers to the api functions and sorting through all the api documentation to figure out how to do what I want to do. Most of the documentation is for creating GUI with the api and not interacting with them.
0 Kudos
Message 5 of 16
(8,367 Views)
Some of the functionality that you're looking for can be found in the lvwutil32 library. You may find the rest from the G Toolbox, published by George Zou. I don't have this toolbox, so I can't say for sure that you will be able to do everything you want with it. You will have to pay for it, though.
0 Kudos
Message 6 of 16
(8,363 Views)
I have seen both of these. If I am going to call a dll other then windows I will stict to AutoIT and the activex interface. Thanks for the info.
0 Kudos
Message 7 of 16
(8,360 Views)

HI,

I am having problems getting AutoIt3 ActiveX to run consistently.

I have download the "AutoIt Example.vi" and tried to run it, but get the following error message:

"Error -2147417851 occurred at The server threw an exception.
 in AutoIt Example.vi

This error code is undefined. No one has provided a description for this code, or you might have wired a number that is not an error code to the error code input."

However if I recompile the vi by pressing Ctrl and run key, and then press the run key then the program works fine.

If I then close down the example vi and open it again I still get the same error message.

I am using Labview v8.2 and AutoIt v3.2.12.1

Thanks in advance

 

0 Kudos
Message 8 of 16
(7,908 Views)
It looks like the ActiveX interface signature changed slightly from the version I had used when I wrote that example. This happens with ActiveX, as anyone who has used ActiveX to automate Excel/Word can attest to. For that specific example the signature for the "Send" and "Sleep" methods were updated/changed. To fix the problem you need to click on the Invoke node and in the popup list of methods just select another method, then click on it again to reselect the original method. This usually works, and is applicable for most ActiveX updates. Attached is the example updated to the 3.2.12.1 version of AutoIt.
0 Kudos
Message 9 of 16
(7,894 Views)
Thanks for the update.  I have tried the attached and get the same result. aka if I press Crtl+Run to compile vi the it runs fine.  If I save and reopen it and press run again then it displays the same error.  I have tried this on two different computers and get the same result.  What version of labview are you using?  Any other suggestions?
0 Kudos
Message 10 of 16
(7,892 Views)