Jump to content

interrupt while execution


Recommended Posts

Hi all,

I am new to autoIT3. I was wondering if there is a way in AutoIt to call a function when an expected windows appears. There is no specific time or sequence it may appear.

WinWaitActive works only when we know window will appear, what if the expected window appears after series or execution. Is ther any way to handle such situation?

Thanks all

Link to comment
Share on other sites

a couple of possiblities...

While 1
    If WinActive("Window Name") Then Do_Function()
    Sleep(200)
WEnd

Func Do_Function()
    MsgBox(0x0, "yes", "Do what you want")
    Exit ; ???
EndFunc   ;==>Do_Function



While 1
    If ProcessExists("Program Name.exe") Then Do_Function()
    Sleep(200)
WEnd

Func Do_Function()
    MsgBox(0x0, "yes", "Do what you want")
    Exit ; ???
EndFunc   ;==>Do_Function

8)

NEWHeader1.png

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...