Sign in to follow this  
Followers 0
mrmasterminh

VB and AutoItX

4 posts in this topic

What steps do I have to go through to use Autoit functions in my VBscript?? Sorry I am very new to everything

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

I have not used it at all, but from that last post and link, I presume......;

1. Set up your object;

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

1.a - Use you usual syntax for if .. etc lines which do not need the AutoIt Syntax if you want.. then

2. Add to the beginning of every line;

oAutoit.

eg

oAutoit.WinWait title, text

3. Make a few changes directly;

eg

Exit

becomes

oAutoit.quit

I'll be interested to see how you go!

Best, Randall

Edited by randallc

Share this post


Link to post
Share on other sites

Hey randallc!

I tried your perscribed code as a VBScript and it worked like a charm except for one minor detail. I received an error regarding this statement:

oAutoIt.quit

In checking the documentation, I didn't see a quit method listed. I'm not terribly familiar with how VBScript handles memory, so I replaced it with

Set oAutoIt = Nothing

It ran with no errors.

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  
Followers 0