Ich ahbe im deutschen Forum von AutoIt mal nach ei9nem Vokabel Trainer gesucht..
Hab auch mehrere Sachen gefunden doch einer hat mir besonders gefallen.
Ich habe mir die .exe und das Script heruntergeladen doch das Scricpt war auf 6 Zeilen zusammen geschnitten, ich ahbe es versucht zu ändern habe aber dann Befehle aus einander gezogen
Könnnte mir jmd helfen?
Scricpt so wie es im Inet war:
PHP Code:
#region ;**** Directives created by AutoIt3Wrapper_GUI ****#AutoIt3Wrapper_Res_Comment=Vokabeltester by Tim Dellmann#AutoIt3Wrapper_Res_Description=Simpler Vokabeltrainer#AutoIt3Wrapper_Res_Fileversion=1.0.0.0#AutoIt3Wrapper_Res_LegalCopyright=Tim Dellmann#AutoIt3Wrapper_Res_Language=1031#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****#include #include #include #include #include #include #include #include #include #include Global $sListPath = @ScriptDir & "/Lists/", $aVocabs[1], $zaehler = 1, $aLaguage, $aNowVocab, $richtig = 0, $falsch = 0If Not FileExists($sListPath) Then DirCreate($sListPath); Hauptmenü#region ### START Koda GUI section ### Form=c:\users\tim\desktop\vokabeltrainer\form1.kxf$Form1 = GUICreate("Vokabeltrainer by Tim Dellmann", 301, 84, 280, 143)GUISetOnEvent(-3, "_Exit")$datei = GUICtrlCreateMenu("&Datei")$crealelist = GUICtrlCreateMenuItem("Vokabelliste erstellen", $datei)GUICtrlSetOnEvent(-1, "_Create_List")$writeTest = GUICtrlCreateMenuItem("Test schreiben", $datei)GUICtrlSetOnEvent(-1, "_TestSchreiben")$end = GUICtrlCreateMenuItem("Beenden", $datei)GUICtrlSetOnEvent(-1, "_Exit")$list_edit = GUICtrlCreateMenuItem("Vokabelliste bearbeiten", $datei)$liste_waehlern = GUICtrlCreateCombo("", 112, 8, 185, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))$Label1 = GUICtrlCreateLabel("Vokabelliste wählen:", 8, 8, 101, 17)$Button1 = GUICtrlCreateButton("Starten", 8, 32, 91, 25, $WS_GROUP)GUICtrlSetOnEvent(-1, "_Start")$deleteList = GUICtrlCreateButton("Ausgewählte Liste löschen", 120, 32, 171, 25, $WS_GROUP)GUICtrlSetOnEvent(-1, "_Deletelist")_CheckLists()GUISetState(@SW_SHOW)#endregion ### END Koda GUI section ###
Opt("GUIOnEventMode", 1)
; Liste erstellen$Form1_1 = GUICreate("Neue Liste erstellen", 261, 476, 192, 124)GUISetOnEvent($GUI_EVENT_CLOSE, "From_Creator2Main", $Form1_1)$Label1 = GUICtrlCreateLabel("Name der Liste:", 8, 8, 78, 17)$name = GUICtrlCreateInput("", 88, 8, 169, 21)$Label2 = GUICtrlCreateLabel("Spalten:", 8, 32, 43, 17)$links = GUICtrlCreateInput("links", 88, 32, 81, 21)$rechts = GUICtrlCreateInput("rechts", 176, 32, 81, 21)$Label3 = GUICtrlCreateLabel("Linke Spalte - Rechte Spalte", 8, 56, 184, 17)$liste = GUICtrlCreateEdit("", 8, 80, 249, 361, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL))$save = GUICtrlCreateButton("Speichern", 8, 448, 243, 25, $WS_GROUP)GUICtrlSetOnEvent(-1, "_Save")GUISetState(@SW_HIDE)$Form2 = GUICreate("Vokabeltrainer by Tim Dellmann", 405, 296, 334, 277)GUISetOnEvent(-3, "_FromTest2Main")$StatusBar1 = _GUICtrlStatusBar_Create($Form2)Dim $StatusBar1_PartsWidth[3] = [150, 250, -1]_GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth)_GUICtrlStatusBar_SetText($StatusBar1, "Vokabeln gesamt:", 0)_GUICtrlStatusBar_SetText($StatusBar1, "Richtig:", 1)_GUICtrlStatusBar_SetText($StatusBar1, "Falsch:", 2)$antwort = GUICtrlCreateInput("antwort", 232, 96, 153, 29, BitOR($ES_CENTER, $ES_AUTOHSCROLL))GUICtrlSetOnEvent(-1, "_check")GUICtrlSetFont(-1, 11, 800, 0, "Comic Sans MS")GUICtrlSetBkColor(-1, 0x808000)$Label1 = GUICtrlCreateLabel("", 16, 96, 167, 27, $SS_CENTER)GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")GUICtrlSetBkColor(-1, 0x808000)$Label2 = GUICtrlCreateLabel("", 8, 8, 183, 27, $SS_CENTER)GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")GUICtrlSetBkColor(-1, 0x808000)$Label3 = GUICtrlCreateLabel("", 216, 8, 183, 27, $SS_CENTER)GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")GUICtrlSetBkColor(-1, 0x808000)$check = GUICtrlCreateButton("Überprüfen", 8, 176, 91, 25, $WS_GROUP)GUICtrlSetOnEvent(-1, "_check")$Label4 = GUICtrlCreateLabel("Label4", 8, 216, 391, 27, $SS_CENTER)GUICtrlSetBkColor(-1, 0x808000)GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")$Pic1 = GUICtrlCreatePic(@ScriptDir & "/Data/Hintergrund.jpg", 0, 0, 404, 276, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))While 1Sleep(10)WEndFunc _FromTest2Main()GUISetState(@SW_HIDE, $Form2)GUISetState(@SW_SHOW, $Form1)_CheckLists()$zaehler = 1$richtig = 0$falsch = 0EndFunc ;==>_FromTest2Main
Func _start()If GUICtrlRead($liste_waehlern) = "" Then Return (MsgBox(64, "Fehler", "Bitte wähle eine VokabellisteListe"))$aVocabs[0] = _FileCountLines($sListPath & GUICtrlRead($liste_waehlern))$aLaguage = StringSplit(FileReadLine($sListPath & GUICtrlRead($liste_waehlern), 1), "-")For $i = 2 To _FileCountLines($sListPath & GUICtrlRead($liste_waehlern))$sLine = FileReadLine($sListPath & GUICtrlRead($liste_waehlern), $i)$aLine = StringSplit($sLine, "-")_ArrayAdd($aVocabs, $sLine)NextGUISetState(@SW_HIDE, $Form1)GUISetState(@SW_SHOW, $Form2)_GUICtrlStatusBar_SetText($StatusBar1, "Vokabeln gesamt:" & _FileCountLines($sListPath & GUICtrlRead($liste_waehlern)) - 1, 0)GUICtrlSetData($Label2, $aLaguage[1])GUICtrlSetData($Label3, $aLaguage[2])$aNowVocab = StringSplit($aVocabs[$zaehler], "-")GUICtrlSetData($Label1, $aNowVocab[1])EndFunc ;==>_startFunc _exit()ExitEndFunc ;==>_exitFunc _Create_List()GUISetState(@SW_HIDE, $Form1)GUISetState(@SW_SHOW, $Form1_1)EndFunc ;==>_Create_List
Func _Save()#RequireAdminFileWrite($sListPath & GUICtrlRead($name) & ".vcl", GUICtrlRead($links) & "-" & GUICtrlRead($rechts) & @CRLF &GUICtrlRead($liste))EndFunc ;==>_SaveFunc From_Creator2Main()GUISetState(@SW_HIDE, $Form1_1)GUISetState(@SW_SHOW, $Form1)_CheckLists()EndFunc ;==>From_Creator2MainFunc _CheckLists()$aLists = _FileListToArray($sListPath);_ArrayDisplay($aLists)If Not IsArray($aLists) Then Return -1For $i = 1 To $aLists[0]$aFile = StringSplit($aLists[$i], "\")GUICtrlSetData($liste_waehlern, $aFile[$aFile[0]])NextEndFunc ;==>_CheckListsFunc _check()If GUICtrlRead($antwort) = $aNowVocab[2] Then$richtig += 1_GUICtrlStatusBar_SetText($StatusBar1, "Richtig:" & $richtig, 1)GUICtrlSetData($Label4, "Richtig!")Else$falsch += 1_GUICtrlStatusBar_SetText($StatusBar1, "Falsch:" & $falsch, 2)GUICtrlSetData($Label4, "Falsch!: " & $aNowVocab[2])EndIf$zaehler += 1If $zaehler = $aVocabs[0] ThenMsgBox(64, "", "Du hast von " & $aVocabs[0] - 1 & " Vokabeln:" & @CRLF & $richtig & " richtig" & @CRLF & $falsch & " falsch." & @CRLF & "Du hast " & Round(Execute($richtig / ($aVocabs[0] - 1) * 100), 2) & "% richtig")_FromTest2Main()EndIf$aNowVocab = StringSplit($aVocabs[$zaehler], "-")GUICtrlSetData($Label1, $aNowVocab[1])GUICtrlSetData($antwort, "")EndFunc ;==>_checkFunc _deletelist()if GUICtrlRead($liste_waehlern) = "" Then Return(MsgBox(64, "Fehler", "Wähle eine Liste aus!"))$yesno = MsgBox(4, "Sicher?", "Möchten sie die ausgewählte Liste löschen?")if $yesno = 6 Then FileDelete($sListPath & GUICtrlRead($liste_waehlern))_GUICtrlComboBox_Destroy($liste_waehlern)$liste_waehlern = GUICtrlCreateCombo("", 112, 8, 185, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))_CheckLists()EndFuncFunc _TestSchreiben()if GUICtrlRead($liste_waehlern) = "" Then Return MsgBox(64, "Fehler" , "Wähle eine Liste aus!")FileWrite(@TempDir &"/list.vlc", $sListPath & GUICtrlRead($liste_waehlern))Run(@ScriptDir &"/Test.exe")EndFunc
PHP Code:
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#region ;**** Directives created by AutoIt3Wrapper_GUI ****#AutoIt3Wrapper_Res_Comment=Vokabeltester by Tim Dellmann#AutoIt3Wrapper_Res_Description=Simpler Vokabeltrainer#AutoIt3Wrapper_Res_Fileversion=1.0.0.0#AutoIt3Wrapper_Res_LegalCopyright=Tim Dellmann#AutoIt3Wrapper_Res_Language=1031#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****#include #include #include #include #include #include #include #include #include #include Global $sListPath = @ScriptDir & "/Lists/", $aVocabs[1], $zaehler = 1, $aLaguage, $aNowVocab, $richtig = 0, $falsch = 0If Not FileExists($sListPath) Then DirCreate($sListPath); Hauptmenü#region ### START Koda GUI section ### Form=c:\users\tim\desktop\vokabeltrainer\form1.kxf$Form1 = GUICreate("Vokabeltrainer by Tim Dellmann", 301, 84, 280, 143)GUISetOnEvent(-3, "_Exit")$datei = GUICtrlCreateMenu("&Datei")$crealelist = GUICtrlCreateMenuItem("Vokabelliste erstellen", $datei)GUICtrlSetOnEvent(-1, "_Create_List")$writeTest = GUICtrlCreateMenuItem("Test schreiben", $datei)GUICtrlSetOnEvent(-1, "_TestSchreiben")$end = GUICtrlCreateMenuItem("Beenden", $datei)GUICtrlSetOnEvent(-1, "_Exit")$list_edit = GUICtrlCreateMenuItem("Vokabelliste bearbeiten", $datei)$liste_waehlern = GUICtrlCreateCombo("", 112, 8, 185, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))$Label1 = GUICtrlCreateLabel("Vokabelliste wählen:", 8, 8, 101, 17)$Button1 = GUICtrlCreateButton("Starten", 8, 32, 91, 25, $WS_GROUP)GUICtrlSetOnEvent(-1, "_Start")$deleteList = GUICtrlCreateButton("Ausgewählte Liste löschen", 120, 32, 171, 25, $WS_GROUP)GUICtrlSetOnEvent(-1, "_Deletelist")_CheckLists()GUISetState(@SW_SHOW)#endregion ### END Koda GUI section ###
Opt("GUIOnEventMode", 1)
; Liste erstellen$Form1_1 = GUICreate("Neue Liste erstellen", 261, 476, 192, 124)GUISetOnEvent($GUI_EVENT_CLOSE, "From_Creator2Main", $Form1_1)
$Label1 = GUICtrlCreateLabel("Name der Liste:", 8, 8, 78, 17)
$name = GUICtrlCreateInput("", 88, 8, 169, 21)
$Label2 = GUICtrlCreateLabel("Spalten:", 8, 32, 43, 17)
$links = GUICtrlCreateInput("links", 88, 32, 81, 21)
$rechts = GUICtrlCreateInput("rechts", 176, 32, 81, 21)
$Label3 = GUICtrlCreateLabel("Linke Spalte - Rechte Spalte", 8, 56, 184, 17)
$liste = GUICtrlCreateEdit("", 8, 80, 249, 361, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL))
$save = GUICtrlCreateButton("Speichern", 8, 448, 243, 25, $WS_GROUP)
GUICtrlSetOnEvent(-1, "_Save")GUISetState(@SW_HIDE)
$Form2 = GUICreate("Vokabeltrainer by Tim Dellmann", 405, 296, 334, 277)
GUISetOnEvent(-3, "_FromTest2Main")
$StatusBar1 = _GUICtrlStatusBar_Create($Form2)Dim $StatusBar1_PartsWidth[3] = [150, 250, -1]_GUICtrlStatusBar_SetParts(
$StatusBar1, $StatusBar1_PartsWidth)_GUICtrlStatusBar_SetText($StatusBar1, "Vokabeln gesamt:", 0)_GUICtrlStatusBar_SetText($StatusBar1, "Richtig:", 1)_GUICtrlStatusBar_SetText($StatusBar1, "Falsch:", 2)
$antwort = GUICtrlCreateInput("antwort", 232, 96, 153, 29, BitOR($ES_CENTER, $ES_AUTOHSCROLL))
GUICtrlSetOnEvent(-1, "_check")
GUICtrlSetFont(-1, 11, 800, 0, "Comic Sans MS")
GUICtrlSetBkColor(-1, 0x808000)
$Label1 = GUICtrlCreateLabel("", 16, 96, 167, 27, $SS_CENTER)
GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
GUICtrlSetBkColor(-1, 0x808000)
$Label2 = GUICtrlCreateLabel("", 8, 8, 183, 27, $SS_CENTER)
GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
GUICtrlSetBkColor(-1, 0x808000)
$Label3 = GUICtrlCreateLabel("", 216, 8, 183, 27, $SS_CENTER)
GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
GUICtrlSetBkColor(-1, 0x808000)
$check = GUICtrlCreateButton("Überprüfen", 8, 176, 91, 25, $WS_GROUP)
GUICtrlSetOnEvent(-1, "_check")
$Label4 = GUICtrlCreateLabel("Label4", 8, 216, 391, 27, $SS_CENTER)
GUICtrlSetBkColor(-1, 0x808000)GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
$Pic1 = GUICtrlCreatePic(@ScriptDir & "/Data/Hintergrund.jpg", 0, 0, 404, 276, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))While 1Sleep(10)WEndFunc _FromTest2Main()
GUISetState(@SW_HIDE, $Form2)GUISetState(@SW_SHOW, $Form1)_CheckLists()$zaehler = 1$richtig = 0$falsch = 0EndFunc ;==>_FromTest2Main
Func _start()If GUICtrlRead($liste_waehlern) = "" Then Return (MsgBox(64, "Fehler", "Bitte wähle eine VokabellisteListe"))
$aVocabs[0] = _FileCountLines($sListPath & GUICtrlRead($liste_waehlern))
$aLaguage = StringSplit(FileReadLine($sListPath & GUICtrlRead($liste_waehlern), 1), "-")For $i = 2 To _FileCountLines($sListPath & GUICtrlRead($liste_waehlern))
$sLine = FileReadLine($sListPath & GUICtrlRead($liste_waehlern), $i)
$aLine = StringSplit($sLine, "-")_ArrayAdd($aVocabs, $sLine)NextGUISetState(@SW_HIDE, $Form1)
GUISetState(@SW_SHOW, $Form2)_GUICtrlStatusBar_SetText($StatusBar1, "Vokabeln gesamt:" & _FileCountLines($sListPath & GUICtrlRead($liste_waehlern)) - 1, 0)GUICtrlSetData($Label2, $aLaguage[1])GUICtrlSetData($Label3, $aLaguage[2])$aNowVocab = StringSplit($aVocabs[$zaehler], "-")
GUICtrlSetData($Label1, $aNowVocab[1])EndFunc ;==>_startFunc _exit()ExitEndFunc ;==>_exitFunc _Create_List()GUISetState(@SW_HIDE, $Form1)GUISetState(@SW_SHOW, $Form1_1)EndFunc ;==>_Create_List
Func _Save()#RequireAdminFileWrite($sListPath & GUICtrlRead($name) & ".vcl", GUICtrlRead($links) & "-" & GUICtrlRead($rechts) & @CRLF &
GUICtrlRead($liste))EndFunc ;==>_SaveFunc From_Creator2Main()GUISetState(@SW_HIDE, $Form1_1)GUISetState(@SW_SHOW, $Form1)_CheckLists()EndFunc ;==>From_Creator2MainFunc _CheckLists()$aLists = _FileListToArray($sListPath);_ArrayDisplay($aLists)If Not IsArray($aLists) Then Return -1For $i = 1 To $aLists[0]$aFile = StringSplit($aLists[$i], "\")GUICtrlSetData($liste_waehlern, $aFile[$aFile[0]])NextEndFunc ;==>_CheckListsFunc _check()If GUICtrlRead($antwort) = $aNowVocab[2] Then$richtig += 1_GUICtrlStatusBar_SetText($StatusBar1, "Richtig:" & $richtig, 1)GUICtrlSetData($Label4, "Richtig!")Else$falsch += 1_GUICtrlStatusBar_SetText($StatusBar1, "Falsch:" & $falsch, 2)GUICtrlSetData($Label4, "Falsch!: " & $aNowVocab[2])EndIf$zaehler += 1If $zaehler = $aVocabs[0] ThenMsgBox(64, "", "Du hast von " & $aVocabs[0] - 1 & " Vokabeln:" & @CRLF & $richtig & " richtig" & @CRLF & $falsch & " falsch." & @CRLF & "Du hast " & Round(Execute($richtig / ($aVocabs[0] - 1) * 100), 2) & "% richtig")_FromTest2Main()EndIf$aNowVocab = StringSplit($aVocabs[$zaehler], "-")GUICtrlSetData($Label1, $aNowVocab[1])GUICtrlSetData($antwort, "")EndFunc ;==>_checkFunc _deletelist()if GUICtrlRead($liste_waehlern) = "" Then Return(MsgBox(64, "Fehler", "Wähle eine Liste aus!"))$yesno = MsgBox(4, "Sicher?", "Möchten sie die ausgewählte Liste löschen?")if $yesno = 6 Then FileDelete($sListPath & GUICtrlRead($liste_waehlern))_GUICtrlComboBox_Destroy($liste_waehlern)$liste_waehlern = GUICtrlCreateCombo("", 112, 8, 185, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))_CheckLists()EndFuncFunc _TestSchreiben()if GUICtrlRead($liste_waehlern) = "" Then Return MsgBox(64, "Fehler" , "Wähle eine Liste aus!")FileWrite(@TempDir &"/list.vlc", $sListPath & GUICtrlRead($liste_waehlern))Run(@ScriptDir &"/Test.exe")EndFunc
Hoffe, dass mir jemand von euch helfen kann..
Zur Info es ist nicht mein Vokabel Trainer!!