Jump to content

How to assign sleep time for specific object?


Recommended Posts

I would like to know on how to set sleep based on following conditions

Task 1 - open $oIE1 and close it after 5 seconds

Task 2 after 2 seconds of Task 1 - open $oIE2 and close it after 5 seconds

Results show be

Task 1 run at 12:02:00 am to open $oIE1 and close at 12:02:05

Task 2 run at 12:02:02 am to open $oIE2 and close at 12:02:07

#include <IE.au3>
Local $oIE1 = _IECreate("http://www.google.com")
WinSetState(_IEPropertyGet($oIE, "title"), "", @SW_MAXIMIZE)
Sleep(5000) ' After IE1 is opened, close it after 5 seconds, but it would hold the rest of process too.
_IEQuit($oIE1)
Sleep(2000) ' waiting 2 seconds, would it totally hold 7 seconds before processing following task?
Local $oIE2 = _IECreate("http://www.google.com")
WinSetState(_IEPropertyGet($oIE, "title"), "", @SW_MAXIMIZE)
Sleep(5000) ' After IE1 is opened, close it after 5 seconds
_IEQuit($oIE2)

Does anyone have any suggestions?
Thanks in advance for any suggestions

 

 

Edited by oemript
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...