Jump to content
Sign in to follow this  
akroon

Use autoit library on vb

Recommended Posts

akroon

Goodmornig, i need use one autoit library on vb 2010. How can i do it? 

Thanx.

Share this post


Link to post
Share on other sites
akroon

i have search but i didn't find any example  : i have already incluse AutoItX3Lib for generic controls but i want use .dll developed for autoit.

please help me.

Edited by akroon

Share this post


Link to post
Share on other sites
JohnOne

So you cannot find anything about VB and AutoItX in the AutoItX helpfile?

That's odd.

Because as soon as I open it it says most examples are in VB style format.

And I search this forum and find tons of stuff.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
akroon

i have been insert the autoitx3 in VB but thats not my problem! In short i want use Fast Find library with VB 

Share this post


Link to post
Share on other sites
Laymanball

Two ways for using AutoItX3 into the vb.net

1. References browse autoitx3.dll

2. Created Object same as autoitx3 sample code.

If you wanted register autoitx3 for .net namespace, Copy and paste autoitx3;dll into System32 folder and run register dll now.

au3clip.jpg

=================================================================================

When register dll finish , will see name autoitx3 into reference Com .net

 

clipau3.jpg

===================================================================================

Download: AutoItX3DLL_Register.exe Click here

===================================================================================

Example: Reference Browse and Reference Com

Public Class Form1
    Inherits System.Windows.Forms.Form

    Private WithEvents refBtn As System.Windows.Forms.Button
    Private WithEvents comBtn As System.Windows.Forms.Button

    Public Sub New()
        MyBase.New()
        InitializeComponent()
        refBtn = New System.Windows.Forms.Button
        comBtn = New System.Windows.Forms.Button
        refBtn.Text = "Reference Browse"
        comBtn.Text = "Reference Com"
        refBtn.Width = 120
        comBtn.Width = refBtn.Width
        refBtn.Location = New System.Drawing.Point(20, 100)
        comBtn.Location = New System.Drawing.Point(150, 100)
        refBtn.Cursor = Cursors.Hand
        comBtn.Cursor = Cursors.Hand
        Me.Controls.AddRange(New Control() {refBtn, comBtn})
    End Sub

    Private Sub refBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles refBtn.Click
        Dim oAutoIt As New AutoItX3Lib.AutoItX3
        oAutoIt.ToolTip("Hello World!")
        oAutoIt.Sleep(1000)
        oAutoIt.ToolTip("")
    End Sub

    Private Sub comBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comBtn.Click
        Dim oAutoIt As System.Object
        oAutoIt = CreateObject("AutoItX3.Control")
        oAutoIt.ToolTip("Hello World!")
        oAutoIt.Sleep(1000)
        oAutoIt.ToolTip("")
        oAutoIt = Nothing
    End Sub
End Class

=================================================================================

Sample code : Using Dll Call

Imports System.Runtime.InteropServices

Public Class Form1

    <DllImport("AutoItX3.dll", CharSet:=CharSet.Auto, EntryPoint:="AU3_ToolTip")> _
    Private Shared Function ToolTip(ByVal szTip As String, ByVal nX As Integer, ByVal nY As Integer) As Boolean
    End Function

    Public Shared Sub ToolTip(ByVal szTip As String)
        ToolTip(szTip, -2147483647, -2147483647)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ToolTip("Hello World!")
        System.Threading.Thread.Sleep(1000)
        ToolTip("")
    End Sub
End Class
Edited by Laymanball

My Sample Script

Download: VistaDesktopIconsChangerForXp.au3 (Com,Doc and Bin only) http://www.4shared.com/rar/NMHYL5Igba/VistaDesktopIconsChangerForXp_.html

                     VistaDesktopIconsChangerForXp.exe (Resources) http://www.4shared.com/rar/nzs7Mb1gba/VistaDesktopIconsChangerForXp_.html

Share this post


Link to post
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
Sign in to follow this  

×