Sign in to follow this  
Followers 0
ManFoot

Very new Newbie Help

7 posts in this topic

Hi all.

First of all if this has been posted before i apologise. I've tried searching but am unable to find anything.

Basically i am completely new to scripting.

What i'm trying to do is script up a manual process.

I am using oautoit.controlgettext to print the status bar.

What i want to do is scan the status bar say every 5 minutes. Then when it says "Scan Finished" to then move on. If it says anything other than "scan finished" then to sleep for 5mins and re-scan.

This is probably really simple to do but being a complete newbie any help is much appreciated.

I am using AutoItx and doing a .vbs script.

Share this post


Link to post
Share on other sites



Can someone advise if this is possible or not please? If it is can someone advise on how i would do this

Share this post


Link to post
Share on other sites

Bumping your own threads within 24 hours is frowned upon here.

If you are using autoitx from VBS I doubt you can be as noob as you say, nonetheless, it will help your cause to provide some code that you have tried.

And my suggestion would be to complete the task in autoit3 first, then armed with a working script, port it to your VBS.


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

Every forum is different. Will know for next time though.

This is to show how basic it is.

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

oAutoIt.WinActivate "**************", ""

oAutoIt.WinSetState "********", "", oAutoIt.SW_MAXIMIZE

oAutoIt.MouseClick "left", 149, 55

oAutoIt.Sleep 3600000

text = oAutoIt.ControlGetText("********","","msctls_statusbar321")

WScript.Echo "status bar says: " & text

That's the first command. As you can see it's a simple click and read the status bar. So it runs and clicks on the button i want. And the status bar reads. But how do i then say. If status bar says anything other than "Scan Complete" then sleep for 5 minutes. Then re-check status bar. If status bar reads "Scan Complete" then continue

Share this post


Link to post
Share on other sites

But how do i then say. If status bar says anything other than "Scan Complete" then sleep for 5 minutes. Then re-check status bar. If status bar reads "Scan Complete" then continue

That is a VBS thing, I dont know its syntax.

If I were you I'd search "if else vbs" into google.


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

Ok Thanks JohnOne. I'll have a look into that.

Share this post


Link to post
Share on other sites

Have a look at while/wend or do/until and sleep.

HTH, Reinhard

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