Jump to content

Recommended Posts

Posted

How do i set up a VB6 program so that i can use the autiit3 scripting in it, without having to put "au3." infront of the command?

Compile the script to an executable?

  • Moderators
Posted

Take a look at the AutoItX3.dll.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

  • Moderators
Posted

Still says that i have to up smthing infromt of the command. like "oautoit."

Err... yeah ... That wouldn't be a problem would it? :P

Or you could just make an autoit script like what was suggested, and call it from your vb script... or an even better idea... make the whole thing in autoit... problem solved.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Err... yeah ... That wouldn't be a problem would it? :P

Or you could just make an autoit script like what was suggested, and call it from your vb script... or an even better idea... make the whole thing in autoit... problem solved.

see that would be no problem, but i needto have sounds recognition in the program, so even if i make it in aotuit3 i still need it to return values to the vb6 progream and then return values to the au3 program...

Posted

there's no way to get rid of that. you have to use the object name before the method. if you're doing a whole bunch of command you can use With

With oautoit 'the object name
.MouseMove()
.WinActivate()
.MouseClick()

and i really have no problem doing that, but how do i make PixelSearch work like that?

  • Moderators
Posted

and i really have no problem doing that, but how do i make PixelSearch work like that?

Download AutoIt if you haven't already... do the regular install... Then go to Program Files\AutoIt3\AutoItX There is a help file right there for you to take a look at, and probably will answer most of your questions.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

How do i set up a VB6 program so that i can use the autiit3 scripting in it, without having to put "au3." infront of the command?

If you refering to the object prefix, then you could make some Subs and Functions.

Here is a VBS concept of doing it:

Dim au3, oShell, pid
Set au3 = WScript.CreateObject("AutoItX3.Control")

'Get return of Run Function

pid = Run("notepad.exe")

'Wait for the window "Untitled" to exist

If WinWaitActive("Untitled", "", 5) Then
    Send "Some text", 0
    Sleep 3000
End If

ProcessClose(pid)

WScript.Quit


Function Run(file)
    file = Chr(34) & file & Chr(34)
    Run = au3.Run(file)
End Function

Function WinWaitActive(title, text, timeout)
    WinWaitActive = au3.WinWaitActive(title, text, timeout)
End Function

Sub Send(sendtext, flag)
    au3.Send sendtext, flag
End Sub

Sub Sleep(time)
    au3.Sleep time
End Sub

Sub ProcessClose(process)
    au3.ProcessClose pid
End Sub

It may spark some ideas for you ?

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
  • Recently Browsing   0 members

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