Jump to content
Sign in to follow this  
mega128

interrupt while execution

Recommended Posts

mega128

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

Share this post


Link to post
Share on other sites
Valuater

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

Share this post


Link to post
Share on other sites
mega128

Thanks very much both of you for quick response. I guess I was looking for ADLibEbable really.

Thanks again

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  

×