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. autoBert

Beiträge von autoBert

  • Problem mit Patcher...

    • autoBert
    • 27. April 2010 um 22:41

    Hallo Kurikinton,

    anstelle das du die Größe des Files anhand von FileGetSize ermittelst kannst du doch auch mit

    [autoit]

    InetGetInfo($hDownload,0)

    [/autoit]

    direkt den Download messen. Also das ganze so machen:

    Spoiler anzeigen
    [autoit]

    $file_size = InetGetSize($patch_url & "\" & $datei) / 1048576
    $size_inet = Round($file_size, 2)
    $size_inet_orig = InetGetSize($patch_url & "\" & $datei)
    $size_ordner = FileGetSize($ScriptDir & "\" & $datei)

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

    If $size_inet_orig <> $size_ordner Then
    GUICtrlSetData($stat, @CRLF & "Datei " & "'" & $datei & "' - '" & $size_inet & " MB' wird aktualisiert..." & @CRLF & GUICtrlRead($stat))
    $hDownload = InetGet($patch_url & $datei , $ScriptDir& "\" & $datei , 1 , 1)
    While Not InetGetInfo($hDownload, 2)
    $size_file = InetGetInfo($hDownload,0) / 1048576
    $size_file_fin = Round($size_file, 2)
    $iPercent = (100 * $size_file) / $size_inet
    GUICtrlSetData($Progress1, $iPercent)
    sleep (50)
    WEnd
    GUICtrlSetData($Progress1, 100)

    [/autoit]

    @Fabian, du scheinst eine veraltete AutoIt-Version zu haben @InetGetActive und @InetGetBytesRead gibt es nicht mehr, dafür sind jetzt aber mehrere Downloads gleichzeitig möglich,

    mfg (Auto)Bert

  • _FFXPath

    • autoBert
    • 27. April 2010 um 19:04

    Hallo descent,

    poste doch bitte dein bisheriges Skript dazu,

    mfg (Auto)Bert

  • _IniRead() Eigene Funktion mit noch ein paar Fehlern

    • autoBert
    • 27. April 2010 um 17:52

    Hallo Schnitzel,

    Zitat von Hilfe zu IniReadSection

    Bemerkungen

    Eine standardkonforme .ini-Datei sieht folgendermaßen aus:
    [SektionsName]
    Schlüssel=Wert

    Die Anzahl der zurückgegebenen Elemente steht in $result[0][0]. Wenn ein @error auftaucht, wird kein Array erstellt.
    Nur die ersten 32767 Zeichen werden aufgrund der Win9x-Kompatibilität in einer Sektion berücksichtigt.

    mfg (Auto)Bert

  • Schleifen Problem

    • autoBert
    • 27. April 2010 um 17:42

    Hallo stayawayknight

    Zitat von stayawayknight


    Ist meines Wissens nicht mehr nötig, da die Schleife laut Hilfe automatisch im Leerlauf gehalten wird und dafür sorgt das die CPU nich zu arg ausgelastet wird...
    Möchte mich da aber nich festlegen! Kann sein das ich mich irre

    gilt nur wenn GUIGetMsg vorkommt,

    mfg (Auto)Bert

  • _IniRead() Eigene Funktion mit noch ein paar Fehlern

    • autoBert
    • 27. April 2010 um 16:22

    Hallo Aquaplant,

    der eigentliche Fehler liegt in Zeile 16. Hier das geänderte Skript:

    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.3.6.0
    Author: Aquaplant

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

    Script Function:
    _Iniread($spath[, $sSection[, $sKey]])

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

    #ce ----------------------------------------------------------------------------
    #Include <String.au3>
    $AAA = _IniRead(@ScriptDir & "\Test.txt")
    If @error Then
    MsgBox(0, "", @error)
    EndIf
    For $i = 1 To $AAA[0]
    MsgBox(0, $AAA[0], $AAA[$i])
    Next

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

    Func _IniRead($sPath, $sSection = "", $sKey = "")
    Global $sSectionname[999]
    Local $sArray = ""
    If FileExists($sPath) = 0 Then
    SetError(1, 1, "Requested file does not exist")
    Else
    If $sSection = "" And $sKey = "" Then
    $oHandle = FileOpen($sPath)
    $i = 0
    $a = 0
    While 1
    $i += 1
    $sLine = FileReadLine($oHandle, $i)
    If @error Then
    If FileGetSize($sPath) <= 1 Then
    SetError(2, 2, "No contents in the file")
    EndIf
    $sSectionname[0] = $a
    FileClose($oHandle)
    ExitLoop
    EndIf
    If StringLeft($sLine, 1) = "[" Then
    $sArray = ""
    $a += 1
    $aLine = StringSplit($sLine, "]")
    For $j = 1 To $aLine[0] - 1
    $sArray &= $aLine[$j] & "]"
    Next
    $sArray = StringTrimRight($sArray, 1)
    $sArray = StringTrimLeft($sArray, 1)
    $sSectionname[$a] = $sArray
    EndIf
    WEnd
    Return $sSectionname
    EndIf
    If $sSection <> "" And $sKey = "" Then
    Global $aKV[999][999]
    $i = 0
    $j = 0
    While 1
    $i += 1
    $sLine = FileReadLine($sPath, $i)
    If @error Then
    SetError(3, 3, "Section does not exist")
    EndIf
    If StringLeft($sLine, StringLen($sSection) + 2) = "[" & $sSection & "]" Then
    While 1
    $i += 1
    $j += 1
    $sLine = FileReadLine($sPath, $i)
    If StringLeft($sLine, 1) = "[" Or @error Then
    $aKV[0][0] = $j
    ExitLoop 2
    Else
    $sString = ""
    $aString = StringSplit($sLine, "=")
    $aKV[$j][0] = $aString[1]
    For $k = 2 To $aString[0]
    If $aString[$k] = "" Then
    $aString[$k] = "="
    EndIf
    $sString &= $aString[$k] & "="
    Next
    $sString = StringTrimRight($sString, 1)
    $aKV[$j][1] = $sString
    EndIf
    WEnd
    EndIf
    WEnd
    Return $aKV
    EndIf
    If $sSection <> "" And $sKey <> "" Then
    $sFile = FileRead($sPath)
    $aA = _StringBetween($sFile, $sKey & "=", @CRLF)
    If IsArray($aA) = 0 Then
    $aA = _StringBetween($sFile, $sKey, @CR)
    EndIf
    $sValue = $aA[0]
    Return $sValue
    EndIf
    EndIf
    EndFunc

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

    mfg (Auto)Bert

  • Bild aus Zwischenablage in GUI kopieren

    • autoBert
    • 27. April 2010 um 12:29

    Vielliecht hilft dir ja dies: http://www.autoitscript.com/forum/index.php?s=9e0188c6fdd48077c8b461569c4a6fa8&showtopic=51103&view=findpost&p=386541 weiter,

    mfg (Auto)Bert

  • AutoIt Router Restart

    • autoBert
    • 27. April 2010 um 12:21

    stayawayknight,

    Leichenschänder ;) ,

  • Bild aus Zwischenablage in GUI kopieren

    • autoBert
    • 27. April 2010 um 11:30

    Hallo Bruns8234,

    schau dir [ offen ] Bild das in der zwischenablage liegt abspeichern an,

    mfg (Auto)Bert

  • wieder in endlos while schleife zurück, wenn Bediengung nicht erfüllt

    • autoBert
    • 26. April 2010 um 20:57

    Hallo Sr_Campos,

    schau dir meine Lösung an. Falls es nicht klappt poste doch bitte doch ganze Skript,

    mfg (Auto)Bert

  • Mit dem Computer reden xDD

    • autoBert
    • 26. April 2010 um 20:53

    Hallo stayawayknight & Nachposter,

    schon einmal auf das Erstellungsdatum des Threads geschaut

    mfg (Auto)Bert

  • wieder in endlos while schleife zurück, wenn Bediengung nicht erfüllt

    • autoBert
    • 26. April 2010 um 20:39

    Das komplette Skript wäre hilfreich, aber vielleicht klappt's ja so schon

    Spoiler anzeigen
    [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    OnAbbrechen()
    Case $abbrechen
    OnAbbrechen()
    Case $weiter
    if $OptFlag=0 Then
    MsgBox(0, "", "Bitte füllen sie alle Felder aus!")
    else
    $Cnt_size = GUICtrlRead($Input2)
    $Cnt_path = GUICtrlRead($Input1)
    GUIDelete($Form2)
    Form_3()
    EndIf
    Case $pathChoice
    ;...
    Case $zurueck
    GUIDelete($Form_2)
    Form_1()
    EndSwitch
    WEnd

    [/autoit]

    mfg (Auto)Bert

  • Pic transparent o. ä.? /Button Drag und Drop

    • autoBert
    • 26. April 2010 um 20:18

    Hallo stayawayknight,
    hier ein Skript von @ChaosKeks:

    Spoiler anzeigen
    [autoit]

    ; *** Start added by AutoIt3Wrapper ***
    #include <StaticConstants.au3>
    ; *** End added by AutoIt3Wrapper ***
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Add_Constants=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ListviewConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <SliderConstants.au3>
    #Include <GuiListView.au3>
    #Include <Array.au3>
    #Include <File.au3>
    #Include <Misc.au3>

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

    Opt("GUIOnEventMode", 1)
    ;Global $posXStart, $posYStart, $posXStop, $posYStop, $pic, $hGui, $Pos_M2 = MouseGetPos()

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

    $hGUI = GUICreate("Transparent", 575, 510)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Ex")
    $insert = GuiCtrlCreateButton("Insert Pic" ,10,10)
    GuiCtrlSetOnEvent(-1, "_insert")
    $Pic=GUICtrlCreatePic("", 50, 50)
    GuiCtrlSetOnEvent(-1, "_DragMe")
    $hsplitter1 = GUICtrlCreateLabel("",270, 125, 8, 205,-1,$SS_BLACKFRAME)
    ;GUICtrlSetColor(-1,0xffffff)
    ;GUICtrlSetResizing(-1, $GUI_DOCKLEFT +$GUI_DOCKSIZE + $GUI_DOCKTOP)
    GUICtrlSetOnEvent($hsplitter1,"_DragMe")
    $hlabel = GUICtrlCreateLabel("Verschieb mich",20,120,100,25)
    GUICtrlSetOnEvent($hlabel,"_DragMe")

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

    GUISetState(@SW_SHOW)

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

    While 1
    sleep(100)
    WEnd

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

    Func _insert()
    GuiCtrlDelete($pic)
    $bild = FileOpenDialog("Wählen Sie eine Datei aus!", @WindowsDir & "\", "Bilder (*.jpg;*.bmp)", 1 + 4 )
    $Pic = GUICtrlCreatePic($bild, 150, 150)
    GuiCtrlSetOnEvent(-1, "_DragMe")
    EndFunc

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

    Func _DragMe() ;Orginal zum verschieben von 1 Bild von ChaosKeks
    Local $Pos_C, $Pos_M, $Pos_M2, $Opt_old
    Local $dll = DllOpen("user32.dll")
    $Opt_old = Opt('MouseCoordMode', 0)
    $Pos_C = ControlGetPos($hGui, "", @GUI_CtrlId);$pic)
    $Pos_M = MouseGetPos()
    $Pos_W = WinGetPos($hGui)
    $x_Offset = $Pos_M[0] - $Pos_C[0]
    $y_Offset = $Pos_M[1] - $Pos_C[1]
    _MouseTrap($Pos_W[0]+$x_Offset,$Pos_W[1]+$y_Offset,$Pos_W[0]+$Pos_W[2],$Pos_W[1]+$Pos_W[3])
    While _IsPressed('01', $dll)
    $Pos_M = MouseGetPos()
    If $Pos_M <> $Pos_M2 Then
    GUICtrlSetPos(@GUI_CtrlId,$Pos_M[0] - $x_Offset, $Pos_M[1] - $y_Offset)
    sleep(10)
    EndIf
    $Pos_M = $Pos_M2
    sleep(50)
    WEnd
    DllClose($dll)
    Opt('MouseCoordMode', $Opt_old)
    _MouseTrap()
    EndFunc

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

    Func _Ex()
    Exit
    EndFUnc

    [/autoit]

    musst es halt noch anpassen,

    mfg (Auto)Bert

  • Bild vergrößern und bewegen

    • autoBert
    • 26. April 2010 um 19:46

    so z.B.:

    Spoiler anzeigen
    [autoit]

    ; *** Start added by AutoIt3Wrapper ***
    #include <WindowsConstants.au3>
    ; *** End added by AutoIt3Wrapper ***
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Add_Constants=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <SliderConstants.au3>
    #include <StaticConstants.au3>
    $iLeft = 0
    $iTop = 0
    $iWidth = 150
    $iHeight = 150
    $Form1 = GUICreate("Form1", 653, 426, 192, 124)
    $Pic1 = GUICtrlCreatePic("PfadZumBild",$iLeft,$iTop, $iWidth, $iHeight, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $Slider1 = GUICtrlCreateSlider(0, 400, 305, 25)
    $Button1 = GUICtrlCreateButton("Oben", 304, 400, 97, 25)
    $Button2 = GUICtrlCreateButton("Unten", 400, 400, 91, 25)
    $Button3 = GUICtrlCreateButton("Links", 488, 400, 83, 25)
    $Button4 = GUICtrlCreateButton("Rechts", 568, 400, 83, 25)
    GUISetState(@SW_SHOW)

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

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    case -3
    exit
    Case $Button1
    $iTop -= 1
    GUICtrlSetPos($Pic1,$iLeft,$iTop)
    Case $Button2
    $iTop += 1
    GUICtrlSetPos($Pic1,$iLeft,$iTop)
    Case $Button3
    $iLeft -= 1
    GUICtrlSetPos($Pic1,$iLeft,$iTop)
    Case $Button4
    $iLeft += 1
    GUICtrlSetPos($Pic1,$iLeft,$iTop)
    EndSwitch
    WEnd

    [/autoit]

    mfg (Auto)Bert

  • Crappy-Writer

    • autoBert
    • 26. April 2010 um 18:56

    Klingt aber voll nach Spam-Bot:

    [autoit]

    $description2 = GUICtrlCreateLabel("Das Programm postet sinnlose Sprüche auf", 16, 88, 298, 21)

    [/autoit]

    mfg (Auto)Bert

  • Install Script erstellen

    • autoBert
    • 26. April 2010 um 17:11

    Hallo hulkmann,

    so z.B.:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

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

    Opt('MustDeclareVars', 1)

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

    Example()

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

    Func Example()
    Local $Radio_1, $Radio_2, $Radio_3, $Radio_4, $Kopieren, $msg

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

    GUICreate("My GUI with Radiogroup") ; will create a dialog box that when displayed is centered

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

    GUICtrlCreateGroup("Datei zum kopieren auswählen:", 10, 10, 190, 200)
    $Radio_1 = GUICtrlCreateRadio("Radio 1", 20, 40)
    $Radio_2 = GUICtrlCreateRadio("Radio 2", 20, 70)
    $Radio_3 = GUICtrlCreateRadio("Radio 3", 20, 100)
    $Kopieren = GUICtrlCreateButton("Kopieren", 30, 170)

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

    GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

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

    GUISetState() ; will display the GUI

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

    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Kopieren
    If BitAND(GUICtrlRead($Radio_1), $GUI_CHECKED) = $GUI_CHECKED Then MsgBox(0, "Radio", "1 ausgewählt")
    If BitAND(GUICtrlRead($Radio_2), $GUI_CHECKED) = $GUI_CHECKED Then MsgBox(0, "Radio", "2 asugewählt")
    If BitAND(GUICtrlRead($Radio_3), $GUI_CHECKED) = $GUI_CHECKED Then MsgBox(0, "Radio", "3 asugewählt")
    EndSwitch
    WEnd
    EndFunc ;==>Example

    [/autoit]

    du musst nur noch deine Copy-Funktionen einbauen,

    Edit: überflüssige Zeilen entfernt

    mfg (Auto)Bert

  • Variablen am anfang deklarieren aber noch nicht ausführen?

    • autoBert
    • 25. April 2010 um 19:45

    Dazu hast du doch schon die Lösung bekommen

    Zitat von ideas2code
    [autoit]

    Global $musik

    [/autoit]


    oder

    [autoit]

    Local $Musik

    [/autoit]


    oder

    [autoit]

    $Musik = ""

    [/autoit]


    ....

    http://www.autoit.de/tutorial/#variablen_deklarieren
    http://www.autoit.de/dokumentation_aktuell/keywords/Dim.htm

    Alles anzeigen

    mfg (Auto)Bert

  • ListView auslesen

    • autoBert
    • 25. April 2010 um 19:40

    Hallo Sonyman,

    du musst dazu StringInStr verwenden:

    [autoit]

    #include <array.au3>
    Dim $aText[3], $find = "Fehler"
    $aText[0]=3
    $aText[1]="Irgendeine Meldung"
    $aText[2]="Fehler beim Daten schreiben. (118-0000cf20 987a9b5c)"
    ArrayDisplay($aText)
    if StringInStr($aText[2],$find) then MsgBox(16, "Suchwort gefunden",$aText[2],10)

    [/autoit]

    mfg (Auto)Bert

  • Variablen am anfang deklarieren aber noch nicht ausführen?

    • autoBert
    • 25. April 2010 um 19:26

    Hallo button421,

    mit der varialendeklaration hat das nichts zu tun. Was passiert denn, wenn du die Frage (Unter anderem Namen speichern?) mit Yes (Ja) beantwortest,

    mfg (Auto)Bert

  • Programme Beliebig Starten

    • autoBert
    • 25. April 2010 um 14:19

    Hallo IDouble,

    schau dir AutoStarter neue Version: v 0.7.4 an,

    mfg (Auto)Bert

  • Happy B-Day

    • autoBert
    • 25. April 2010 um 02:14

    Happy Birthday tince und weiterhin viel Spass

    yxyx

    Zitat von yxyx

    hmm 18 wär auch auch gerne

    ja ich wärs ab und zu auch noch gerne,

    mfg (Auto)Bert

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™