Combobox und createpic

  • HAllo zusammen, ich wollte ein lyric prog schreiben..
    was nur nicht funktioniert ist das das albumbild und das das edit zum txt gesetzt wird... ich probiere mich hier seit stunden tot und weiss nicht warum..

    mag mir vll wer helfen


    Spoiler anzeigen
    [autoit]


    #include

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Kool Savas - Lyrics by Bustd", 431, 482, 261, 123)
    $Songtext = GUICtrlCreateEdit("", 0, 115, 425, 329)
    $Song = GUICtrlCreateCombo("-Song-", 275, 5, 145, 25)
    $str = "Orakel|NA"
    GUICtrlSetData($song,$str)
    $Album = GUICtrlCreateCombo("-Album-", 5, 5, 145, 25)
    GUICtrlSetData(-1,"Tot Oder Lebendig|","Album...")
    ;$Songtext = GUICtrlCreateEdit("", 0, 115, 425, 329)
    GUICtrlSetData(-1, "Songtext")
    $Group1 = GUICtrlCreateGroup("About", 5, 30, 145, 80)
    $Lyrik = GUICtrlCreateLabel("Lyrik sammelung 2007", 10, 55, 109, 17)
    $Label1 = GUICtrlCreateLabel("Kool Savas - Optik Records", 10, 75, 135, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Greetings", 275, 30, 145, 80)
    $Label2 = GUICtrlCreateLabel("Sandra <3, Marco", 285, 45, 89, 17)
    $Label3 = GUICtrlCreateLabel("Sebi, Paul, Aki, Andrè", 285, 65, 107, 17)
    $Label4 = GUICtrlCreateLabel("D-T-O.eu", 285, 85, 48, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Button1 = GUICtrlCreateButton("- Show Me -", 5, 450, 420, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1

    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    ;Exit
    _gui()
    Case $Button1

    $datapic= GUICtrlRead($Album)
    $datatxt= GUICtrlRead($Song)
    ;create the right paths to the file with extension
    $dir=@ScriptDir
    $pfadofpixp1="\ksl\ap\"
    $pfadoftxtp1="\ksl\ly\"
    $pfadpics=($dir & $pfadofpixp1)
    $pfadtxt=($dir & $pfadoftxtp1)
    ;combination for the pics via combobox
    $pip1=".jpg"
    $pip2=($datapic & $pip1)
    $picfinish=($pfadpics & $pip2)
    ;combination for the lyrics via other combobox
    $txtp1=".txt"
    $txtp2=($datatxt & $txtp1)
    $txtpfadfinish=($pfadtxt & $txtp2)
    ;songfile read and set
    $songfile=FileOpen("",& $txtpfadfinish 0)
    $songtxt = FileReadLine($songfile)
    GUICtrlSetData($Songtext,$songtxt)

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

    GUICtrlCreatePic("",& $picfinish 155, 5, 115, 105, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))


    EndSwitch
    WEnd

    [/autoit]

    </GUIConstants.au3>

  • Ist es Absicht dass die Pfade in Klammern kommen? Ich muss es mir noch mal anschauen. Und wenn sie in Klammern kommen, dann kommt ein Leerzeichen vor und nach dem "=".
    Ich denke du wolltest es so (von den Pfaden her, rest des Scripts wird noch angesehen.)

    So interpretiere ich das
    [autoit]

    #include <GUI Constants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Kool Savas - Lyrics by Bustd", 431, 482, 261, 123)
    $Songtext = GUICtrlCreateEdit("", 0, 115, 425, 329)
    $Song = GUICtrlCreateCombo("-Song-", 275, 5, 145, 25)
    $str = "Orakel|NA"
    GUICtrlSetData($song,$str)
    $Album = GUICtrlCreateCombo("-Album-", 5, 5, 145, 25)
    GUICtrlSetData(-1,"Tot Oder Lebendig|","Album...")
    ;$Songtext = GUICtrlCreateEdit("", 0, 115, 425, 329)
    GUICtrlSetData(-1, "Songtext")
    $Group1 = GUICtrlCreateGroup("About", 5, 30, 145, 80)
    $Lyrik = GUICtrlCreateLabel("Lyrik sammelung 2007", 10, 55, 109, 17)
    $Label1 = GUICtrlCreateLabel("Kool Savas - Optik Records", 10, 75, 135, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Greetings", 275, 30, 145, 80)
    $Label2 = GUICtrlCreateLabel("Sandra <3, Marco", 285, 45, 89, 17)
    $Label3 = GUICtrlCreateLabel("Sebi, Paul, Aki, Andrè", 285, 65, 107, 17)
    $Label4 = GUICtrlCreateLabel("D-T-O.eu", 285, 85, 48, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Button1 = GUICtrlCreateButton("- Show Me -", 5, 450, 420, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    #cs ------------------------------------------------------------------------------------
    Exit Warum war das auskommentiert und
    _gui() woher kommt diese Funktion? Falls du sie wirklich erst nach Exit haben willst,
    dann musst du sie OnAutoItExit() nennen, die du dann auch mit Func deklarierst (Siehe Hilfe)
    #ce ------------------------------------------------------------------------------------
    Exit
    Case $Button1
    $datapic = GUICtrlRead($Album)
    $datatxt = GUICtrlRead($Song)
    ;create the right paths to the file with extension
    $dir = @ScriptDir
    $pfadofpixp1 = "\ksl\ap\"
    $pfadoftxtp1 = "\ksl\ly\"
    $pfadpics = $dir & $pfadofpixp1
    $pfadtxt = $dir & $pfadoftxtp1
    ;combination for the pics via combobox
    $pip1 = ".jpg"
    $pip2 = $datapic & $pip1
    $picfinish = $pfadpics & $pip2
    ;combination for the lyrics via other combobox
    $txtp1 = ".txt"
    $txtp2 = $datatxt & $txtp1
    $txtpfadfinish = $pfadtxt & $txtp2
    ;songfile read and set
    $songfile= FileOpen("",& $txtpfadfinish 0)
    $songtxt = FileReadLine($songfile)
    GUICtrlSetData($Songtext, $songtxt)
    GUICtrlCreatePic("",& $picfinish 155, 5, 115, 105, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    EndSwitch
    WEnd

    [/autoit]

    Projekte: Keine größeren (und fertigen)
    Gegen Internetzensur:
    https://epetitionen.bundestag.de/index.php?acti…s;petition=3860
    (Zeichnungsfrist abgelaufen)
    __________________________________________________________________________________________________________________________________
    Dieser Beitrag wurde bereits 264 mal editiert, zuletzt von »Fast2« (30. Februar 2009, 12:99)

  • #cs ------------------------------------------------------------------------------------
    Exit Warum war das auskommentiert und
    _gui() woher kommt diese Funktion? Falls du sie wirklich erst nach Exit haben willst,
    dann musst du sie OnAutoItExit() nennen, die du dann auch mit Func deklarierst (Siehe Hilfe)
    #ce
    -------------

    oh das war wohl noch zu testzwecken und func gui gibts nicht mehr, warum die pfade in klammern sind... weils so eig. immer geklappt hat. hate auf die art und weise bissher noch keine probleme.. is mir wohl irgendwie aus C hängen geblieben alles was ich zusammengüge in klammern zu packen ^^