sl_alagappan Posted April 8, 2004 Posted April 8, 2004 hi all, How to use the AutoitX3.dll in Visual Basic and call the functions? When I tried to reference the Autoit dll, it is not getting reference using the project menu. any suggestions pl?
Dan Posted April 8, 2004 Posted April 8, 2004 have you registered the file with regsvr32 autoit3x.dll ?? if so, using from vb should only require adding a reference to autoitx3 1.0 type library. Private Sub Form_Load() Dim cAutoit As New AUTOITX3Lib.Control cAutoit.CDTray "e:", "open" End Sub Hope this helps!
sl_alagappan Posted April 10, 2004 Author Posted April 10, 2004 registered the dll using regsvr32 and referenced the same in VB But when running yr code, the error raised is "expected user-defined type, not project". any chance?
sl_alagappan Posted April 10, 2004 Author Posted April 10, 2004 Sorry.. missed the .control in AUTOITX3Lib.Control it's ok now.. thanks a lot.
sl_alagappan Posted April 12, 2004 Author Posted April 12, 2004 hi, when using autoitv3 dll in VB, how do I run the following command? When I run the following while loading a form, the error raised is "type mismatch" Private Sub Form_Load() Dim a As Long Dim cAutoit As New AUTOITX3Lib.Control MsgBox "@ComSpec" & " /c " & "d:\psexec \\postmaster d:\utility\shutpm.exe" a = cAutoit.RunWait("@ComSpec" & " /c " & "d:\psexec \\postmaster d:\utility\shutpm.exe", "", "@SW_MAXIMIZE") MsgBox a End Sub
Administrators Jon Posted April 12, 2004 Administrators Posted April 12, 2004 The DLL knows nothing about @comspec or @SW_xxxx. The last parameter is a number not a string. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
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