Jump to content

Setting options with AutoItX3


Guest Matt
 Share

Recommended Posts

This must be a really simple answer but I can't get it :D

How do you set AutoItX options in V3? So far I have

Set oAutoit = WScript.CreateObject("AutoItX3.Control")

oAutoit.AutoItSetOption("WinTitleMatchMode", 2)

However, I get an error about it expecting an "=" somewhere. Oh,

Link to comment
Share on other sites

  • Administrators

VBScript is funny about calling methods/functions. When you save the return value you need brackets, otherwise you don't:

result = oAutoit.AutoItSetOption("WinTitleMatchMode", 2)

or

oAutoit.AutoItSetOption "WinTitleMatchMode", 2

Link to comment
Share on other sites

Guest Guest

OK, thanks for that. New problem now then, how about calling it from VBA?

Set oAutoit = WScript.CreateObject("AutoItX3.Control") gives me a "Run time error 424. Object required" error

Link to comment
Share on other sites

  • Administrators

OK, thanks for that.  New problem now then,  how about calling it from VBA?

Set oAutoit = WScript.CreateObject("AutoItX3.Control") gives me a "Run time error 424.  Object required" error

I don't know VBA, but the WScript will be incorrect (WScript is the WSH/VBScript object not VBA)

Sorry, don't know.

Link to comment
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
 Share

  • Recently Browsing   0 members

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