Jump to content

Waiting for apllication without winwait..


Recommended Posts

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]

Link to comment
Share on other sites

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())
Link to comment
Share on other sites

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
Link to comment
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())
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...