Msgbox nicht im vordergrund

  • Spoiler anzeigen
    [autoit]

    HotKeySet("{ESC}", "_exit")

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

    #include

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

    GUICreate("D2JSP-Tool", 200, 390)
    $n1 = GUICtrlCreateList("", 5, 5, 190, 200)
    GUICtrlSetData(-1, "Softcore - Price Check|Softcore - USWEST Trading|Softcore - USWEST Ladder Trading|Softcore - USEAST Trading|Softcore - USEAST Ladder Trading|Softcore - EUROPE Trading|Softcore - EUROPE Ladder Trading|Softcore/Hardcore - ASIA Trading|Hardcore - Price Check|Hardcore - USWEST Trading|Hardcore - USEAST Trading|Hardcore - EUROPE Trading|Classic Trading|Low Level Dueling Trading (LLD)|", "item2")
    $n2 = GUICtrlCreateButton("Auswahl in der Liste bestätigen", 3, 195, 193)
    $n3 = GUICtrlCreateInput("Wie oft soll gesucht werden?", 3, 222, 193)
    $n4 = GUICtrlCreateButton("Auswahl der Suchlaufzahl bestätigen", 3, 250, 193)
    $n5 = GUICtrlCreateInput("Wie lange soll pausiert werden?", 3, 278, 193)
    $n6 = GUICtrlCreateButton("Auswahl der Pausenzeit bestätigen", 3, 305, 193)
    $n8 = GUICtrlCreateInput("Nach was soll gesucht werden?", 3, 333, 193)
    $n9 = GUICtrlCreateButton("Bestätigen und starten", 3, 360, 193)

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

    GUISetState()

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

    Do
    $msg = GUIGetMsg()
    ; if 1
    If $msg = $n2 Then
    MsgBox(0, "", GUICtrlRead($n1))
    If GUICtrlRead($n1) = "Softcore - Price Check" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=71"
    EndIf

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

    If GUICtrlRead($n1) = "Softcore - USWEST Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=52"
    EndIf

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

    If GUICtrlRead($n1) = "Softcore - USWEST Ladder Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=168"
    EndIf

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

    If GUICtrlRead($n1) = "Softcore - USEAST Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=53"
    EndIf

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

    If GUICtrlRead($n1) = "Softcore - USEAST Ladder Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=169"
    EndIf

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

    If GUICtrlRead($n1) = "Softcore - EUROPE Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=54"
    EndIf

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

    If GUICtrlRead($n1) = "Softcore - EUROPE Ladder Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=170"
    EndIf

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

    If GUICtrlRead($n1) = "Softcore/Hardcore - ASIA Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=55"
    EndIf

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

    If GUICtrlRead($n1) = "Softcore/Hardcore - ASIA Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=55"
    EndIf

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

    If GUICtrlRead($n1) = "Hardcore - Price Check" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=97"
    EndIf

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

    If GUICtrlRead($n1) = "Hardcore - USWEST Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=99"
    EndIf

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

    If GUICtrlRead($n1) = "Hardcore - USEAST Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=98"
    EndIf

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

    If GUICtrlRead($n1) = "Hardcore - EUROPE Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=25"
    EndIf

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

    If GUICtrlRead($n1) = "Classic Trading" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=271"
    EndIf

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

    If GUICtrlRead($n1) = "Low Level Dueling Trading (LLD)" Then
    $n7 = "http://forums.d2jsp.org/index.php?showforum=123"
    EndIf

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

    $msg = 0
    While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()
    ; if 2
    If $msg = $n4 Then
    MsgBox(0, "", GUICtrlRead($n3))
    $msg = 0
    While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()
    ; if 3
    If $msg = $n6 Then
    MsgBox(0, "", GUICtrlRead($n5))
    $msg = 0

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

    ; ------------

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

    While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()
    ; if 4
    If $msg = $n9 Then
    MsgBox(0, "", GUICtrlRead($n8))
    $msg = 0
    FileDelete("c:\d2jsp\download.bat")
    $file = FileOpen("c:\d2jsp\download.bat", 1)

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

    If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
    EndIf

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

    FileWrite($file, "@echo off" & @CRLF)
    FileWrite($file, "if exist found.ini goto 2" & @CRLF)
    FileWrite($file, ":1" & @CRLF)
    FileWrite($file, "echo [section] > found.ini" & @CRLF)
    FileWrite($file, 'find /I "' & GUICtrlRead($n8) & '" c:\d2jsp\d2.txt >> found.ini' & @CRLF)
    FileWrite($file, "exit" & @CRLF)
    FileWrite($file, ":2" & @CRLF)
    FileWrite($file, "ren found.ini found.txt" & @CRLF)
    FileWrite($file, 'find /I "' & GUICtrlRead($n8) & '" c:\d2jsp\d2.txt >> found.txt' & @CRLF)
    FileWrite($file, "ren found.txt found.ini" & @CRLF)
    FileWrite($file, "exit" & @CRLF)

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

    FileClose($file)

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

    ; ------------

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

    ; While $msg <> $GUI_EVENT_CLOSE
    ; ...
    $g = GUICtrlRead($n5) * 1000
    $c = GUICtrlRead($n3) / 100
    ProgressOn("Durchlaufsanzeige", "Bisherige Suchläufe")
    For $b = 1 To GUICtrlRead($n3) Step +1
    InetGet($n7, "C:\d2jsp\d2.txt", 1)
    Run("C:\d2jsp\download.bat")
    Sleep($g)
    $d = $b / $c
    $e = Round($d, 1)
    ProgressSet($e, $e & " Prozent")
    Next
    MsgBox(3, "Abgeschlossen", "Beenden") ;<<<<<;ProgressSet($b , "Fertig", "Abgeschlossen")

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

    $msg = GUIGetMsg()
    ; Wend
    EndIf
    WEnd
    EndIf
    WEnd
    EndIf
    WEnd
    EndIf

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

    Until $msg = $GUI_EVENT_CLOSE

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

    Func _exit()
    Exit
    EndFunc ;==>_exit

    [/autoit]

    hab hingeschrieben wo die msgbox nicht im vordergund ist. Wie mach ich das die vor dem anderem Fenster ist?

    damit ihr es benutzen könnt müsst ihr eine batch datei machen mit dem namen download und mit dem inhalt:
    @echo off

    if exist found.ini goto 2

    :1
    echo [section] > found.ini
    find /I "need" c:\d2jsp\d2.txt >> found.ini
    exit

    :2
    ren found.ini found.txt
    find /I "need" c:\d2jsp\d2.txt >> found.txt
    ren found.txt found.ini
    exit

    und nen ordner wo es drin ist c:\d2jsp\ also auf c nen d2jsp ordner erstellen oder pfad verändern von wo er die daten download lesen soll

    bernd670 : AutoIt-Tags gesetzt!

    Einmal editiert, zuletzt von bernd670 (13. April 2008 um 12:20)

    • Offizieller Beitrag

    Hallo,

    einfach das Flag für "MsgBox has top-most attribute set" (262144) setzten!

    • Offizieller Beitrag

    Geht das nicht auch mit dem Code-Wizard (Alt-w) im Scite!

  • Zumindest bei der Version, die ich habe, steht das dabei:

    Spoiler anzeigen
    [autoit]

    #Region --- CodeWizard generated code Start ---
    ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes, No, and Cancel, Icon=None
    If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer
    $iMsgBoxAnswer = MsgBox(3,"MirandaVersions","Test")
    Select
    Case $iMsgBoxAnswer = 6 ;Yes

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

    Case $iMsgBoxAnswer = 7 ;No

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

    Case $iMsgBoxAnswer = 2 ;Cancel

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

    EndSelect
    #EndRegion --- CodeWizard generated code End ---

    [/autoit]