unedliche öffnung von fenster!!!!!!

  • Hallo,
    ich habe ein großes problem(bin nur ein armseliger anfänger) denn ich weiß nit weiter ;( ?( ?( ?( ?( ?(
    ich habe mir den unteren skript von einem mitglied bekommen nur weiß ich nicht wie ich das jetzt kombienieren soll mit dem fester oben ,sodass der skript unendlich aufgeht
    bitte um schnelle antwort vielen dank ;)
    wenn es geht bitte alles in einem skriptdanke :D

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 350, 233, 193, 125)
    $Button1 = GUICtrlCreateButton("start", 112, 136, 113, 49, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    ; das untere ist die unedliche funktion und das obere ist das fenster
    ;dashier stand dabei:
    ; MsgBox was Skript nicht anhält
    ;Mit dieser UDF ist es möglich, eine MsgBox zu erstellen, was das Skript nicht anhält. Man kann die Icons ändern (0,16,32,48,64) und man kann titel und text bestimmen statt der funktion msgbox(icon,titel,text) muss man stattdessen tcc_msgbox(icon,titel,text) benutzen als extra kann man auch die x und y position einstellen, falls man nix schreibt, befindet sich das fenster in der mitte... ansonsten könnt ihr noch was verändern, falls ihr was braucht (z.B. 2 buttons oder so)

    while 1
    $msg=GuiGetMsg()
    If $msg=$button1 Then tcc_msgbox($icon,$title,$text, $x=-1, $y=-1)()
    WEnd

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

    Func tcc_msgbox($icon,$title,$text, $x=-1, $y=-1)
    If $icon=0 Then
    $msg = GUICreate($title&" - TCC", 16+StringLen($text)*7, 100, $x, $y,0x80000)
    Else
    $msg = GUICreate($title&" - TCC", 80+StringLen($text)*7, 100, $x, $y,0x80000)
    GUICtrlCreateIcon(@SystemDir&"\\user32.dll", 0, 8, 8, 32, 32)
    EndIf
    If $icon=16 Then
    GUICtrlSetImage(-1,@SystemDir&"\\user32.dll",-4)
    ElseIf $icon=32 Then
    GUICtrlSetImage(-1,@SystemDir&"\\user32.dll",-3)
    ElseIf $icon=48 Then
    GUICtrlSetImage(-1,@SystemDir&"\\user32.dll",-2)
    ElseIf $icon=64 Then
    GUICtrlSetImage(-1,@SystemDir&"\\user32.dll",-5)
    EndIf
    If $icon=0 Then
    GUICtrlCreateLabel($text,8, 16,StringLen($text)*7, 17,1)
    $btn_ok = GUICtrlCreateButton("OK", (16+StringLen($text)*7)/2-37, 45, 75, 22, 0)
    Else
    GUICtrlCreateLabel($text, 64, 16,StringLen($text)*7, 17)
    $btn_ok = GUICtrlCreateButton("OK", (80+StringLen($text)*7)/2-37, 45, 75, 22, 0)
    EndIf
    GUISetState(@SW_SHOW)
    EndFunc

    [/autoit]
    • Offizieller Beitrag

    Hi,

    so geht dein Skript zumindest. Was du erreichen willst ist mir indes unklar.

    Spoiler anzeigen
    [autoit]


    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 350, 233, 193, 125)
    $Button1 = GUICtrlCreateButton("start", 112, 136, 113, 49, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    ; das untere ist die unedliche funktion und das obere ist das fenster
    ;dashier stand dabei:
    ; MsgBox was Skript nicht anhält
    ;Mit dieser UDF ist es möglich, eine MsgBox zu erstellen, was das Skript nicht anhält. Man kann die Icons ändern (0,16,32,48,64) und man kann titel und text bestimmen statt der funktion msgbox(icon,titel,text) muss man stattdessen tcc_msgbox(icon,titel,text) benutzen als extra kann man auch die x und y position einstellen, falls man nix schreibt, befindet sich das fenster in der mitte... ansonsten könnt ihr noch was verändern, falls ihr was braucht (z.B. 2 buttons oder so)

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

    While 1
    $msg = GUIGetMsg()
    If $msg = $Button1 Then tcc_msgbox(16, "$title", "$text")
    WEnd

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

    Func tcc_msgbox($icon, $title, $text, $x = -1, $y = -1)
    If $icon = 0 Then
    $msg = GUICreate($title & " - TCC", 16 + StringLen($text) * 7, 100, $x, $y, 0x80000)
    Else
    $msg = GUICreate($title & " - TCC", 80 + StringLen($text) * 7, 100, $x, $y, 0x80000)
    GUICtrlCreateIcon(@SystemDir & "\\user32.dll", 0, 8, 8, 32, 32)
    EndIf
    If $icon = 16 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -4)
    ElseIf $icon = 32 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -3)
    ElseIf $icon = 48 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -2)
    ElseIf $icon = 64 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -5)
    EndIf
    If $icon = 0 Then
    GUICtrlCreateLabel($text, 8, 16, StringLen($text) * 7, 17, 1)
    $btn_ok = GUICtrlCreateButton("OK", (16 + StringLen($text) * 7) / 2 - 37, 45, 75, 22, 0)
    Else
    GUICtrlCreateLabel($text, 64, 16, StringLen($text) * 7, 17)
    $btn_ok = GUICtrlCreateButton("OK", (80 + StringLen($text) * 7) / 2 - 37, 45, 75, 22, 0)
    EndIf
    GUISetState(@SW_SHOW)
    EndFunc ;==>tcc_msgbox

    [/autoit]

    Mega

  • Hallo,
    vielen dank ;):D der hilfe bin etwas weiter gekommen nur ene frage wie bekomme ich die fenster in verschiedene positionen ?(?(?(

    Spoiler anzeigen
    [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 350, 233, 193, 125)
    $Button1 = GUICtrlCreateButton("start", 112, 136, 113, 49, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    ; das untere ist die unedliche funktion und das obere ist das fenster
    ;dashier stand dabei:
    ; MsgBox was Skript nicht anhält
    ;Mit dieser UDF ist es möglich, eine MsgBox zu erstellen, was das Skript nicht anhält. Man kann die Icons ändern (0,16,32,48,64) und man kann titel und text bestimmen statt der funktion msgbox(icon,titel,text) muss man stattdessen tcc_msgbox(icon,titel,text) benutzen als extra kann man auch die x und y position einstellen, falls man nix schreibt, befindet sich das fenster in der mitte... ansonsten könnt ihr noch was verändern, falls ihr was braucht (z.B. 2 buttons oder so)

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

    While 1
    $msg = GUIGetMsg()
    If $msg=-3 Then Exit
    If $msg = $Button1 Then tcc_msgbox(16, "Virus", "Ich bin dein Virus")
    WEnd

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

    Func tcc_msgbox($icon = 16, $title = "Virus", $text = "Ich bin dein Virus", $x = -1, $y = -1)
    If $icon = 0 Then
    $msg = GUICreate($title & " - TCC", 16 + StringLen($text) * 7, 100, $x, $y, 0x80000)
    Else
    $msg = GUICreate($title & " - TCC", 80 + StringLen($text) * 7, 100, $x, $y, 0x80000)
    GUICtrlCreateIcon(@SystemDir & "\\user32.dll", 0, 8, 8, 32, 32)
    EndIf
    If $icon = 16 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -4)
    ElseIf $icon = 32 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -3)
    ElseIf $icon = 48 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -2)
    ElseIf $icon = 64 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -5)
    EndIf
    If $icon = 0 Then
    GUICtrlCreateLabel($text, 8, 16, StringLen($text) * 7, 17, 1)
    $btn_ok = GUICtrlCreateButton("OK", (16 + StringLen($text) * 7) / 2 - 37, 45, 75, 22, 0)
    Else
    GUICtrlCreateLabel($text, 64, 16, StringLen($text) * 7, 17)
    $btn_ok = GUICtrlCreateButton("OK", (80 + StringLen($text) * 7) / 2 - 37, 45, 75, 22, 0)
    EndIf
    GUISetState(@SW_SHOW)

    for $i=1 to 20 ; das hat gefehlt
    tcc_msgbox(16, "Virus", "Ich bin dein Virus")
    next

    EndFunc ;==>tcc_msgbox

    [/autoit]

    3 Mal editiert, zuletzt von salvatore.luca (30. Dezember 2008 um 11:16)

    • Offizieller Beitrag

    So einen Mist unterstützen wir hier nicht. Aber weil es so einfach ist, hier mal ein Tipp.

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 350, 233, 193, 125, -1, $WS_EX_TOOLWINDOW)
    $Button1 = GUICtrlCreateButton("start", 112, 136, 113, 49, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    HotKeySet("{ESC}", '_end')
    ; das untere ist die unedliche funktion und das obere ist das fenster
    ;dashier stand dabei:
    ; MsgBox was Skript nicht anhält
    ;Mit dieser UDF ist es möglich, eine MsgBox zu erstellen, was das Skript nicht anhält. Man kann die Icons ändern (0,16,32,48,64) und man kann titel und text bestimmen statt der funktion msgbox(icon,titel,text) muss man stattdessen tcc_msgbox(icon,titel,text) benutzen als extra kann man auch die x und y position einstellen, falls man nix schreibt, befindet sich das fenster in der mitte... ansonsten könnt ihr noch was verändern, falls ihr was braucht (z.B. 2 buttons oder so)

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

    While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then Exit
    If $msg = $Button1 Then
    For $i = 0 To 20
    tcc_msgbox(16, "Virus", "Ich bin dein Virus", Random(0, @DesktopWidth, 1), Random(0, @DesktopHeight))
    Next
    EndIf
    WEnd

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

    Func tcc_msgbox($icon = 16, $title = "Virus", $text = "Ich bin dein Virus", $x = -1, $y = -1)
    If $icon = 0 Then
    $msg = GUICreate($title & " - TCC", 16 + StringLen($text) * 7, 100, $x, $y, 0x80000, $WS_EX_TOOLWINDOW)
    Else
    $msg = GUICreate($title & " - TCC", 80 + StringLen($text) * 7, 100, $x, $y, 0x80000, $WS_EX_TOOLWINDOW)
    GUICtrlCreateIcon(@SystemDir & "\\user32.dll", 0, 8, 8, 32, 32)
    EndIf
    If $icon = 16 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -4)
    ElseIf $icon = 32 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -3)
    ElseIf $icon = 48 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -2)
    ElseIf $icon = 64 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -5)
    EndIf
    If $icon = 0 Then
    GUICtrlCreateLabel($text, 8, 16, StringLen($text) * 7, 17, 1)
    $btn_ok = GUICtrlCreateButton("OK", (16 + StringLen($text) * 7) / 2 - 37, 45, 75, 22, 0)
    Else
    GUICtrlCreateLabel($text, 64, 16, StringLen($text) * 7, 17)
    $btn_ok = GUICtrlCreateButton("OK", (80 + StringLen($text) * 7) / 2 - 37, 45, 75, 22, 0)
    EndIf
    GUISetState(@SW_SHOW)
    EndFunc ;==>tcc_msgbox

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

    Func _end()
    Exit (0)
    EndFunc ;==>_end

    [/autoit]

    Mega

    • Offizieller Beitrag

    Hi,

    kein Problem. Habe deine Icons vergessen :D

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 350, 233, 193, 125, -1, $WS_EX_TOOLWINDOW)
    $Button1 = GUICtrlCreateButton("start", 112, 136, 113, 49, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    Local $icon_A[4] = [16, 32, 48, 64]

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

    HotKeySet("{ESC}", '_end')
    ; das untere ist die unedliche funktion und das obere ist das fenster
    ;dashier stand dabei:
    ; MsgBox was Skript nicht anhält
    ;Mit dieser UDF ist es möglich, eine MsgBox zu erstellen, was das Skript nicht anhält. Man kann die Icons ändern (0,16,32,48,64) und man kann titel und text bestimmen statt der funktion msgbox(icon,titel,text) muss man stattdessen tcc_msgbox(icon,titel,text) benutzen als extra kann man auch die x und y position einstellen, falls man nix schreibt, befindet sich das fenster in der mitte... ansonsten könnt ihr noch was verändern, falls ihr was braucht (z.B. 2 buttons oder so)

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

    While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then Exit
    If $msg = $Button1 Then
    For $i = 0 To 20
    tcc_msgbox($icon_A[Random(0, 3, 1)], "Virus", "Ich bin dein Virus", Random(0, @DesktopWidth, 1), Random(0, @DesktopHeight))
    Next
    EndIf
    WEnd

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

    Func tcc_msgbox($icon = 16, $title = "Virus", $text = "Ich bin dein Virus", $x = -1, $y = -1)
    If $icon = 0 Then
    $msg = GUICreate($title & " - TCC", 16 + StringLen($text) * 7, 100, $x, $y, 0x80000, $WS_EX_TOOLWINDOW)
    Else
    $msg = GUICreate($title & " - TCC", 80 + StringLen($text) * 7, 100, $x, $y, 0x80000, $WS_EX_TOOLWINDOW)
    GUICtrlCreateIcon(@SystemDir & "\\user32.dll", 0, 8, 8, 32, 32)
    EndIf
    If $icon = 16 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -4)
    ElseIf $icon = 32 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -3)
    ElseIf $icon = 48 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -2)
    ElseIf $icon = 64 Then
    GUICtrlSetImage(-1, @SystemDir & "\\user32.dll", -5)
    EndIf
    If $icon = 0 Then
    GUICtrlCreateLabel($text, 8, 16, StringLen($text) * 7, 17, 1)
    $btn_ok = GUICtrlCreateButton("OK", (16 + StringLen($text) * 7) / 2 - 37, 45, 75, 22, 0)
    Else
    GUICtrlCreateLabel($text, 64, 16, StringLen($text) * 7, 17)
    $btn_ok = GUICtrlCreateButton("OK", (80 + StringLen($text) * 7) / 2 - 37, 45, 75, 22, 0)
    EndIf
    GUISetState(@SW_SHOW)
    EndFunc ;==>tcc_msgbox

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

    Func _end()
    Exit (0)
    EndFunc ;==>_end

    [/autoit]

    Mega

  • Vielen Dank der hilfe ich bin überglücklich :rock::thumbup::thumbup:
    aber weißt du vielleicht auch wie man ein ton hinzufügen kann also ein pipsen bei jedem öffnen der fenster (vom speaker) ?? ?(?(?(
    da drauf bin ich durch ein video im youtube gekommen plus ein mitglied ;)
    da ich viellech wissen will wollte ich nun mal wissen wie das geht :D

  • @all: Seid mal nicht so. Ihr wart auch irgendwann einmal Anfänger und wusstet fast nichts. Da wolltet ihr auch nicht, dass jeder kommt und sagt "Das reicht jetzt, finde ich." (Im Sinne von "hau ab und such hilfe wo anders! So blöde Fragen beantworte ich nicht) oder "So einen Mist unterstützen wir hier nicht." Er wusste/weiß es eben nicht besser. Jeder ist mal ganz am Anfang und versucht zu lernen. Wenn ihr nicht helfen wollt, braucht ihr nichts zu posten.

    So b2t:
    Logisch denken. Was kommt aus dem Lautsprecher des Computers? Ein Piepston. Und was heißt "Piepston" auf englisch? "Beep" (braucht nur in einen Online-Übersetzer eingeben). Mehr brauchst du dazu auch gar nicht

  • Mich stört einfach die Verwendung von AutoIt zum schreiben von "Spaß"viren.
    unendlich viele Messageboxen, jeweils ein beep, OMG