ManFoot Posted June 14, 2011 Share Posted June 14, 2011 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. Link to comment Share on other sites More sharing options...
ManFoot Posted June 14, 2011 Author Share Posted June 14, 2011 Can someone advise if this is possible or not please? If it is can someone advise on how i would do this Link to comment Share on other sites More sharing options...
JohnOne Posted June 14, 2011 Share Posted June 14, 2011 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. Link to comment Share on other sites More sharing options...
ManFoot Posted June 14, 2011 Author Share Posted June 14, 2011 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 Link to comment Share on other sites More sharing options...
JohnOne Posted June 14, 2011 Share Posted June 14, 2011 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 continueThat 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. Link to comment Share on other sites More sharing options...
ManFoot Posted June 15, 2011 Author Share Posted June 15, 2011 Ok Thanks JohnOne. I'll have a look into that. Link to comment Share on other sites More sharing options...
ReFran Posted June 16, 2011 Share Posted June 16, 2011 Have a look at while/wend or do/until and sleep. HTH, Reinhard Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now