Fehler beim Compilen mit FileInstall

  • hallo, ich habe ein problem mit einem meiner scripts. ich hab mir einen mini chat gebastelt und wollt mir mit der FileInstall funktion ein paar "makros" reinbauen.
    so weit so gut, wenn ich das script ausführe funktioniert es auch einwandfrei...... nur wenn ich es versuche zu compilen kommt andauernd ein error.

    hier das komplette script:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <EditConstants.au3>
    #include <StaticConstants.au3>
    #include <GUIConstants.au3>
    #Include <File.au3>
    #Include <GuiEdit.au3>
    #include <GuiStatusBar.au3>
    #include <ScrollBarConstants.au3>

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

    FileInstall(@ScriptDir & "/hallo.mp3",@WindowsDir & "/Chat/hallo.mp3",1)

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

    $openlog = FileOpen(@WindowsDir & "/Chat/" & @MDAY & "." & @MON & "." & @YEAR & ".txt",0)
    If $openlog = -1 Then
    If DirGetSize(@WindowsDir & "/Chat") = -1 Then
    DirCreate(@WindowsDir & "/Chat")
    EndIf
    $openlog = _FileCreate(@WindowsDir & "/Chat/" & @MDAY & "." & @MON & "." & @YEAR & ".txt")
    EndIf
    $socket = -1
    $socket2 = -1
    TCPStartup()
    If @error = 1 Then Exit

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

    $gui = GUICreate("ip",100,60)
    GUISetState(@SW_SHOW)
    $combo = GUICtrlCreateCombo(@IPAddress1,0,0,90,80)
    If @IPAddress2 <> "0.0.0.0" Then
    GUICtrlSetData(-1, @IPAddress2)
    EndIf
    If @IPAddress3 <> "0.0.0.0" Then
    GUICtrlSetData(-1, @IPAddress3)
    EndIf
    If @IPAddress4 <> "0.0.0.0" Then
    GUICtrlSetData(-1, @IPAddress4)
    EndIf
    $button = GUICtrlCreateButton("OK",0,20,100,40)
    Global $ip1
    While 1
    $msg = GUIGetMsg()
    If $msg = $button Then
    $ip1 = GUICtrlRead($combo)
    GUIDelete($gui)
    ExitLoop
    EndIf
    If $msg = $GUI_EVENT_CLOSE Then
    $ip1 = GUICtrlRead($combo)
    GUIDelete($gui)
    ExitLoop
    EndIf
    WEnd
    $ip = InputBox("IP","Server-IP eingeben")
    $main = TCPListen($ip1,50,1)
    $socket = -1
    Do
    $socket = TCPAccept($main)
    $socket2 = TCPConnect($ip,50)
    Until $socket <> -1 Or $socket2 <> -1
    GUICreate("Chat V0.5",500,500)
    $edit = GUICtrlCreateEdit("",0,0,500,250)
    $edit2 = GUICtrlCreateEdit("",0,250,500,200)
    $button = GUICtrlCreateButton("Send",0,450,100,50)
    GUISetState(@SW_SHOW)
    $readlog = FileRead($openlog)
    GUICtrlSetData($edit,$readlog)
    While 1
    $msg = GUIGetMsg()
    $recive = TCPRecv($socket,1000)
    $read = GUICtrlRead($edit)
    $send = GUICtrlRead($edit2)
    Select
    Case $socket = -1
    $socket = TCPAccept($main)
    Case $socket2 = -1
    $socket2 = TCPConnect($ip,50)
    Case $recive <> ""
    check($recive,2)
    Case $msg = $button
    check($send,1)
    EndSelect
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

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

    Func check($chat,$check)
    $split = StringSplit($chat,":")
    If FileExists(@WindowsDir & "/Chat/" & $split[2] & ".mp3") Then
    SoundPlay(@WindowsDir & "/Chat/" & $split[2] & ".mp3")
    $chat2 = $split[1] & " " & $split[3]
    Else
    $chat2 = $split[1]
    EndIf
    If $check = 1 Then
    senden($chat,$chat2)
    ElseIf $check = 2 Then
    empfangen($chat2)
    Else
    EndIf
    EndFunc

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

    Func senden($send,$log)
    TCPSend($socket2, @ComputerName & " -> " & $send & " (" & @HOUR & ";" & @MIN & ";" & @SEC & ")")
    FileClose($openlog)
    $openlog3 = FileOpen(@WindowsDir & "/Chat/" & @MDAY & "." & @MON & "." & @YEAR & ".txt",1)
    $writelog = FileWriteLine($openlog3, @ComputerName & " -> " & $log & " (" & @HOUR & ";" & @MIN & ";" & @SEC & ")")
    FileClose($openlog)
    $openlog2 = FileOpen(@WindowsDir & "/Chat/" & @MDAY & "." & @MON & "." & @YEAR & ".txt",0)
    $readlog = FileRead($openlog2)
    GUICtrlSetData($edit, $readlog)
    $iLen = _GUICtrlEdit_GetTextLen($edit)
    _GUICtrlEdit_SetSel($edit, $iLen, $iLen)
    _GUICtrlEdit_Scroll($edit, $SB_SCROLLCARET)
    EndFunc

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

    Func empfangen($empfang)
    FileClose($openlog)
    $openlog3 = FileOpen(@WindowsDir & "/Chat/" & @MDAY & "." & @MON & "." & @YEAR & ".txt",1)
    $writelog = FileWriteLine($openlog3, $empfang)
    FileClose($openlog)
    $openlog2 = FileOpen(@WindowsDir & "/Chat/" & @MDAY & "." & @MON & "." & @YEAR & ".txt",0)
    $readlog = FileRead($openlog2)
    GUICtrlSetData($edit, $readlog)
    $iLen = _GUICtrlEdit_GetTextLen($edit)
    _GUICtrlEdit_SetSel($edit, $iLen, $iLen)
    _GUICtrlEdit_Scroll($edit, $SB_SCROLLCARET)
    EndFunc

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

    Func OnAutoItExit()
    TCPShutdown()
    FileClose($openlog)
    FileDelete(@WindowsDir & "/Chat/hallo.mp3")
    EndFunc

    [/autoit]


    und hier im anhang, der error, der andauernd kommt Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.
    thx schonmal im voraus :)

    Bilder

    Mfg. PCKing


    Mein PC

    CPU: AMD FX 8350 8x4.00GHz
    Ram: 8GB DDR3
    Grafikkarte: Nvidia Geforce GTX 960 (4GB)
    Festplatten: 500GB SSD 1TB HDD
    Laufwerk: Blueray RW+ Brenner

  • ok, so funktioniert es, wenn ich den pfad komplett eingebe, gibt es auch eine möglichkeit den pfad flexibel zu machen? weil ich möchte das über hamachi mit ein paar kumpels testen und so und nich alle haben C: als "hauptfestplatte" wo windows drauf ist. mansche haben windows ja auch auf H: gespeichert. wie kann man das rausfinden?

    Mfg. PCKing


    Mein PC

    CPU: AMD FX 8350 8x4.00GHz
    Ram: 8GB DDR3
    Grafikkarte: Nvidia Geforce GTX 960 (4GB)
    Festplatten: 500GB SSD 1TB HDD
    Laufwerk: Blueray RW+ Brenner

  • was genau soll das script denn machen?

    der zielpfad kann ja mit variablen gewählt werden. nur die dateien die du in die exe beim kompilieren mit reinpackst müssen einen pfad ohne variablen, makros und ähnlichen haben.

  • Das script an sich soll einen chat machen, und ich wollt in meinen chat noch ein paar makros reinbauen, z.B. :hallo: dann soll es die hallo.mp3 abspielen.
    das klappt auch, nur wenn ich das compile klappts nicht
    das heisst wenn ich das so schreiben würde:

    [autoit]

    FileInstall("C:\hallo.mp3", @WindowsDir & "\Chat\hallo.mp3")

    [/autoit]


    funktioniert es?

    Mfg. PCKing


    Mein PC

    CPU: AMD FX 8350 8x4.00GHz
    Ram: 8GB DDR3
    Grafikkarte: Nvidia Geforce GTX 960 (4GB)
    Festplatten: 500GB SSD 1TB HDD
    Laufwerk: Blueray RW+ Brenner

  • sorry für doppelpost, aber es funktioniert so, thx für die schnelle antwort ^^

    Mfg. PCKing


    Mein PC

    CPU: AMD FX 8350 8x4.00GHz
    Ram: 8GB DDR3
    Grafikkarte: Nvidia Geforce GTX 960 (4GB)
    Festplatten: 500GB SSD 1TB HDD
    Laufwerk: Blueray RW+ Brenner