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

Beiträge von Irrlicht

  • Random

    • Irrlicht
    • 29. Januar 2011 um 22:30
    [autoit]


    $alpha= Inputbox("Anfangswert", "Gib hier den Anfangswert ein", 0, " M")
    $beta= Inputbox("Endwert", "Gib hier den Endwert ein", 100, " M")
    Msgbox(0, "Deine Zufallszahl von" & @Hour & @min & @sec, "Deine Zufallszahl:"& Int( Random($alpha, $beta)))

    [/autoit]


    So gehts viel einfacher :) Kannst ja anpassen

  • ordner verschieben etc.

    • Irrlicht
    • 29. Januar 2011 um 21:19

    Beispielsweise so:

    [autoit]

    Filecopy(@Scriptdir&@Scriptname, @DesktopDir)

    [/autoit]


    Das Wörtchen "unbemerkt" gefällt mir nicht.

  • Multidownloader

    • Irrlicht
    • 29. Januar 2011 um 21:16

    Ich bin außerdem bei weitem nicht der einzige, der solche, selbst geschriebenen Programme, hier im Forum präsentiert -.-

  • Multidownloader

    • Irrlicht
    • 29. Januar 2011 um 17:41

    Hallo!
    Mit meinem Multidownloader ist es möglich, Videos aus dem Netz herunterladen und diese konvertieren.
    Schon eine Weile ist's her, dass ich an meinem Multidownloader rumgeschrieben hab.
    Verschiedene Teile des Skriptes lassen wahrscheinlich darauf deuten =)

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=D:\DOWNLOADS\Download.ico
    #AutoIt3Wrapper_outfile=..\..\Fertige Programme\Multidownloader\Multidownloader.exe
    #AutoIt3Wrapper_Res_Language=1031
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <GUIConstants.au3>
    #include<Guilistview.au3>
    #include<array.au3>
    #include<Inet.au3>
    #include<string.au3>
    #include<guibutton.au3>
    #include <WindowsConstants.au3>
    #include <ComboConstants.au3>
    #include<ie.au3>
    $inireader = IniRead(@ScriptDir & "\data.ini", "default", "Ausgabeort", @DocumentsCommonDir)
    $Multidownloader_1 = GUICreate("Multidownloader", 670, 530, 208, 107)
    $ListView1 = GUICtrlCreateListView("Link|Portal|Ausgabeort|Ausgabename|Format|Qualität", 5, 50, 655, 313)
    GUICtrlSendMsg(-1, 0x101E, 0, 250)
    GUICtrlSendMsg(-1, 0x101E, 1, 50)
    GUICtrlSendMsg(-1, 0x101E, 2, 150)
    GUICtrlSendMsg(-1, 0x101E, 3, 150)
    GUICtrlSendMsg(-1, 0x101E, 4, 50)
    GUICtrlSendMsg(-1, 0x101E, 5, 100)
    $Download = GUICtrlCreateGroup("Download hinzufügen", 5, 369, 652, 122)
    $LINK = GUICtrlCreateInput("MTV.video / Youtube-Link hier eingeben", 18, 392, 421, 21)
    $Input1 = GUICtrlCreateInput("Ausgabetitel hier eingeben", 449, 392, 200, 21)
    $Ausgabeort = GUICtrlCreateButton("Ausgabeort ändern", 339, 420, 98, 29, $WS_GROUP)
    $Button1 = GUICtrlCreateButton("Download hinzufügen", 8, 458, 641, 28, $WS_GROUP)
    $Radio1 = GUICtrlCreateRadio("Mp3", 450, 414, 43, 20)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Radio2 = GUICtrlCreateRadio("Mp4", 450, 431, 46, 20)
    $Ausgabe = GUICtrlCreateInput("", 18, 424, 313, 21)
    GUICtrlSetState($Ausgabe, $gui_disable)
    If $inireader = "" Then
    GUICtrlSetData($Ausgabe, @DocumentsCommonDir)
    Else
    GUICtrlSetData($Ausgabe, $inireader)
    EndIf
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Button2 = GUICtrlCreateButton("Liste downloaden", 10, 496, 638, 25, $WS_GROUP)
    $Pic1 = GUICtrlCreatePic(@ScriptDir & "\multidownloader.jpg", 0, 0, 669, 100)
    $Label2 = GUICtrlCreateLabel("Multidownloader by 2$Billie", 3, 3, 320, 36)
    GUICtrlSetFont(-1, 20, 400, 0)
    GUICtrlSetColor(-1, 0x3D95FF)
    GUICtrlSetBkColor(-1, 0x000000)
    WinSetTrans($Multidownloader_1, "", 230)
    GUISetState(@SW_SHOW)
    GUICtrlSetState($Button2, $gui_disable)
    Global $portal = ""
    Global $sformat = True
    Global $blabla = False

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $LINK
    $linkread = GUICtrlRead($LINK)
    If $linkread = "" Then MsgBox(16, "Fehler", "Bitte gib einen Link ein")
    If StringRegExp($linkread, "^(?:http:\/\/)*www\.mtv\.de\/videos") Then $portal = "mtv"
    If StringRegExp($linkread, "(?i)(?:http\:\/\/)?www\.youtube\.\w+\/watch\?v=[\d\w-_]+(?:\s*$|&feature=\w+\s*$)") Then $portal = "youtube"
    If StringRegExp($linkread, "^(?:http:\/\/)*www\.myvideo.de/watch/") Then $portal = "Myvideo"

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

    Case $Ausgabeort
    $OUtPUTFILE = FileSelectFolder("Ausgabeort", "Eigene Dateien", 1, "")
    If $OUtPUTFILE = "" Then
    MsgBox(16, "Fehler", "Bitte gib einen Speicherort an")
    Else
    IniWrite(@ScriptDir & "\data.ini", "default", "Ausgabeort", $OUtPUTFILE)
    $inireadb = IniRead(@ScriptDir & "\data.ini", "default", "Ausgabeort", @DocumentsCommonDir)
    GUICtrlSetData($Ausgabe, $inireadb)
    EndIf
    If $OUtPUTFILE = "arbeitsplatz" Then
    MsgBox(16, "Fehler", "Du kannst keine Datei auf dem Arbeitsplatz speichern")
    GUICtrlSetData($Ausgabe, @DocumentsCommonDir)
    Else
    GUICtrlSetState($Button1, $gui_enable)
    EndIf
    Case $Radio2
    If GUICtrlRead($Radio2) = $GUI_CHECKED Then
    $combobox = GUICtrlCreateCombo("", 504, 424, 113, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "Pessimus|Normal|Optimus", "Optimus")

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

    $blabla = True
    Else
    $blabla = False
    EndIf

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

    Case $Radio1
    If $blabla = True Then
    GUICtrlDelete($combobox)
    EndIf
    Case $Button1
    If $blabla = False Then
    $combobox1 = "normal"
    Else
    $combobox1 = GUICtrlRead($combobox)
    EndIf
    $ausgaberead = GUICtrlRead($Input1)
    If $portal = "Myvideo" Then $combobox1 = "Normal"
    If GUICtrlRead($Radio1) = $GUI_CHECKED Then
    $formatauswahl = "MP3"
    Else
    $formatauswahl = "MP4"
    EndIf
    If $portal = "" Or GUICtrlRead($Ausgabe) = "" Then
    MsgBox(0, "Fehler", "Gib einen gültigen Link/Ausgabeort an!")
    Else
    GUICtrlCreateListViewItem($linkread & "|" & $portal & "|" & GUICtrlRead($Ausgabe) & "|" & $ausgaberead & "|" & $formatauswahl & "|" & $combobox1, $ListView1)
    GUICtrlSetState($Button2, $gui_enable)
    GUICtrlSetData($LINK, "MTV.video / Youtube-Link hier eingeben")
    GUICtrlSetData($Input1, "Ausgabetitel hier eingeben")
    EndIf
    Case $Button2
    linkchecker()
    EndSwitch
    WEnd
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Funktionen;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Func mtvdownload()
    $aItem = _GUICtrlListView_GetItemTextArray($ListView1, 0)
    TrayTip("Info", "Download und Konvertierung von " & $aItem[4] & ". Bitte warten", 30)
    TraySetToolTip("DL/Konv. läuft")
    $url1 = "http://de.esperanto.mtvi.com/www/xml/flv/flvgen.jhtml?vid="
    $url2 = "&hiLoPref=hi"
    $Quelltext = _INetGetSource($aItem[1])
    $sStart = 'var so = new SWFObject("http://media.mtvnservices.com/mgid:uma:video:mtv.de:'
    $sEnde = '",'
    $string = _StringBetween($Quelltext, $sStart, $sEnde)
    If IsArray($string) Then
    $adresse = $url1 & $string[0] & $url2
    $Quelltext2 = _INetGetSource($adresse)
    $string2 = _StringBetween($Quelltext2, '<src>', '</src>')
    $ausgabetitel = $aItem[4]
    $mp3zieladresse = $aItem[3]
    $tempadresse = @ScriptDir & "\video.flv"
    $zieladresse = $mp3zieladresse & "\" & $ausgabetitel & ".mp3"
    $mp4zieladresse = $mp3zieladresse & "\" & $ausgabetitel & ".mp4"
    $downloadbla = InetGet($string2[0], $tempadresse, "", 0)
    $ffmpeg = @ScriptDir & "\ffmpeg.exe"
    $sformat = $aItem[5]
    If $sformat = "MP3" Then
    RunWait('ffmpeg.exe -i "' & $tempadresse & '"' & ' -ab 320k "' & $zieladresse & '"', "", @SW_HIDE)
    EndIf
    If $sformat = "MP4" And $aItem[6] = "Pessimus" Then
    RunWait('ffmpeg.exe -i "' & $tempadresse & '"' & ' -ab 320k -b 500k -r 20 "' & $mp4zieladresse & '"', "", @SW_HIDE)
    EndIf
    If $sformat = "MP4" And $aItem[6] = "Normal" Then
    RunWait('ffmpeg.exe -i "' & $tempadresse & '"' & ' -ab 320k -b 1000k -r 30 "' & $mp4zieladresse & '"', "", @SW_HIDE)
    EndIf
    If $sformat = "MP4" And $aItem[6] = "Optimus" Then
    RunWait('ffmpeg.exe -i "' & $tempadresse & '"' & ' -ab 320k -b 15000k -r 70 "' & $mp4zieladresse & '"', "", @SW_HIDE)
    EndIf
    GUICtrlSetState($Button2, $gui_disable)
    EndIf
    _GUICtrlListView_DeleteItem($ListView1, 0)
    If _GUICtrlListView_GetItemCount($ListView1) = 0 Then
    MsgBox(0, "Tadaaa", "Der Download war erfolgreich")
    GUICtrlSetState($Button1, $gui_enable)
    GUICtrlSetState($Button2, $gui_disable)
    GUISetState(@SW_SHOW, $Multidownloader_1)
    TraySetToolTip("")
    Else
    FileDelete($tempadresse)
    linkchecker()
    EndIf
    EndFunc ;==>mtvdownload
    Func linkchecker()
    $bItem = _GUICtrlListView_GetItemTextArray($ListView1, 0)
    If $bItem[2] = "mtv" Then
    GUISetState(@SW_HIDE, $Multidownloader_1)
    mtvdownload()
    EndIf
    If $bItem[2] = "youtube" Then
    GUISetState(@SW_HIDE, $Multidownloader_1)
    youtubedownload()
    EndIf
    If $bItem[2] = "Myvideo" Then
    GUISetState(@SW_HIDE, $Multidownloader_1)
    myvideodownload()
    EndIf
    EndFunc ;==>linkchecker
    Func youtubedownload()
    $aItem = _GUICtrlListView_GetItemTextArray($ListView1, 0)
    TraySetToolTip("DL/Konv. läuft")
    TrayTip("Info", "Download und Konvertierung von " & $aItem[4] & ". Bitte warten", 30)
    $aItem = _GUICtrlListView_GetItemTextArray($ListView1, 0)
    $source2 = _INetGetSource($aItem[1])
    $linkgen = _StringBetween($source2, "img.src = '", "'")
    $downloadlink2 = StringReplace($linkgen[0], "/generate_204", "/videoplayback")
    $downloadlink2 = StringReplace($downloadlink2, "\/", "/")
    $tempadresse = @ScriptDir & "\video.flv"
    InetGet($downloadlink2, $tempadresse, "", 0)
    $mvmp3zieladresseb = $aItem[3] & "\" & $aItem[4] & ".mp3"
    $mvmp4zieladresseb = $aItem[3] & "\" & $aItem[4] & ".mp4"
    If $aItem[5] = "MP3" Then
    RunWait('ffmpeg.exe -i "' & $tempadresse & '"' & ' -ab 320k "' & $mvmp3zieladresseb & '"', "", @SW_HIDE)
    EndIf
    If $aItem[5] = "Mp4" Then
    RunWait('ffmpeg.exe -i "' & $tempadresse & '"' & ' -ab 320k -b 5000k -r 50 "' & $mvmp4zieladresseb & '"', "", @SW_HIDE)
    EndIf

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

    _GUICtrlListView_DeleteItem($ListView1, 0)
    If _GUICtrlListView_GetItemCount($ListView1) = 0 Then
    MsgBox(0, "Tadaaa", "Der Download war erfolgreich")
    GUISetState(@SW_SHOW, $Multidownloader_1)
    GUICtrlSetState($Button1, $gui_enable)
    GUICtrlSetState($Button2, $gui_disable)
    TraySetToolTip("")
    Else

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

    linkchecker()
    EndIf
    EndFunc ;==>youtubedownload
    Func myvideodownload()
    $aItem = _GUICtrlListView_GetItemTextArray($ListView1, 0)
    TrayTip("Info", "Download und Konvertierung von " & $aItem[4] & ". Bitte warten", 30)
    $id = _StringBetween($aItem[1], "/watch/", "/")
    $source = _INetGetSource($aItem[1])
    $string2 = _StringBetween($source, "rel='image_src' href='", "/thumbs/")
    $downloadlink = $string2[0] & "/" & $id[0] & ".flv"
    $tempadresse = @ScriptDir & "\video.flv"
    InetGet($downloadlink, $tempadresse, "", 0)
    $mvmp3zieladresse = $aItem[3] & "\" & $aItem[4] & ".mp3"
    $mvmp4zieladresse = $aItem[3] & "\" & $aItem[4] & ".mp4"
    If $aItem[5] = "MP3" Then
    RunWait('ffmpeg.exe -i "' & $tempadresse & '"' & ' -ab 320k "' & $mvmp3zieladresse & '"', "", @SW_HIDE)
    EndIf
    If $aItem[5] = "Mp4" Then
    RunWait('ffmpeg.exe -i "' & $tempadresse & '"' & ' -ab 320k -b 5000k -r 50 "' & $mvmp4zieladresse & '"', "", @SW_HIDE)
    EndIf

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

    _GUICtrlListView_DeleteItem($ListView1, 0)
    If _GUICtrlListView_GetItemCount($ListView1) = 0 Then
    MsgBox(0, "Tadaaa", "Der Download war erfolgreich")
    GUISetState(@SW_SHOW, $Multidownloader_1)
    GUICtrlSetState($Button1, $gui_enable)
    GUICtrlSetState($Button2, $gui_disable)
    TraySetToolTip("")
    Else
    linkchecker()

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

    EndIf
    EndFunc ;==>myvideodownload

    [/autoit]


    Eine Progressbar ist leider nicht eingebaut. links mit feature/related klappen nicht(einfach den teil des links wegmachen) - den kleinen Bug werd ich demnächst mal wegzaubern :)
    Ansonsten sollte alles funktionieren.
    Hier der Downloadlink: http://www.2shared.com/file/UXqt2EtT/Multidownloader.html
    Viel Spaß beim Testen ;)

  • Music Player

    • Irrlicht
    • 29. Januar 2011 um 16:16

    Wenn keine Datei im Verzeichnis ist, sollte eher ein Fileopendialog kommen, und keine Msgbox.
    Edit: jetzt hab ich ne mp3 im Verzeichnis und der player hängt sich sofort auf ^^

  • Dateiarbeit

    • Irrlicht
    • 28. Januar 2011 um 23:04

    Ja vorhin war eine Klammer zu viel da. Hab ich vorhin schnell wegeditiert =)

  • Dateiarbeit

    • Irrlicht
    • 28. Januar 2011 um 21:34

    Wenn ich dich richtig verstanden hab... hät ich hier ein beispiel:

    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 192, 124)
    $Button1 = GUICtrlCreateButton("Button1", 67, 125, 410, 146, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $Button1
    $path= fileopendialog("Hallo", "Arbeitsplatz", "(*.txt)")
    $file= Fileopen($path)
    fileclose($file)
    $text= Fileread($path)

    ; Guictrlsetdata($edit1, $text)

    EndSwitch
    WEnd

    [/autoit]


    und btw.. warum txt und nicht ini?

  • Waiter Box

    • Irrlicht
    • 28. Januar 2011 um 21:24

    Nice, gefällt mir und werd ich sicher mal gebrauchen ;)

  • Vocabtrainer

    • Irrlicht
    • 28. Januar 2011 um 19:43

    So:

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Outfile=Vocabtrainer.exe
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

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

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <StaticConstants.au3>
    #include <TreeViewConstants.au3>
    #include <WindowsConstants.au3>
    #include<comboconstants.au3>
    #include<array.au3>
    #include<guilistview.au3>
    #include<file.au3>
    Global $counter = 0

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

    Local $ar[14]

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

    #Region ### START Koda GUI section ### Form=

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

    $Form1_1 = GUICreate("Vocabtrainer", 756, 604, 185, 119)
    $TreeView1 = GUICtrlCreateTreeView(1, 1, 172, 601)
    $TreeView1_0 = GUICtrlCreateTreeViewItem("Vokabellisten", $TreeView1)
    $TreeView1_1 = GUICtrlCreateTreeViewItem("Sprachen", $TreeView1_0)
    $TreeView1_2 = GUICtrlCreateTreeViewItem("Englisch", $TreeView1_1)
    $TreeView1_3 = GUICtrlCreateTreeViewItem("Französisch", $TreeView1_1)
    $TreeView1_4 = GUICtrlCreateTreeViewItem("Latein", $TreeView1_1)
    $TreeView1_5 = GUICtrlCreateTreeViewItem("Italienisch", $TreeView1_1)
    $TreeView1_6 = GUICtrlCreateTreeViewItem("Spanisch", $TreeView1_1)
    $TreeView1_7 = GUICtrlCreateTreeViewItem("Neue Vokabelliste", $TreeView1)
    $ar[0] = GUICtrlCreateListView("Fremdwort|Übersetzung|Eselsbrücke u.a.", 173, 44, 567, 385)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 200)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 200)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 160)
    $ar[1] = GUICtrlCreateLabel(" Neue Vokabelliste", 173, 2, 232, 36)
    GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
    $ar[2] = GUICtrlCreateInput("Fremdwort", 189, 468, 210, 21)
    $ar[3] = GUICtrlCreateInput("Input1", 391, 465, 1, 21)
    $ar[4] = GUICtrlCreateInput("Übersetzung", 401, 468, 189, 21)
    $ar[5] = GUICtrlCreateEdit("Tipp", 189, 496, 402, 67)
    GUICtrlSetLimit(-1, 100)
    GUICtrlSetData(-1, StringFormat("Eselsbrücke\r\n\r\n\r\n\r\n\r\n\r\n"))
    $ar[6] = GUICtrlCreateButton("Vokabel hinzufügen", 189, 565, 195, 27, $WS_GROUP)
    $ar[7] = GUICtrlCreateButton("Editor verlassen", 396, 565, 195, 27, $WS_GROUP)
    $ar[8] = GUICtrlCreateCombo("", 189, 441, 402, 25, $CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Englisch|Französisch|Latein|Italienisch|Spanisch", 0)
    $ar[9] = GUICtrlCreateListView("Vokabellisten", 173, 44, 567, 385)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 560)
    $ar[12] = GUICtrlCreateLabel(" ", 173, 2, 232, 36)
    $ar[10] = GUICtrlCreateButton("Vokabeln noch mal anschauen", 180, 565, 195, 27, $WS_GROUP)
    $ar[11] = GUICtrlCreateButton("Vokabeltest", 396, 565, 195, 27, $WS_GROUP)
    For $a = 0 To 11
    GUICtrlSetState($ar[$a], $gui_hide)
    Next
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $ar[1]
    GUICtrlSetState($TreeView1, $gui_disable)

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

    Case $TreeView1_7
    _show()
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_hide)
    Next
    GUICtrlSetState($TreeView1, $gui_disable)

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

    Case $TreeView1_0
    _hide()
    Case $TreeView1_1
    _hide()

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

    Case $TreeView1_2
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Englisch")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[9])
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Englisch")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $englisch = True
    $franzosisch = False
    $latein = False
    $italienisch = False
    $spanisch = False

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

    Case $TreeView1_3
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Französisch")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[9])
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Französisch")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $franzosisch = True
    $englisch = False
    $latein = False
    $italienisch = False
    $spanisch = False
    Case $TreeView1_4
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Latein")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[9])
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Latein")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $franzosisch = False
    $englisch = False
    $latein = True
    $italienisch = False
    $spanisch = False
    Case $TreeView1_5
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Italienisch")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[9])
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Italienisch")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $franzosisch = False
    $englisch = False
    $latein = False
    $italienisch = True
    $spanisch = False
    Case $TreeView1_6
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Spanisch")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _GUICtrlListView_DeleteAllItems($ar[9])
    _hide()
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Spanisch")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $franzosisch = False
    $englisch = False
    $latein = False
    $italienisch = False
    $spanisch = True
    Case $ar[7]

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

    $items = _GUICtrlListView_GetItemCount($ar[0])
    For $items2 = 0 To $items
    $text = _GUICtrlListView_GetItemText($ar[0], $items2, 0)
    $text2 = _GUICtrlListView_GetItemText($ar[0], $items2, 1)
    $text3 = _GUICtrlListView_GetItemText($ar[0], $items2, 2)
    If GUICtrlRead($ar[8]) = "Englisch" Then
    IniWrite(@ScriptDir & "\Englisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Englisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    ConsoleWrite(@ScriptDir)
    ElseIf GUICtrlRead($ar[8]) = "Französisch" Then
    IniWrite(@ScriptDir & "\Französisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Französisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    ElseIf GUICtrlRead($ar[8]) = "Latein" Then
    IniWrite(@ScriptDir & "\Latein\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Latein\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    ElseIf GUICtrlRead($ar[8]) = "Italienisch" Then
    IniWrite(@ScriptDir & "\Italienisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Italienisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    ElseIf GUICtrlRead($ar[8]) = "Spanisch" Then
    IniWrite(@ScriptDir & "\Spanisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Spanisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    EndIf
    Next
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[0])
    GUICtrlSetState($TreeView1, $gui_enable)
    Case $ar[2]
    If GUICtrlRead($ar[2]) = "" Or GUICtrlRead($ar[2]) = "Fremdwort" Then MsgBox(0, "Fehler", "Ungültiger Eintrag")
    Case $ar[4]
    If GUICtrlRead($ar[4]) = "" Or GUICtrlRead($ar[4]) = "Übersetzung" Then MsgBox(0, "Fehler", "Ungültiger Eintrag")
    Case $ar[8]
    For $a = 0 To 7
    GUICtrlSetState($ar[$a], $gui_enable)
    Next
    GUICtrlSetState($ar[8], $gui_disable)
    Case $ar[6]
    GUICtrlCreateListViewItem(GUICtrlRead($ar[2]) & "|" & GUICtrlRead($ar[4]) & "|" & GUICtrlRead($ar[5]), $ar[0])
    Case $ar[10]
    $indicestext = _GUICtrlListView_GetItemTextString($ar[9], -1)
    Select
    Case $englisch = True

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

    $adresse = @ScriptDir & "\englisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    Case $franzosisch = True

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

    $adresse = @ScriptDir & "\franzosisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    Case $latein = True

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

    $adresse = @ScriptDir & "\latein\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    Case $italienisch = True

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

    $adresse = @ScriptDir & "\italienisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    Case $spanisch = True

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

    $adresse = @ScriptDir & "\spanisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    EndSelect
    Case $ar[11]
    $indicestext = _GUICtrlListView_GetItemTextString($ar[9], -1)
    Select
    Case $englisch = True
    $adresse = @ScriptDir & "\englisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then
    For $i = 1 to ($sectionnames[0] - 1)

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

    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If @error = 1 Then $counter -= 1
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter = $counter + 1
    MsgBox(0, "", $counter)
    Else
    Beep(500, 500)
    EndIf
    Next
    MsgBox(0, "Ergebnis", "Von" & $sectionnames[0] - 1 & " Worten hast du " & $counter & " richtig übersetzt")

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

    Else
    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")
    EndIf
    $counter = 0
    Case $franzosisch = True
    $adresse = @ScriptDir & "\französisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then

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

    For $i = 1 to ($sectionnames[0] - 1)

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

    If @error = 1 Then $counter -= 1
    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter += 1
    Else
    Beep(500, 500)
    EndIf
    Next
    MsgBox(0, "Ergebnis", "Von" & $sectionnames[0] - 1 & " Worten hast du " & $counter & " richtig übersetzt")

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

    $counter = 0
    Else
    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")

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

    EndIf
    Case $latein = True
    $adresse = @ScriptDir & "\latein\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then

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

    For $i = 1 to ($sectionnames[0] - 1)
    If @error = 1 Then $counter -= 1
    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter += 1
    Else
    Beep(500, 500)
    EndIf
    Next
    MsgBox(0, "Ergebnis", "Von" & $sectionnames[0] - 1 & "Worten hast du " & $counter & " richtig übersetzt")

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

    $counter = 0
    Else
    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")
    EndIf
    Case $spanisch = True
    $adresse = @ScriptDir & "\spanisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then
    For $i = 1 to ($sectionnames[0] - 1)

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

    If @error = 1 Then $counter -= 1
    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter += 1
    Else
    Beep(500, 500)
    EndIf

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

    Next
    MsgBox(0, "Ergebnis", "Von " & $sectionnames[0] - 1 & " Worten hast du " & $counter & " richtig übersetzt")

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

    $counter = 0
    Else
    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")
    EndIf
    Case $italienisch = True
    $adresse = @ScriptDir & "\italienisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then

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

    For $i = 1 to ($sectionnames[0] - 1)
    If @error = 1 Then $counter -= 1
    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter += 1
    Else
    Beep(500, 500)

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

    EndIf

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

    Next
    MsgBox(0, "Ergebnis", "Von" & $sectionnames[0] - 1 & " Worten hast du " & $counter & " richtig übersetzt")

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

    $counter = 0
    Else

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

    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")
    EndIf
    EndSelect
    EndSwitch
    WEnd

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

    Func _hide()
    For $a = 0 To 8
    GUICtrlSetState($ar[$a], $gui_hide)
    Next
    EndFunc ;==>_hide
    Func _show()
    For $a = 0 To 8
    GUICtrlSetState($ar[$a], $gui_show)
    Next
    For $a = 0 To 7
    GUICtrlSetState($ar[$a], $gui_disable)
    Next
    GUICtrlSetState($ar[8], $gui_enable)
    EndFunc ;==>_show

    [/autoit]
  • AutoIt Zeit

    • Irrlicht
    • 28. Januar 2011 um 19:23

    So ich habs hingekriegt:

    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    $Form1 = GUICreate("Form1", 633, 447, 192, 124)
    $Button1 = GUICtrlCreateButton("Button1", 121, 91, 421, 108, $WS_GROUP)
    GUISetState(@SW_SHOW)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $Button1
    If Iniread(@Scriptdir&"\test.ini", "datum", "datum", "")<> @mday then
    Msgbox(0, "", "Diese Messagebox wird nur einmal am tag angezeigt")
    Iniwrite(@Scriptdir&"\test.ini", "datum", "datum", @mday)
    else
    Msgbox(0, "", "Heute hast du schon einmal den Button geklickt")
    endif
    EndSwitch
    WEnd

    [/autoit]


    ist nur ne einfache version mit @mday, kannst ja erweitern.
    gruß, billie

  • AutoIt Zeit

    • Irrlicht
    • 28. Januar 2011 um 16:49
    [autoit]

    If @Hour=14 and @min=30 then
    Msgbox(0, "Messagebox", "Diese Nachricht erscheint jeweils um 14.30.")

    [/autoit]
  • Hilfe beim Code ? (auto-it)

    • Irrlicht
    • 25. Januar 2011 um 18:43

    Also die Pause kriegst du so rein:

    [autoit]

    HotKeySet("{F7}", "Pause")
    Func Pause()
    $Paused = NOT $Paused
    While $Paused
    sleep(100)
    ToolTip("Das Skript ist pausiert",0,0)
    WEnd
    ToolTip("")
    EndFunc

    [/autoit]

    Zu dem anderen Problem könnte vielleicht Piexelgetcolor helfen? KP, das Problem is bissel dürftig beschrieben

  • Mein eigenes Chat-Programm mit Server und Client | Smileys, Farben, Formatierung, Bot

    • Irrlicht
    • 24. Januar 2011 um 20:02
    Zitat

    meine Antwort kommt ein bisschen spät, aber klappt es jetzt bei Dir?

    Auch wenns jetzt bissel Offtopic ist, find ichs doch sehr amüsant nach knappen 3 Jahren zu fragen, obs jetzt funktioniert :D

  • Vocabtrainer

    • Irrlicht
    • 23. Januar 2011 um 18:13

    Heute darf ich euch meinen Vocabtrainer präsentieren.
    Man kann Vokabellisten inklusive Eselsbrücken erstellen und sich diese nochmals anschauen. Vokabeltests gibts natürlich auch.
    Da ich selbst alle 2 Wochen etwa nen Vokabeltest in der Schule schreib, und dazu Unmengen an Vokabeln lernen muss (meistens am Tag davor,wenn ich um 18.00 heimkomm :)) erschien mir sowas ziemlich praktisch.
    Das Skript is noch nicht 100% fertig. Es sind noch kleinere Fehler bei den Vokabeltests(arraymäßig) und ein gescheites Design hab ich auch noch nicht gemacht. Edit: Eine gute Stelle für das Erscheinen der Eselsbrücken hab ich noch nicht gefunde.Hier die Source:

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_outfile=Vocabtrainer.exe
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

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

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <StaticConstants.au3>
    #include <TreeViewConstants.au3>
    #include <WindowsConstants.au3>
    #include<comboconstants.au3>
    #include<array.au3>
    #include<guilistview.au3>
    #include<file.au3>
    Global $counter = 0

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

    Local $ar[14]

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

    #Region ### START Koda GUI section ### Form=

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

    $Form1_1 = GUICreate("Vocabtrainer", 756, 604, 185, 119)
    $TreeView1 = GUICtrlCreateTreeView(1, 1, 172, 601)
    $TreeView1_0 = GUICtrlCreateTreeViewItem("Vokabellisten", $TreeView1)
    $TreeView1_1 = GUICtrlCreateTreeViewItem("Sprachen", $TreeView1_0)
    $TreeView1_2 = GUICtrlCreateTreeViewItem("Englisch", $TreeView1_1)
    $TreeView1_3 = GUICtrlCreateTreeViewItem("Französisch", $TreeView1_1)
    $TreeView1_4 = GUICtrlCreateTreeViewItem("Latein", $TreeView1_1)
    $TreeView1_5 = GUICtrlCreateTreeViewItem("Italienisch", $TreeView1_1)
    $TreeView1_6 = GUICtrlCreateTreeViewItem("Spanisch", $TreeView1_1)
    $TreeView1_7 = GUICtrlCreateTreeViewItem("Neue Vokabelliste", $TreeView1)
    $ar[0] = GUICtrlCreateListView("Fremdwort|Übersetzung|Eselsbrücke u.a.", 173, 44, 567, 385)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 200)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 200)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 160)
    $ar[1] = GUICtrlCreateLabel(" Neue Vokabelliste", 173, 2, 232, 36)
    GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
    $ar[2] = GUICtrlCreateInput("Fremdwort", 189, 468, 210, 21)
    $ar[3] = GUICtrlCreateInput("Input1", 391, 465, 1, 21)
    $ar[4] = GUICtrlCreateInput("Übersetzung", 401, 468, 189, 21)
    $ar[5] = GUICtrlCreateEdit("Tipp", 189, 496, 402, 67)
    GUICtrlSetLimit(-1, 100)
    GUICtrlSetData(-1, StringFormat("Eselsbrücke\r\n\r\n\r\n\r\n\r\n\r\n"))
    $ar[6] = GUICtrlCreateButton("Vokabel hinzufügen", 189, 565, 195, 27, $WS_GROUP)
    $ar[7] = GUICtrlCreateButton("Editor verlassen", 396, 565, 195, 27, $WS_GROUP)
    $ar[8] = GUICtrlCreateCombo("", 189, 441, 402, 25, $CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Englisch|Französisch|Latein|Italienisch|Spanisch", 0)
    $ar[9] = GUICtrlCreateListView("Vokabellisten", 173, 44, 567, 385)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 560)
    $ar[12] = GUICtrlCreateLabel(" ", 173, 2, 232, 36)
    $ar[10] = GUICtrlCreateButton("Vokabeln noch mal anschauen", 180, 565, 195, 27, $WS_GROUP)
    $ar[11] = GUICtrlCreateButton("Vokabeltest", 396, 565, 195, 27, $WS_GROUP)
    For $a = 0 To 11
    GUICtrlSetState($ar[$a], $gui_hide)
    Next
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $ar[1]
    GUICtrlSetState($TreeView1, $gui_disable)

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

    Case $TreeView1_7
    _show()
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_hide)
    Next
    GUICtrlSetState($TreeView1, $gui_disable)

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

    Case $TreeView1_0
    _hide()
    Case $TreeView1_1
    _hide()

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

    Case $TreeView1_2
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Englisch")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[9])
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Englisch")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $englisch = True
    $franzosisch = False
    $latein = False
    $italienisch = False
    $spanisch = False

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

    Case $TreeView1_3
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Französisch")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[9])
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Französisch")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $franzosisch = True
    $englisch = False
    $latein = False
    $italienisch = False
    $spanisch = False
    Case $TreeView1_4
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Latein")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[9])
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Latein")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $franzosisch = False
    $englisch = False
    $latein = True
    $italienisch = False
    $spanisch = False
    Case $TreeView1_5
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Italienisch")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[9])
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Italienisch")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $franzosisch = False
    $englisch = False
    $latein = False
    $italienisch = True
    $spanisch = False
    Case $TreeView1_6
    For $i = 9 To 12
    GUICtrlSetState($ar[$i], $gui_show)
    Next
    GUICtrlSetData($ar[12], "Spanisch")
    GUICtrlSetFont($ar[12], 20, 400, 0, "MS Sans Serif")
    _GUICtrlListView_DeleteAllItems($ar[9])
    _hide()
    $set = _FileListToArray("F:\Autoit-Projekte\Vocabtrainer\Spanisch")
    For $i = 1 To $set[0]
    GUICtrlCreateListViewItem($set[$i], $ar[9])
    Next
    $franzosisch = False
    $englisch = False
    $latein = False
    $italienisch = False
    $spanisch = True
    Case $ar[7]

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

    $items = _GUICtrlListView_GetItemCount($ar[0])
    For $items2 = 0 To $items
    $text = _GUICtrlListView_GetItemText($ar[0], $items2, 0)
    $text2 = _GUICtrlListView_GetItemText($ar[0], $items2, 1)
    $text3 = _GUICtrlListView_GetItemText($ar[0], $items2, 2)
    If GUICtrlRead($ar[8]) = "Englisch" Then
    IniWrite(@ScriptDir & "\Englisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Englisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    ConsoleWrite(@ScriptDir)
    ElseIf GUICtrlRead($ar[8]) = "Französisch" Then
    IniWrite(@ScriptDir & "\Französisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Französisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    ElseIf GUICtrlRead($ar[8]) = "Latein" Then
    IniWrite(@ScriptDir & "\Latein\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Latein\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    ElseIf GUICtrlRead($ar[8]) = "Italienisch" Then
    IniWrite(@ScriptDir & "\Italienisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Italienisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    ElseIf GUICtrlRead($ar[8]) = "Spanisch" Then
    IniWrite(@ScriptDir & "\Spanisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Übersetzung", $text2)
    IniWrite(@ScriptDir & "\Spanisch\" & @MDAY & "." & @MON & "." & @YEAR & ".ini", $text, "Eselsbrücke", $text3)
    EndIf
    Next
    _hide()
    _GUICtrlListView_DeleteAllItems($ar[0])
    GUICtrlSetState($TreeView1, $gui_enable)
    Case $ar[2]
    If GUICtrlRead($ar[2]) = "" Or GUICtrlRead($ar[2]) = "Fremdwort" Then MsgBox(0, "Fehler", "Ungültiger Eintrag")
    Case $ar[4]
    If GUICtrlRead($ar[4]) = "" Or GUICtrlRead($ar[4]) = "Übersetzung" Then MsgBox(0, "Fehler", "Ungültiger Eintrag")
    Case $ar[8]
    For $a = 0 To 7
    GUICtrlSetState($ar[$a], $gui_enable)
    Next
    GUICtrlSetState($ar[8], $gui_disable)
    Case $ar[6]
    GUICtrlCreateListViewItem(GUICtrlRead($ar[2]) & "|" & GUICtrlRead($ar[4]) & "|" & GUICtrlRead($ar[5]), $ar[0])
    Case $ar[10]
    $indicestext = _GUICtrlListView_GetItemTextString($ar[9], -1)
    Select
    Case $englisch = True

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

    $adresse = @ScriptDir & "\englisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    Case $franzosisch = True

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

    $adresse = @ScriptDir & "\franzosisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    Case $latein = True

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

    $adresse = @ScriptDir & "\latein\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    Case $italienisch = True

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

    $adresse = @ScriptDir & "\italienisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    Case $spanisch = True

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

    $adresse = @ScriptDir & "\spanisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)

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

    For $i = 1 to (_ArrayMax($sectionnames) - 1)
    MsgBox(0, "Vokabeln vom" & $indicestext, $sectionnames[$i] & "--" & IniRead($adresse, $sectionnames[$i], "Übersetzung", "") & @CRLF & IniRead($adresse, $sectionnames[$i], "Eselsbrücke", ""))
    Next
    EndSelect
    Case $ar[11]
    $indicestext = _GUICtrlListView_GetItemTextString($ar[9], -1)
    Select
    Case $englisch = True
    $adresse = @ScriptDir & "\englisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then
    For $i = 1 to ($sectionnames[0] - 1)

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

    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If @error = 1 Then $counter -= 1
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter = $counter + 1

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

    Else
    Beep(500, 500)
    EndIf
    Next
    MsgBox(0, "Ergebnis", "Von" & $sectionnames[0] - 1 & " Worten hast du " & $counter & " richtig übersetzt")

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

    Else
    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")
    EndIf
    $counter = 0
    Case $franzosisch = True
    $adresse = @ScriptDir & "\französisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then

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

    For $i = 1 to ($sectionnames[0] - 1)

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

    If @error = 1 Then $counter -= 1
    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter += 1
    Else
    Beep(500, 500)
    EndIf
    Next
    MsgBox(0, "Ergebnis", "Von" & $sectionnames[0] - 1 & " Worten hast du " & $counter & " richtig übersetzt")

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

    $counter = 0
    Else
    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")

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

    EndIf
    Case $latein = True
    $adresse = @ScriptDir & "\latein\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then

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

    For $i = 1 to ($sectionnames[0] - 1)
    If @error = 1 Then $counter -= 1
    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter += 1
    Else
    Beep(500, 500)
    EndIf
    Next
    MsgBox(0, "Ergebnis", "Von" & $sectionnames[0] - 1 & "Worten hast du " & $counter & " richtig übersetzt")

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

    $counter = 0
    Else
    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")
    EndIf
    Case $spanisch = True
    $adresse = @ScriptDir & "\spanisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then
    For $i = 1 to ($sectionnames[0] - 1)

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

    If @error = 1 Then $counter -= 1
    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter += 1
    Else
    Beep(500, 500)
    EndIf

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

    Next
    MsgBox(0, "Ergebnis", "Von " & $sectionnames[0] - 1 & " Worten hast du " & $counter & " richtig übersetzt")

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

    $counter = 0
    Else
    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")
    EndIf
    Case $italienisch = True
    $adresse = @ScriptDir & "\italienisch\" & $indicestext
    $sectionnames = IniReadSectionNames($adresse)
    If IsArray($sectionnames) Then

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

    For $i = 1 to ($sectionnames[0] - 1)
    If @error = 1 Then $counter -= 1
    $eingabe = InputBox("Vokabeltest" & $indicestext, "Bitte übersetze:" & $sectionnames[$i], "", " M", "", "", "", "", 18)
    If $eingabe = IniRead($adresse, $sectionnames[$i], "Übersetzung", "") Then
    $counter += 1
    Else
    Beep(500, 500)

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

    EndIf

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

    Next
    MsgBox(0, "Ergebnis", "Von" & $sectionnames[0] - 1 & " Worten hast du " & $counter & " richtig übersetzt")

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

    $counter = 0
    Else

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

    MsgBox(0, "Fehler", "Bitte wähle eine Vokabelliste")
    EndIf
    EndSelect
    EndSwitch
    WEnd

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

    Func _hide()
    For $a = 0 To 8
    GUICtrlSetState($ar[$a], $gui_hide)
    Next
    EndFunc ;==>_hide
    Func _show()
    For $a = 0 To 8
    GUICtrlSetState($ar[$a], $gui_show)
    Next
    For $a = 0 To 7
    GUICtrlSetState($ar[$a], $gui_disable)
    Next
    GUICtrlSetState($ar[8], $gui_enable)
    EndFunc ;==>_show

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


    Im Anhang ist das Programm mit der benötigten Ordnerstruktur.
    Edit:1 Funktioniert nun ziemlich gut. Eselsbrücken sind noch nicht eingebaut.
    Edit2: Omg, vergessen was zu ändern.

    Dateien

    Vocabtrainer .rar 420,07 kB – 390 Downloads
  • Minigame: Lights out

    • Irrlicht
    • 22. Januar 2011 um 11:52
    Zitat von stayawayknight


    Außerdem ist es schade, dass nicht alle Buttons ausgeklickt werden müssen, sondern manche Buttons mehrfach vorkommen.

    Ne Idee wie man das anders in Autoit umsetzen könnte? Oder wie man ne Funktion auslösen könnte, wenn man auf den falschen Button klickt?
    kleiner ansatz reicht

  • Virtuelle Tastatur

    • Irrlicht
    • 22. Januar 2011 um 11:49

    du kannst die if-abfragen auch jeweils in eine zeile schreiben.

  • Funktionen werden übersprungen

    • Irrlicht
    • 19. Januar 2011 um 20:49

    Hallo!
    Ich hab Blackjack mehr oder weniger hier: https://autoit.de/index.php?page…&amp;highlight=
    umgesetzt. Vielleicht hilfts dir ja ein bisschen - das Skript is jedoch viel zu umständlich, ohne arrays etc.

  • Minigame: Lights out

    • Irrlicht
    • 19. Januar 2011 um 19:43

    Hallo,
    heute darf ich euch mein Minigame Lights out präsentieren. Es geht darum, so schnell wie möglich alle Lichter auszuknipsen.
    Das Ergebnis kann man dann mit dem seienr Freunde und Kollegen vergleichen.
    Hier die Source:

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_outfile=F:\Fertige Programme\Lights out\Lights out.exe
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include<array.au3>
    #include<listviewconstants.au3>
    #include<guilistview.au3>
    #include<gdiplus.au3>
    #include<staticconstants.au3>
    local $ar[41]
    global $i= random(1, 40)
    global $counter=0
    global $gerundet=0
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Lights out", 500, 600, 192, 124)
    $knopf1 = GUICtrlCreateButton("Start", 23, 25, 57, 33, $WS_GROUP)
    $ar[1]= GUICtrlCreateButton("", 24, 64, 57, 57, $WS_GROUP)
    $ar[2]= GUICtrlCreateButton("", 82, 64, 57, 57, $WS_GROUP)
    $ar[3]= GUICtrlCreateButton("", 142, 64, 57, 57, $WS_GROUP)
    $ar[4]= GUICtrlCreateButton("", 203, 64, 57, 57, $WS_GROUP)
    $ar[5]= GUICtrlCreateButton("", 264, 64, 57, 57, $WS_GROUP)
    $ar[6]= GUICtrlCreateButton("", 24, 125, 57, 57, $WS_GROUP)
    $ar[7]= GUICtrlCreateButton("", 82, 125, 57, 57, $WS_GROUP)
    $ar[8]= GUICtrlCreateButton("", 142, 125, 57, 57, $WS_GROUP)
    $ar[9]= GUICtrlCreateButton("", 203, 125, 57, 57, $WS_GROUP)
    $ar[10]= GUICtrlCreateButton("", 264, 125, 57, 57, $WS_GROUP)
    $ar[11]= GUICtrlCreateButton("", 25, 185, 57, 57, $WS_GROUP)
    $ar[12]= GUICtrlCreateButton("", 83, 185, 57, 57, $WS_GROUP)
    $ar[13]= GUICtrlCreateButton("", 143, 185, 57, 57, $WS_GROUP)
    $ar[14]= GUICtrlCreateButton("", 204, 185, 57, 57, $WS_GROUP)
    $ar[15]= GUICtrlCreateButton("", 265, 185, 57, 57, $WS_GROUP)
    $ar[16]= GUICtrlCreateButton("", 25, 246, 57, 57, $WS_GROUP)
    $ar[17]= GUICtrlCreateButton("", 83, 246, 57, 57, $WS_GROUP)
    $ar[18]= GUICtrlCreateButton("", 143, 246, 57, 57, $WS_GROUP)
    $ar[19]= GUICtrlCreateButton("", 204, 246, 57, 57, $WS_GROUP)
    $ar[20]= GUICtrlCreateButton("", 265, 246, 57, 57, $WS_GROUP)
    $ar[21]= GUICtrlCreateButton("", 27, 306, 57, 57, $WS_GROUP)
    $ar[22]= GUICtrlCreateButton("", 85, 306, 57, 57, $WS_GROUP)
    $ar[23]= GUICtrlCreateButton("", 145, 306, 57, 57, $WS_GROUP)
    $ar[24]= GUICtrlCreateButton("", 206, 306, 57, 57, $WS_GROUP)
    $ar[25]= GUICtrlCreateButton("", 267, 306, 57, 57, $WS_GROUP)
    $ar[26]= GUICtrlCreateButton("", 27, 367, 57, 57, $WS_GROUP)
    $ar[27]= GUICtrlCreateButton("", 85, 367, 57, 57, $WS_GROUP)
    $ar[28]= GUICtrlCreateButton("", 145, 367, 57, 57, $WS_GROUP)
    $ar[29]= GUICtrlCreateButton("", 206, 367, 57, 57, $WS_GROUP)
    $ar[30]= GUICtrlCreateButton("", 267, 367, 57, 57, $WS_GROUP)
    $ar[31]= GUICtrlCreateButton("", 27, 429, 57, 57, $WS_GROUP)
    $ar[32]= GUICtrlCreateButton("", 85, 429, 57, 57, $WS_GROUP)
    $ar[33]= GUICtrlCreateButton("", 145, 429, 57, 57, $WS_GROUP)
    $ar[34]= GUICtrlCreateButton("", 206, 429, 57, 57, $WS_GROUP)
    $ar[35]= GUICtrlCreateButton("", 267, 429, 57, 57, $WS_GROUP)
    $ar[36]= GUICtrlCreateButton("", 27, 490, 57, 57, $WS_GROUP)
    $ar[37]= GUICtrlCreateButton("", 85, 490, 57, 57, $WS_GROUP)
    $ar[38]= GUICtrlCreateButton("", 145, 490, 57, 57, $WS_GROUP)
    $ar[39]= GUICtrlCreateButton("", 206, 490, 57, 57, $WS_GROUP)
    $ar[40]= GUICtrlCreateButton("", 267, 490, 57, 57, $WS_GROUP)

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

    For $p= 1 to 40
    guictrlsetstate($ar[$p], $gui_disable)
    guictrlsetbkcolor($ar[$p], 0x000000)
    next
    $Button1 = GUICtrlCreateButton("In die Highscore eintragen", 323, 25, 133, 32, $WS_GROUP)
    $ListView1 = GUICtrlCreateListView("Name des Spielers|Zeit", 323, 65, 240, 241)
    Global $B_DESCENDING[_GUICtrlListView_GetColumnCount($ListView1)]
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 110)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 60)
    guictrlsetbkcolor($listview1, 0x000000)
    guictrlsetcolor($listview1, 0xFFFFFF)
    $iniread= IniReadSectionNames(@Scriptdir&"\score.ini")
    $armax=_ArrayMax($iniread)
    For $a=1 to $armax
    guictrlcreatelistviewitem($iniread[$a]&"|"& Iniread(@scriptdir&"\score.ini", $iniread[$a], "1name", ""), $listview1)
    next
    _GUICtrlListView_SimpleSort($listview1, $B_DESCENDING[1], 1)
    soundplay(@Scriptdir&"\st.mp3",0 )
    $Pic1 = GUICtrlCreatePic(@Scriptdir&"\matrix.jpg", 0, 1, 500, 600, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    case $GUI_EVENT_CLOSE
    Exit
    case $knopf1
    For $p= 1 to 40
    guictrlsetstate($ar[$p], $gui_enable)
    next
    $time= Timerinit()
    guictrlsetstate($knopf1, $gui_disable)
    $i= random(1, 40)
    guictrlsetbkcolor($ar[$i], 0x57FF5C)
    case $ar[$i]
    $counter+=1
    If $counter=50 then
    For $p= 1 to 40
    guictrlsetstate($ar[$p], $gui_disable)
    next
    guictrlsetstate($button1, $gui_enable)
    $ungerundet=Timerdiff($time)* 10^(-3)
    $gerundet= StringFormat("%.2f\n", $ungerundet )
    Msgbox(0, "", "Du hast"& $gerundet & "Sekunden gebraucht, um alle Lichter auszuknipsen" )
    $counter=0
    guictrlsetbkcolor($ar[$i], 0xFFFFFF)
    guictrlsetstate($knopf1, $gui_enable)
    else
    guictrlsetbkcolor($ar[$i], 0xFFFFFF)
    $i= random(1, 40)
    guictrlsetbkcolor($ar[$i], 0x57FF5C)
    endif
    case $button1
    If $gerundet=0 then
    msgbox(0, "Fehler", "Du hast noch nicht gespielt")
    Else
    GUICtrlSetState($button1, $gui_disable)
    $input= Inputbox("Dein Name", "Wie ist dein Name?")
    If $input<> 0 and $input<> 1 and $input<> 2 and $input<> 3 and $input<> 4 and $input<> 5 and $input<>6 and $input<> 7 and $input<> 8 and $input<> 9 Then
    Msgbox(0, "Fehler", "Dein Name darf keine Zahlen beeinhalten")
    else
    $name= Iniwrite(@ScriptDir&"\score.ini", $input, "1name", $gerundet)
    $iniread= IniReadSectionNames(@Scriptdir&"\score.ini")
    $armax=_ArrayMax($iniread)
    _GUICtrlListView_DeleteAllItems($listview1)
    For $j=1 to $armax
    guictrlcreatelistviewitem($iniread[$j]&"|"& Iniread(@scriptdir&"\score.ini", $iniread[$j], "1name", ""), $listview1)
    next
    _GUICtrlListView_SimpleSort($listview1, $B_DESCENDING[1],1)
    endif
    endif
    EndSwitch
    wend

    [/autoit]


    Der Downloadlink: http://www.file-upload.net/download-31436…ts-out.rar.html
    Mit dabei ist ne ini, die eigentlich ohnehin erstellt wird^^
    - der Matrixhintergrund
    - und ein kleiner Soundtrack.
    Viel Spaß beim Ausprobieren :)
    Edit1: Kleiner Fehler bemerkt, wird morgen behoben.

  • Koda FormDesinger

    • Irrlicht
    • 19. Januar 2011 um 19:26

    Also bitte, jetzt wirds aber unverschämt!
    Ich wollte dir zeigen, wie dass case und der msgbox und allem geht, und jetzt meldet man mich wegen einem spaßvirus.
    ich glaub, mein schwein pfeift.

  • Koda FormDesinger

    • Irrlicht
    • 19. Januar 2011 um 18:37
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 192, 124)
    $Button1 = GUICtrlCreateButton("Button1", 55, 68, 553, 267, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $button1
    msgbox(16, "Mööp", "Kritischer Fehler")
    EndSwitch
    WEnd

    [/autoit]


    Die Msgbox musst du in das switchdingens setzen.
    Wenn auf button1 geklickt wird, erscheint die msgbox

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™