1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. andygo

Beiträge von andygo

  • Downloaddetails anzeigen?

    • andygo
    • 20. Dezember 2009 um 11:57
    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    $uplog = FileSelectFolder("Ordner wählen... ", "")
    if stringlen ($uplog) > 3 then $uplog &= "\"
    if stringinstr ($uplog, ":\") = 0 then
    $uplog = 0
    msgbox(64,"Test","Vorgang auf Wunsch abgebrochen.")
    exit
    endif
    $download = InetGetSize ( "http://hilfe.telekom.de/dlp/eki/downloads/Internet_Software/Software%206.0%20f.%20WinXP%20u.%20Vista/T-Online_6.0.exe", 1 )
    $Form1 = GUICreate("Test", 300, 120)
    $Button1 = GUICtrlCreateButton("Bitte warten...", 100, 10, 100, 25, $WS_GROUP)
    $Progress1 = GUICtrlCreateProgress(20, 55, 260, 25)
    $label1 = GUICtrlCreatelabel("T-Online_6.0.exe", 21, 38, 260, 15 )
    $label2 = GUICtrlCreatelabel("0 KB von " & int($download/1024) & " KB", 21, 84, 260, 15 )
    GUISetState(@SW_SHOW)
    Opt("GuiOnEventMode", 0)
    if $download > 0 then
    $update = InetGet ( "http://hilfe.telekom.de/dlp/eki/downloads/Internet_Software/Software%206.0%20f.%20WinXP%20u.%20Vista/T-Online_6.0.exe", $uplog & "T-Online_6.0.exe", 1, 1)
    local $sofar, $diff2
    GUICtrlSetData($button1,"abbrechen")
    do
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $Button1
    InetClose($update)
    msgbox(64,"Test","Vorgang auf Wunsch abgebrochen.")
    GUICtrlSetData($button1,".")
    EndSwitch
    $sofar=InetGetInfo($update, 0)
    sleep(50)
    $diff2=InetGetInfo($update, 0)
    GUICtrlSetData($Progress1, int(($sofar/$download)*100))
    GUICtrlSetData($label2, int($sofar/1024) & " KB von " & int($download/1024) & " KB (" & round(($diff2-$sofar)/51.2, 1) & " KB/s)")
    if InetGetInfo($update, 2) then GUICtrlSetData($button1,".")
    until GUICtrlRead ($button1) = "."
    GUIDelete($form1)
    endif

    [/autoit]

    hatte da auch schon mal was gebastelt. was mir an deinem code spontan auffällt ist das sleep() statt timerdiff verwendet wird.

  • InetGet Fehler

    • andygo
    • 20. Dezember 2009 um 11:54

    du musst irgendwie an die antwort des post-formulares der seite kommen:

    [autoit]

    <form action="http://www12.file-upload.net/data.php?id=2091696&name=test.txt" method="post" >

    [/autoit]

    dann sollte die gewünschte datei heruntergeladen werden.

  • AutoIt-Fenster

    • andygo
    • 14. Dezember 2009 um 13:29
    Zitat von funkey

    Probier mal so:

    [autoit]

    GUICreate("Bildschirm-Lock", 1280, 1024, 0, 0, $WS_POPUP)

    [/autoit]

    oder so:

    [autoit]

    GUICreate("Bildschirm-Lock", @DesktopWidth + 50, @DesktopHeight + 50, -25, -25, $WS_POPUP)

    [/autoit]

    bzw. wenn du 2 monitore hast:


    [autoit]

    GUICreate("Bildschirm-Lock", (@DesktopWidth * 2) + 50, @DesktopHeight + 50, -25, -25, $WS_POPUP)

    [/autoit]
  • Vista 32bit -> Win7 64bit

    • andygo
    • 14. Dezember 2009 um 13:25

    erstmal grlückwunsch nachträglich :rock:

    also ich hab vorher vista32bit gehabt und nun win7 home premium 64 bit,
    aus der amazon vvk aktion nur 49 euro. bis auf das programm "chameleon clock"
    läuft hier alles super. auch mit autoit habe ich noch keine inkompatibilität bemerkt

  • IF richtig so ?

    • andygo
    • 10. Dezember 2009 um 15:57

    der syntax ist nicht ganz richtig. kannst es etwas verkürzen:

    [autoit]

    If WinExists ( "title", "text" ) Then WinSetTitle ( "title", "text", "lala" )

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

    If WinExists ( "lala", "text" ) Then WinSetTitle ( "lala", "text", "lala2" )

    [/autoit]

    nur bringt das so garnix da die zweite bedingung nach durchlauf der ersten bedingung ja immer erfüllt ist.

  • Screenshot-Ersteller

    • andygo
    • 7. Dezember 2009 um 21:41
    Zitat von L3viathan2142

    Ich würde das Tool verwenden, wenn es noch eine zusätzliche Funktion hätte: Direktupload zu Abload.de oder imageshack.us und ClipPut des DirektLinks... Kannst dich ja mal dransetzen :)

    da haste wohl mein tool auch schonmal gesehn:

    [Blockierte Grafik: http://www.h2-x.de/andygo/tool/tool.png] 
    [Blockierte Grafik: http://www.h2-x.de/andygo/tool/dlsig.png]

  • Screenshot-Ersteller

    • andygo
    • 7. Dezember 2009 um 20:16

    wird immer besser. mein vorschlag wäre dem tray-menü noch ein punkt zu addieren,
    der das bildverzeichnis im datei-explorer öffnet.

  • Screenshot-Ersteller

    • andygo
    • 7. Dezember 2009 um 18:32
    Zitat von Magnus

    Um ein Foto von einem Fenster zu machen muss man es in denVordergrund holen.

    Kennt jemand eine Lösung? ?( ?( ?(

    [autoit]

    WinActivate ( "title" [, "text"] )

    [/autoit]
  • Screenshot-Ersteller

    • andygo
    • 7. Dezember 2009 um 18:25

    Magnus:

    mit folgender bedingung kannst du die gadget fenster ignorieren:

    [autoit]

    if ProcessExists ( "sidebar.exe" ) = WinGetProcess ( $WinList[$Durchlauf][0] )

    [/autoit]
  • Screenshot-Ersteller

    • andygo
    • 7. Dezember 2009 um 18:15
    Zitat von Magnus

    Neue Version! :)
    siehe Post 1!

    Mit Kommentaren damit es leslicher ist.:)

    Faweyr: Hast du Vista/7? Wenn ja: Schau dir die neue Version an, und geh mal auf die "Screenshot von Fenster erstellen"-Funktion.
    Dort sind auch die Gadgats aufgelistet, das will ich entfernen, ?(

    vielleicht will ja einer blos ein shot vom wetter-gadget machen, ich finds nich schlimm.
    blos den startknopf (start) würd ich rausmachen, der wird bei win7 zumindest bei meiner 64bit auch als fenster erkannt.

  • Screenshot-Ersteller

    • andygo
    • 6. Dezember 2009 um 20:18

    so ne funktion hab ich in meinem script auch untergebracht, vielleicht kann dir ja
    folgender codeschnipsel helfen deine version zu erweitern:

    Spoiler anzeigen
    [autoit]


    #Include <Misc.au3>
    $var = WinList()
    For $i = 1 to $var[0][0]
    If $var[$i][0] <> "" AND $var[$i][0] <> "start" AND IsVisible($var[$i][1]) Then WinSetState ( $var[$i][0], "", @SW_DISABLE )
    Next
    $GUI_2 = GUICreate("", 1, 1, -1, -1, 0x80000000 + 0x00800000, 0x00000008)
    GUISetBkColor(0x0c6eec)
    WinSetTrans($GUI_2, "", 130)
    local $s_left = "", $s_top = "", $s_width = "", $s_height = "", $mgp[2]
    Local $hGUI = GUICreate("", @DesktopWidth*@DesktopWidth+50, @DesktopHeight+50, -15, -25, -1, 0x00000080)
    GUISetBkColor(0xffffff)
    WinSetTrans($hGUI, "", 50)
    WinSetOnTop($hGUI, "", 1)
    GUISetCursor(3)
    GUISetState(@SW_SHOW, $hGUI)
    While Not _IsPressed(01)
    $mgp = MouseGetPos( )
    Sleep(50)
    WEnd
    WinMove($GUI_2, "", $mgp[0], $mgp[1], 1, 1)
    GUISetState(@SW_SHOW, $GUI_2)
    While _IsPressed(01)
    $mgp_2 = MouseGetPos( )
    If $mgp_2[0] > $mgp[0] And $mgp_2[1] > $mgp[1] Then
    local $s_left = $mgp[0], $s_top = $mgp[1], $s_width = $mgp_2[0] - $mgp[0], $s_height = $mgp_2[1] - $mgp[1]
    ElseIf $mgp_2[0] > $mgp[0] And $mgp_2[1] < $mgp[1] Then
    Local $s_left = $mgp[0], $s_top = $mgp_2[1], $s_width = $mgp_2[0] - $mgp[0], $s_height = $mgp[1] - $mgp_2[1]
    ElseIf $mgp_2[0] < $mgp[0] And $mgp_2[1] > $mgp[1] Then
    Local $s_left = $mgp_2[0], $s_top = $mgp[1], $s_width = $mgp[0] - $mgp_2[0], $s_height = $mgp_2[1] - $mgp[1]
    ElseIf $mgp_2[0] < $mgp[0] And $mgp_2[1] < $mgp[1] Then
    Local $s_left = $mgp_2[0], $s_top = $mgp_2[1], $s_width = $mgp[0] - $mgp_2[0], $s_height = $mgp[1] - $mgp_2[1]
    EndIf
    WinMove($GUI_2, "", $s_left, $s_top, $s_width, $s_height)
    WinSetOnTop($hGUI, "", 1)
    ToolTip($s_width & "x" & $s_height)
    sleep(50)
    WEnd
    ToolTip("")
    GLOBAL $s_left = $s_left, $s_top = $s_top, $s_width = $s_width, $s_height = $s_height
    GUIDelete($hGUI)
    $var = WinList()
    For $i = 1 to $var[0][0]
    If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then WinSetState ( $var[$i][0], "", @SW_ENABLE )
    Next

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

    Func IsVisible($handle)
    If BitAnd( WinGetState($handle), 2 ) Then
    Return 1
    Else
    Return 0
    EndIf
    EndFunc

    [/autoit]

    bei gedrückter maustaste kannste den bereich "ziehen".
    ist ne art nachbau des microsoft-snipping-tools was seit vista bei windows dabei ist.
    der codeschnipsel läuft auch als stand-alone-script.

  • Animierter Button

    • andygo
    • 6. Dezember 2009 um 17:02

    meinst du so?

    [autoit]


    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $btnPic
    GUICtrlSetImage ( $btnPic, "button2.bmp") ;ersatzbild
    MsgBox(0, '', 'click')
    GUICtrlSetImage ( $btnPic, "button.bmp") ;ursprungsbild
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    EndSelect
    WEnd

    [/autoit]
  • Brauche Hilfe bei der Positionierung einer GUI an der Traybar.

    • andygo
    • 4. Dezember 2009 um 23:18

    was ist denn wenn du deine gui ohne rahmen machst?

    [autoit]

    GuiCreate("test", 10, 10, 200, 200, $WS_POPUP)

    [/autoit]
  • Progess mit Integrierter % Anzeige

    • andygo
    • 4. Dezember 2009 um 23:03

    für downloads per inetget hab ich auch mal was mit progressbar gebastelt:

    [autoit]


    #include <WindowsConstants.au3>
    $uplog = FileSelectFolder("Ordner wählen... ", "")
    if stringlen ($uplog) > 3 then $uplog &= "\"
    if stringinstr ($uplog, ":\") = 0 then
    $uplog = 0
    msgbox(64,"Test","Vorgang auf Wunsch abgebrochen.")
    exit
    endif
    $download = InetGetSize ( "ftp://software.t-online.de/pub/service/to60/T-Online_6.0.exe", 1 )
    $Form1 = GUICreate("Test", 300, 120)
    $Button1 = GUICtrlCreateButton("Bitte warten...", 100, 10, 100, 25, $WS_GROUP)
    $Progress1 = GUICtrlCreateProgress(20, 55, 260, 25)
    $label1 = GUICtrlCreatelabel("T-Online_6.0.exe", 21, 38, 260, 15 )
    $label2 = GUICtrlCreatelabel("0 KB von " & int($download/1024) & " KB", 21, 84, 260, 15 )
    GUISetState(@SW_SHOW)
    Opt("GuiOnEventMode", 0)
    if $download > 0 then
    $update = InetGet ( "ftp://software.t-online.de/pub/service/to60/T-Online_6.0.exe", $uplog & "T-Online_6.0.exe", 1, 1)
    local $sofar, $diff2
    GUICtrlSetData($button1,"abbrechen")
    do
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $Button1
    InetClose($update)
    msgbox(64,"Test","Vorgang auf Wunsch abgebrochen.")
    GUICtrlSetData($button1,".")
    EndSwitch
    $sofar=InetGetInfo($update, 0)
    sleep(50)
    $diff2=InetGetInfo($update, 0)
    GUICtrlSetData($Progress1, int(($sofar/$download)*100))
    GUICtrlSetData($label2, int($sofar/1024) & " KB von " & int($download/1024) & " KB (" & round(($diff2-$sofar)/51.2, 1) & " KB/s)")
    if InetGetInfo($update, 2) then GUICtrlSetData($button1,".")
    until GUICtrlRead ($button1) = "."
    GUIDelete($form1)
    endif

    [/autoit]

    das mit dem t-online ist jetzt nur ne beispieldatei.
    achtung: code ist in 3.3.1.6 beta geschrieben.

  • schleife während msgbox

    • andygo
    • 4. Dezember 2009 um 13:19

    hallo und danke für eure rückmeldungen.

    ja ich denke auch das eine eigene gui die beste lösung ist.
    zu testzwecken habe ich das hier mal gemacht:

    [autoit]


    #include <Timers.au3>
    #include <WindowsConstants.au3>

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

    $f0 = GUICreate("Frage", 310, 130)
    GUICtrlCreateLabel("eigene msgbox test", 70, 50, 200, 15)
    $f1 = GUICtrlCreateButton("Ja", 125, 100, 85, 25)
    $f2 = GUICtrlCreateButton("Nein", 220, 100, 85, 25)
    GUISetState(@SW_SHOW, $f0)
    $area = GuiCreate("test2", 100, 100, 100, 100, $WS_POPUP)
    GUISetBkColor(0x0c6eec)
    GUISetState(@SW_SHOW, $area)
    $i = 1
    $starttime = _Timer_Init()
    do
    $msg = GUIGetMsg()
    switch $msg
    case $f1
    $i = 0
    EndSwitch
    if _Timer_Diff($starttime) > 600 then GUISetState(@SW_hide, $area)
    if _Timer_Diff($starttime) > 1200 then GUISetState(@SW_SHOW, $area)
    if _Timer_Diff($starttime) > 1200 then $starttime = _Timer_Init()
    until $msg > 0
    Splashoff()
    GUIDelete($f0)
    msgbox(0,"",$i)

    [/autoit]

    da werd ich drauf aufbauen.

    nice weekend 2 all

  • schleife während msgbox

    • andygo
    • 4. Dezember 2009 um 11:51

    hallo leute,

    ich würde gern eine msgbox einblenden und gleichzeitig solange eine schleife
    ausführen lassen. und den rückgabewert der msgbox dann in ne variable speichern.

    so nach dem motto:

    [autoit]

    while msgbox(0,"","test")
    do ;something
    wend

    [/autoit]

    dieser code klappt so natürlich nicht. aber vielleicht wisst ihr ja was ich meine und es gibt ne lösung.

  • c#(break:) in autoit?

    • andygo
    • 24. November 2009 um 18:53

    was issn mit

    [autoit]

    case else

    [/autoit]

    ?

  • Aus endlos Schleife Gui beenden

    • andygo
    • 23. November 2009 um 16:28
    Zitat von noise

    Hallo!

    Danke für die Tipps...

    Gibt es noch eine Möglichkeit?
    Weil so, reagiert er nur auf den Stop Button und nicht auf das X Rechts oben,
    dass er evtl. das Script sofort beendet!?
    Noch jemand eine Idee?

    evtl. so: ?

    [autoit]


    Opt("GuiOnEventMode", 0)
    while @InetGetActive
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $exit
    InetGet( 'abort' )
    exit
    Case $form1
    InetGet( 'abort' )
    exit
    EndSwitch
    GUICtrlSetData($lbl_filename, ""& $res3[$i+1] & " - " & $res2[$i+1] & ".mp3" & "")
    sleep (100)
    WEnd
    Opt("GuiOnEventMode", 1)

    [/autoit]
  • Aus endlos Schleife Gui beenden

    • andygo
    • 22. November 2009 um 23:37
    Zitat von Raupi

    andygo das wird nicht funktionieren. Das Script arbeitet im OnEventMode. GuiGetMsg funktioniert dabei nicht.

    stimmt. dann eben vor die schleife

    [autoit]

    Opt("GuiOnEventMode", 0)

    [/autoit]


    und nach der schleife

    [autoit]

    Opt("GuiOnEventMode", 1)

    [/autoit]

    so benutz ich es selbst und es klappt

  • Aus endlos Schleife Gui beenden

    • andygo
    • 22. November 2009 um 22:02

    @noise: versuche mal diese schleife:

    [autoit]


    while @InetGetActive
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $exit
    InetGet( 'abort' )
    EndSwitch
    GUICtrlSetData($lbl_filename, ""& $res3[$i+1] & " - " & $res2[$i+1] & ".mp3" & "")
    sleep (100)
    ;$percent = Round((@InetGetBytesRead / ((($res[$i] / 1000) * 128 * 1024) / 8)) * 100, 2)
    ;GUICtrlSetData($progress, $percent)
    WEnd

    [/autoit]

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™