Sign in to follow this  
Followers 0
GrungeRocker

Waiting for apllication without winwait..

5 posts in this topic

i want to disable a window when its opened ..

it should look loke

if classname=aprogram is @opened then...

or sth like that^^

is there a way??

so in clear words^^

my program should run normally while waiting for a application to run^^


[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

While 1
While WinExists("some program title") = 0
sleep(500);milliseconds
WEnd;;(Ends when window exists)
WinSetState("some program title", "", @SW_DISABLE)
WEnd (loops indefinately)

That's the only way I can think of doing it...other than WinWait (WinExist won't pause execution).

Edited by MSLx Fanboy

Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

AdlibEnable() could do this.

AdlibEnable('Wait')

; Running script.
; Window disabled now.
AdlibDisable()


Func Wait()
    If WinExists('title') Then WinSetState('title', '', @SW_DISABLE)
EndFunc

Edit: Or alittle different:

AdlibEnable('Wait')

; Running script.
; Window disabled now

Func Wait()
    If WinExists('title') Then
        WinSetState('title', '', @SW_DISABLE)
        AdlibDisable()
    EndIf
EndFunc

:(

Edited by MHz

Share this post


Link to post
Share on other sites

Always wanted to see a functional AdLibEnable() script! It continues to wait until the AdLib is disabled and/or exit or other similar function is passed?


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

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