WinExists Ubound

  • Hallo Leute,
    ich würde mir gerne ein Script machen, dass in eine Ini schreibt, welche Programme offen sind bzw. welche geöffnet wurden.
    Bis jetzt sieht das bei mir so aus:

    Spoiler anzeigen
    [autoit]

    Global $pro[0] = $partyfans
    $pro[1] = $metin
    $pro[2] = $nostale
    $pro[3] = $web
    $pro[4] = $icq
    $pro[5] = $outlook
    Global $partyfans = "partyfans.com - Community - Mozilla Firefox"
    $metin = "Metin2"
    $nostale = "Nostale"
    $web = "WEB.DE - E-Mail - Suche - DSL - Modem - Shopping - Entertainment - Mozilla Firefox"
    $icq = "ICQ"
    $outlook = "Outlook Express"
    Global $ubound_pro = UBound ($pro)
    Global $end_ubound_pro = $ubound_pro -1

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 to $end_ubound_pro
    WinExists ($pro[$i])
    Next

    [/autoit]

    Wie kann ich das nun machen, dass das in ne Ini geschrieben wird wenn eines dieser Fenster geöffnet ist??

    Danke

  • ich hätte das so gemacht :

    Spoiler anzeigen
    [autoit]

    Dim $Wins[3]
    $Wins[0]="Metin2"
    $Wins[1]="Archiv"
    $Wins[2]="miregal"
    While 1
    For $i=0 to Ubound($Wins,1)-1
    If WinExists($Wins[$i]) Then
    ;Was dann passieren soll falls ein Fenster offen ist
    MsgBox(0,"","Fenster : "&$Wins[$i]&" ist geöffnet")
    EndIf
    Next
    WEnd

    [/autoit]