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

Beiträge von Fast2

  • Zum Anfang des Programms springen?

    • Fast2
    • 30. Januar 2008 um 14:02

    Naja, jetzt funktionierts ja :)

  • Zum Anfang des Programms springen?

    • Fast2
    • 29. Januar 2008 um 21:37

    *Hust* Hab das Komplett-Script vergessen*hust*

    Spoiler anzeigen
    [autoit]

    #cs -----------------------------------------------------
    AutoIt Version: 3.2.8.1
    Von: Fast2

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

    Funktion:DragRacer3 Automatisierung
    #ce -----------------------------------------------------
    ;Anfang
    #region Includes
    #include <GUIConstants.au3>
    #include <GUICombo.au3>
    #endregion
    #region Variablen
    #region GUI1
    Dim $G1;Das Winhandle der 1.GUI
    Dim $W1;Die "Weiter" Button controlID
    Dim $F1;Die "Fertig" Button controlID
    #region GUI2
    Dim $G2;Das Winhandle der 2.GUI
    #endregion
    Dim $R1;Die "Spiel-ist-in-einem-Fenster" Radiobutton control-ID
    Dim $R2;Die "Spiel-ist-in-einem-Tab" Radiobutton conrol-ID
    Dim $B1;Die "Bestätigen" Button control-ID
    Dim $B2;Die "Schließen" Button control-ID
    #region andere Variablen
    Dim $FM = ""
    Dim $c;Nur so
    Dim $x
    Dim $y
    Dim $s;bis hier
    $MA = "Rock|Classic Rock|Hard Rock|Pop|HipHop|Rap"
    $HA = "Speed|Graffiti|Skyline|Cityscape|Muscle|Money|Cash|Base"
    $OA = "Outskirts (0Cr)|Hi-Rev Tuners Section (100 Cr)|'Pump It UP!' Section (100 Cr)|Luxury Section (200 Cr)|Food Court (200 Cr)|Main Floor (500 Cr)|Front Entrance(1000 Cr)"
    $KDO = @AppDataCommonDir&"\XT\KD"
    $KDP = $KDO&"\KOI.ini"
    $OD = DirCreate($KDO)
    #endregion
    #endregion
    If not FileExists($KDP) Then FileInstall("C:\Dokumente und Einstellungen\Fabian\Desktop\AutoItDateien\Hilfsdateien\INIs\KOI.ini", $OD, 1)
    ;GUI1
    $G1 = GUICreate("Drag Racer Trainer", 640, 250)
    GUISetFont(14)
    GUICtrlCreateLabel("Dieser Trainer Automatisiert den Show Off Modus von Drag Racer v3", 40, 20)
    GUICtrlCreateLabel("Dieser Trainer wurde nur für die Auflösung 1280x1024 getestet", 30, 60)
    GUICtrlCreateLabel("Bitte wählen sie im folgenden Fenster aus den Einstellungen", 60, 100)
    $W1 = GUICtrlCreateButton("Fortfahren", 420, 215, 105)
    $F1 = GUICtrlCreateButton("Abbrechen", 525, 215, 100)
    GUISetBkColor(0x0000ED)
    ;GUI2
    $G2 = GUICreate("Drag Racer Trainer Auswahl", 600, 150)
    GUISetBkColor(0x0000ED)
    $CBM = GUICtrlCreateCombo("Bitte wählen sie die Musik", 25, 20, -1 ,-1, BitOr($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST))
    GUICtrlSetData($CBM, $MA)
    $CBH = GUICtrlCreateCombo("Bitte wählen sie den Hintergrund", 25, 65, -1 ,-1, BitOr($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST))
    GUICtrlSetData($CBH, $HA)
    $CBA = GUICtrlCreateCombo("Bitte wählen sie den Ausstellungsort", 25, 110, -1 ,-1, BitOr($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST))
    GUICtrlSetData($CBA, $OA)
    $R1 = GUICtrlCreateRadio("Das Spiel ist in einem Fenster ", 280, 25, 300)
    $R2 = GUICtrlCreateRadio("Das Spiel ist in einem Tab ", 280, 60, 300)
    $B1 = GUICtrlCreateButton("Bestätigen", 425, 100, 110, 35)
    $B2 = GUICtrlCreateButton("Schließen", 280, 100, 110, 35)
    GUICtrlSetFont($R1, 14, 150)
    GUICtrlSetFont($R2, 14, 150)
    GUICtrlSetFont($B1, 14, 150)
    GUICtrlSetFont($B2, 14, 150)
    GUISetState(@SW_Show, $G1)
    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $W1
    GUISetState(@SW_Show, $G2)
    GUISetState(@SW_Hide, $G1)
    Case $msg = $B2 Or $msg = $F1 Or $msg = $GUI_Event_Close
    Exit
    Case $msg = $B1
    $CB1 = GUICtrlRead($CBM)
    $CB2 = GUICtrlRead($CBH)
    $CB3 = GUICtrlRead($CBA)
    $RB1 = GUICtrlRead($R1)
    $RB2 = GUICtrlRead($R2)
    Select
    Case $RB1 = 1
    $FoT = 0
    Case $RB2 = 1
    $FoT = 25
    Case Else
    MsgBox(0, "Bitte Wählen", "Sie haben dem Programm nicht mitgeteilt," & @CRLF & "ob das Programm in einem Task ist oder nicht!")
    EndSelect
    $MFI = _GUICtrlComboGetCurSel($CBM)
    $HFI = _GUICtrlComboGetCurSel($CBH)
    $AFI = _GUICtrlComboGetCurSel($CBA)
    $MFIY = "M"&$MFI
    $HFIY = "H"&$HFI
    $AFIY = "A"&$AFI
    $XC = IniRead($KDP, "ACK", "XC", "Der Wert XC in der INI wurde auf eine nicht gültige weise verändert!")
    $MC = IniRead($KDP, "ACK", "MA", "Der Wert MA in der INI wurde auf eine nicht gültige weise verändert!")
    $HC = IniRead($KDP, "ACK", "HA", "Der Wert HA in der INI wurde auf eine nicht gültige weise verändert!")
    $AC = IniRead($KDP, "ACK", "AA", "Der Wert AA in der INI wurde auf eine nicht gültige weise verändert!")
    $MK = IniRead($KDP, "MAK", $MFIY, "Der Wert "&$MFIY&" in der INI wurde auf eine nicht gültige weise verändert!")
    $HK = IniRead($KDP, "HAK", $HFIY, "Der Wert "&$HFIY&" in der INI wurde auf eine nicht gültige weise verändert!")
    $AK = IniRead($KDP, "AAK", $AFIY, "Der Wert "&$AFIY&" in der INI wurde auf eine nicht gültige weise verändert!")
    $NU = $XC&$MC&$HC&$AC&$HK&$AK
    If Not StringIsDigit($NU) Then
    Select
    Case StringIsDigit($XC) = 0
    $FM &= $XC & @CRLF
    ContinueCase
    Case StringIsDigit($MC) = 0
    $FM &= $MC & @CRLF
    ContinueCase
    Case StringIsDigit($HC) = 0
    $FM &= $HC & @CRLF
    ContinueCase
    Case StringIsDigit($AC) = 0
    $FM &= $AC & @CRLF
    ContinueCase
    Case StringIsDigit($MK) = 0
    $FM &= $MK & @CRLF
    ContinueCase
    Case StringIsDigit($HK) = 0
    $FM &= $HK & @CRLF
    ContinueCase
    Case StringIsDigit($AK) = 0
    $FM &= $AK & @CRLF
    EndSelect
    MsgBox(16, "Fehler", $FM)
    Else

    EndIf
    EndSelect
    WEnd

    [/autoit]


    Und falls das Script einigen im Forum bekannt vorkommt: Ich treib mich immer so lange im Forum rum, das ich nicht weiterkomm. :D
    Aber ich hätte nicht gedacht dass ContinueLoop die Schleife fortsetzt(wie ich beim Name vermutet habe) sondern von vorne beginnt. Danke. :thumbup:

  • Zum Anfang des Programms springen?

    • Fast2
    • 29. Januar 2008 um 20:02

    Ich habe diesen Codeabschnitt:

    Spoiler anzeigen
    [autoit]

    $MFI = _GUICtrlComboGetCurSel($CBM)
    $HFI = _GUICtrlComboGetCurSel($CBH)
    $AFI = _GUICtrlComboGetCurSel($CBA)
    $MFIY = "M"&$MFI
    $HFIY = "H"&$HFI
    $AFIY = "A"&$AFI
    Select
    Case $MFI = 0

    [/autoit]


    Falls die Variable $MFI gleich 0 ist, soll das Programm eine MsgBox anzeigen mit entsprechendem Hinweis und wieder zur Eingabemaske springen.(2.GUI)
    Das Problem: Wie realisiere ich das? (Ein GoTo gibt es ja nicht(mehr))

  • Webseiten Unwetterwarnungen - letzter Post

    • Fast2
    • 29. Januar 2008 um 18:32

    [Unnötiges Kommentar] Ich würde sagen es funzt, weil es so richtig ist[/Unnötiges Kommentar] ;)
    PS: Ein bisschen was kann man noch wegmachen :D : Anstatt:$ende6 = '</span></div>' das: $ende6 = '</span>'. Falls zwischen dem </span> und dem </div> mal was kommen sollte.

  • Runterzählen :P

    • Fast2
    • 28. Januar 2008 um 21:13

    999991
    __________________________________________________________________________________________________________________________________
    Lalala...

  • Lustige Fehlermeldungen

    • Fast2
    • 27. Januar 2008 um 16:24

    lol :rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl:

  • Variablen bei Script als Dienst

    • Fast2
    • 26. Januar 2008 um 11:45

    Ich seh auch keinen (hab aber gedacht, das es an mir liegt)

  • Wie kann das Zeichen "#" aus einer Ini-Datei in Function Send übergeben werden?

    • Fast2
    • 21. Januar 2008 um 16:44

    Oder gleich richtig in die INI schreiben. (Also anstatt dem: ("Daten#123") das: ("Daten" & "{#}" & "123")). Ich weiß nur nicht ob INIRead das akzeptiert.

  • Dos Programm mit drei Parametern automatisieren

    • Fast2
    • 20. Januar 2008 um 10:25

    omg...
    Aus der Hilfe kopiert:

    Spoiler anzeigen
    C
    Function Reference
    _GUICtrlComboAddDir 
    --------------------------------------------------------------------------------
    
    
    Add names to the list displayed by the combo box
    
    
    
    
    #Include <GuiCombo.au3>
    _GUICtrlComboAddDir ( $h_combobox, $s_Attributes [, $s_file] )
    
    
    
    
     
    
    
    Parameters
    
    
    $h_combobox control id/control hWnd 
    $s_Attributes comma-delimited string 
    $s_file Optional for "Drives" only: what Files/Folders to get
    eg *.* 
    
    
     
    
    
    Return Value
    
    
    Success: Returns zero-based index of the last name added to the list. 
    Failure: Returns $CB_ERR. 
     Returns $CB_ERRSPACE if there is insufficient space to store the new strings. 
    
    
     
    
    
    Remarks
    
    
    Requirement: $s_file for all but drives attribute
    
    
    $s_Attributes is an comma-delimited string
    valid values are any of the following:
        A,D,H,RO,RW,S,E,Drives,NB
    
    
    A = ARCHIVE Includes archived files. 
    D = DIRECTORY Includes subdirectories. Subdirectory names are enclosed in square brackets ([ ]). 
    H = HIDDEN Includes hidden files. 
    RO = READONLY Includes read-only files. 
    RW = READWRITE Includes read-write files with no additional attributes. This is the default setting. 
    S = SYSTEM Includes system files. 
    E = EXCLUSIVE Includes only files with the specified attributes. By default, read-write files are listed even if READWRITE is not specified. 
    DRIVES All mapped drives are added to the list. Drives are listed in the form [-x-], where x is the drive letter. 
    NB = No Brackets  
       Drives are listed in the form x:, where x is the drive letter (used with Drives attribute)  
    
    
    
    
     
    
    
    Related
    
    
    _GUICtrlComboInitStorage 
     
    
    
    Example
    
    
    
    
    #include <GuiConstants.au3>
    #include <GuiCombo.au3>
    #Include <GuiStatusBar.au3>
    
    
    Opt('MustDeclareVars', 1)
    
    
    Dim $a_check[10], $msg, $ret, $s_attr, $allocated, $Status, $GUI
    Dim $input, $group, $a_attr, $Combo, $button, $btn_exit
    
    
    $GUI = GUICreate("ComboBox Add Dir", 400, 280)
    
    
    GUICtrlCreateLabel("Enter files to find", 25, 15)
    $input = GUICtrlCreateInput("", 125, 10, 180, 25)
    $group = GUICtrlCreateGroup("Atrributes", 10, 40, -1, 200)
    $a_attr = StringSplit("A,D,H,RO,RW,S,E,Drives,NB", ",")
    $a_check[0] = 9
    $a_check[1] = GUICtrlCreateCheckbox("Archive", 15, 55, 170, 20)
    $a_check[2] = GUICtrlCreateCheckbox("Directory", 15, 75, 170, 20)
    $a_check[3] = GUICtrlCreateCheckbox("Hidden", 15, 95, 170, 20)
    $a_check[4] = GUICtrlCreateCheckbox("Read-Only", 15, 115, 170, 20)
    $a_check[5] = GUICtrlCreateCheckbox("Read-Write", 15, 135, 95, 20)
    $a_check[6] = GUICtrlCreateCheckbox("System", 15, 155, 170, 20)
    $a_check[7] = GUICtrlCreateCheckbox("Exclusive", 15, 175, 170, 20)
    $a_check[8] = GUICtrlCreateCheckbox("Drives", 15, 195, 170, 20)
    $a_check[9] = GUICtrlCreateCheckbox("No Brackets (Drives Only)", 15, 215, 170, 20)
    GUICtrlCreateGroup("", -99, -99, 1, 1)  ;close group
    
    
    $Combo = GUICtrlCreateCombo("", 240, 40, 120, 120, $CBS_SIMPLE)
    $allocated = _GUICtrlComboInitStorage ($Combo, 26, 50)
    
    
    $button = GUICtrlCreateButton("Get Names", 240, 160, 120, 40)
    $btn_exit = GUICtrlCreateButton("Exit", 240, 205, 120, 40)
    
    
    $Status = _GUICtrlStatusBarCreate ($GUI, -1, "")
    _GUICtrlStatusBarSetSimple ($Status)
    _GUICtrlStatusBarSetText ($Status, "Pre-Allocated Memory For: " & $allocated & _
          " Items Added To ComboBox: " & _GUICtrlComboGetCount ($Combo), 255)
    GUISetState()
    While 1
       $msg = GUIGetMsg()
       Select
          Case $msg = $GUI_EVENT_CLOSE Or $msg = $btn_exit
             ExitLoop
          Case $msg = $button
             $s_attr = ""
             For $i = 1 To $a_check[0]
                If (BitAND(GUICtrlRead($a_check[$i]), $GUI_CHECKED)) Then
                   If (StringLen($s_attr) > 0) Then
                      $s_attr &= "," & $a_attr[$i]
                   Else
                      $s_attr = $a_attr[$i]
                   EndIf
                EndIf
             Next
             _GUICtrlComboResetContent ($Combo)
             $ret = _GUICtrlComboAddDir ($Combo, $s_attr, GUICtrlRead($input))
             If ($ret < 0) Then
                If ($ret == $CB_ERRATTRIBUTE) Then
                   MsgBox(16, "Error", "Invalid Attribute sent to _GUICtrlComboAddDir")
                ElseIf ($ret == $CB_ERRSPACE) Then
                   MsgBox(16, "Error", "insufficient space to store the new strings from calling _GUICtrlComboAddDir")
                ElseIf ($ret == $CB_ERRREQUIRED) Then
                   MsgBox(16, "Error", "Argument required for file search in call to _GUICtrlComboAddDir")
                ElseIf ($ret == $CB_ERR) Then
                   MsgBox(16, "Error", "Unknown error from _GUICtrlComboAddDir" & @CRLF & "Possibly no files/folders found")
                EndIf
             EndIf
             _GUICtrlStatusBarSetText ($Status, "Pre-Allocated Memory For: " & $allocated & _
                   " Items Added To ComboBox: " & _GUICtrlComboGetCount ($Combo), 255)
       EndSelect
    WEnd
    Exit
    Alles anzeigen


    @admins: Der Button für Code fehlt

  • Dos Programm mit drei Parametern automatisieren

    • Fast2
    • 20. Januar 2008 um 08:57

    Ps: Autoit hat ne Hilfe, vllt. mal da suchen.

  • Problem mit switch/case und TCPSend

    • Fast2
    • 18. Januar 2008 um 22:24

    Vllt weil die Funktion _Close() nicht deklariert wurde ;)?

  • Happy Birthday Oscar

    • Fast2
    • 18. Januar 2008 um 20:02

    [Blockierte Grafik: http://bestsmileys.com/birthday2/6.gif][Blockierte Grafik: http://bestsmileys.com/birthday2/6.gif][Blockierte Grafik: http://bestsmileys.com/birthday2/6.gis_avatars/smile/smile_f][Blockierte Grafik: http://users.pandora.be/eborght/Emoticons/happy_birthday.gif]

  • a hug for huggy

    • Fast2
    • 18. Januar 2008 um 19:54

    Herzlichen Glückwunsch Huggy !!!
    Und einen [Blockierte Grafik: http://www.pami.hit.bg/doors/13temi/01torta/torta1.gif] für dich!

    Und weil die Bilder so schön sind gleich nochmal:
    [Blockierte Grafik: http://i37.photobucket.com/albums/e78/sueweb/happybday.gif]

  • Include und Checkbox Problem

    • Fast2
    • 18. Januar 2008 um 19:48

    Oder Select mit ContinueCase.

  • Bit-Operationen

    • Fast2
    • 16. Januar 2008 um 14:28

    Sehr übersichtlich :thumbup: Jetzt habs sogar ich verstanden :D

    Weiter so!![Blockierte Grafik: http://img246.imageshack.us/img246/8399/thumbsup4kk.gif]

  • Ini-Eintrag

    • Fast2
    • 14. Januar 2008 um 21:25

    Wieso wertest du dann nicht einfach die Rückgabe aus?

    [autoit]

    Do
    $ini=IniRead("C:\test.ini","test","id","Fehler")
    Until NOT $ini = "Fehler"

    [/autoit]
  • autom. fensterverschiebung

    • Fast2
    • 13. Januar 2008 um 18:28

    Das würde mit WinMove gehen.

    Edit:Mist Oscar war schneller

  • Problem mit regexp :(

    • Fast2
    • 13. Januar 2008 um 18:05

    Heißt Pid nicht "Process ID"? Aber für was das "w" steht weiß ich auch nicht.

  • Lesen auf txt dokument?

    • Fast2
    • 12. Januar 2008 um 22:00

    Also ich würde in dem Fall mit StringSplit arbeiten.

  • Routine erstellen zum Löschen, erstellen usw.

    • Fast2
    • 12. Januar 2008 um 00:25

    Also erst mal [Blockierte Grafik: http://img125.echo.cx/img125/8038/01welcome7jb.gif]
    Ach ja das steht alles in der Hilfe, aber da ich deswegen eigentlich gar nichts sagen dürfte( ich hatte am anfang auch kp) beschreibe ich es dir noch mal:

    [autoit]

    ;Für die MsgBox nimmst du folgendes (Syntax: MsgBox(flag, "title", "text"[, timeout])
    ;Aso bei dir:
    $M = MsgBox(1, "Dein Titel", "Der Text in Zeile1" & @CRLF & "und der in Zeile 2")
    ;Die Variable $M enthält jetzt das "Return Value" also den Rückgabewert. Diesen kannst du aus der Hilfe entnehmen. Dieser wird jetzt abgefragt (Bei OK ist er 1):
    If $M = 1 Then
    ;Den Satz habe ich nicht verstanden, aber hier kommt das rein was du dann machen willst
    EndIf
    ;Dann die 2.MsgBox, was du mit Grafiken meinst weiß ich nicht, wenn du dieses Warndreieck und so meinst, dann geht das mit der Flag --> Hilfe lesen
    MsgBox(0, "Dein Titel", "Der Text in Zeile1" & @CRLF & "und der in Zeile 2")

    [/autoit]

    So das war's jetzt.
    ps: Ich habe auch in Batch gescriptet bevor ich auf autoit umgestiegen bin, aber AutoIt hat bestimmt 1000x mehr möglichkeiten ;)

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™