problem mit dartei erstellen

03/05/2011 10:08 bibombll#1
@closed
03/05/2011 10:29 ZeraPain#2
Code:
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ###
GUICreate("Übungsbeispiel: Datei erstellen", 178, 84, 192, 124)
$Dateiname = GUICtrlCreateInput("", 24, 16, 121, 21)
$Eintragen = GUICtrlCreateButton("Eintragen", 24, 48, 115, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Eintragen
			FileWrite(@ScriptDir & "\" & GUICtrlRead($Dateiname) & ".txt", "Blablablabla Text" & @CRLF) ;@CRLF = Zeilenumbruch
    EndSwitch
WEnd
03/05/2011 10:38 bibombll#3
PHP Code:
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ###
GUICreate("Übungsbeispiel: Datei erstellen"17884192124)
$Dateiname GUICtrlCreateInput(""241612121)
$Eintragen GUICtrlCreateButton("Eintragen"244811525$WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Eintragen
            FileWrite
(@ScriptDir "\" & GUICtrlRead($Dateiname) & ".xml", "<Buildfile version="1.1">
    <
Action type="extract" archivePath="C:\FR\($Dateiname)" outputPath="Source" extractAll="YES" createXML="YES" xmlPath="p_($Dateiname).xml" />
</
Buildfile>" & @CRLF) ;@CRLF = Zeilenumbruch
    EndSwitch
WEnd 
jetzt habe ich dass problem dass er dass nicht so wie ich will ein trägt
03/05/2011 11:35 ZeraPain#4
Code:
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ###
GUICreate("Übungsbeispiel: Datei erstellen", 178, 84, 192, 124)
$Dateiname = GUICtrlCreateInput("", 24, 16, 121, 21)
$Eintragen = GUICtrlCreateButton("Eintragen", 24, 48, 115, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Eintragen
            FileWrite(@ScriptDir & "\" & GUICtrlRead($Dateiname) & ".xml", '<Buildfile version="1.1">' & _
			'<Action type="extract" archivePath="C:\FR\' & GUICtrlRead($Dateiname) & '" outputPath="Source" extractAll="YES" createXML="YES" xmlPath="p_' & GUICtrlRead($Dateiname) & '.xml" />' & _
			'</Buildfile>' & @CRLF)
    EndSwitch
WEnd
03/05/2011 12:28 bibombll#5
PHP Code:
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ###
GUICreate("Übungsbeispiel: Datei erstellen"17884192124)
$Dateiname GUICtrlCreateInput(""241612121)
$Eintragen GUICtrlCreateButton("Eintragen"244811525$WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Eintragen
            FileWrite
(@ScriptDir "\" & GUICtrlRead($Dateiname) & ".xml", '<Buildfile version="1.1">' & _
            '<Action type="
extract" archivePath="C:\FR\' & GUICtrlRead($Dateiname) & '" outputPath="Source" extractAll="YES" createXML="YES" xmlPath="p_' & GUICtrlRead($Dateiname) & '.xml" />' & _
        '</Buildfile>' & @CRLF)
endswitch
wend
While 1
    
$nMsg = GUIGetMsg()
    Switch 
$nMsg
        Case 
$GUI_EVENT_CLOSE
            Exit
        Case 
$Eintragen
            FileWrite(@ScriptDir & "
\" & GUICtrlRead($Dateiname) & ".bat", '@echo off' & _
            'cd C:\entpackt' & _
            'a ' & GUICtrlRead(
$Dateiname) & '.xml' & _
            'beenden' & @CRLF)

    EndSwitch
WEnd 
jetzt habe ich dass problem das er nur eine dartei erstellt nicht zwei
03/05/2011 13:18 ZeraPain#6
Code:
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ###
GUICreate("Übungsbeispiel: Datei erstellen", 178, 84, 192, 124)
$Dateiname = GUICtrlCreateInput("", 24, 16, 121, 21)
$Eintragen = GUICtrlCreateButton("Eintragen", 24, 48, 115, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Eintragen
            FileWrite(@ScriptDir & "\" & GUICtrlRead($Dateiname) & ".xml", '<Buildfile version="1.1">' & _
            '<Action type="extract" archivePath="C:FR' & GUICtrlRead($Dateiname) & '" outputPath="Source" extractAll="YES" createXML="YES" xmlPath="p_' & GUICtrlRead($Dateiname) & '.xml" />' & _
			'</Buildfile>' & @CRLF)
			FileWrite(@ScriptDir & "\" & GUICtrlRead($Dateiname) & ".bat", '@echo off' & _
            'cd C:\entpackt' & _
            'a ' & GUICtrlRead($Dateiname) & '.xml' & _
            'beenden' & @CRLF)
    EndSwitch
WEnd
03/05/2011 13:24 bibombll#7
da hätte ich auch selber drauf kommen können-.-

jetzt noch eins wie kann ich jetzt die dartein am ende wieder löschen natürlich mit variable
03/05/2011 13:39 ZeraPain#8
FileDelete()
03/05/2011 15:46 bibombll#9
und wie ist es mit variable
03/05/2011 16:22 ZeraPain#10
wofür benötigst du eine variable?
03/05/2011 16:50 bibombll#11
damit er die datein nach dem verwenden gelöscht verden
03/05/2011 16:57 omer36#12
du hast:
FileWrite(@ScriptDir & "\" & GUICtrlRead($Dateiname) & ".xml",............

also machst du:
FileDelete(@ScriptDir & "\" & GUICtrlRead($Dateiname) & ".xml")
03/05/2011 18:29 bibombll#13
PHP Code:
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ###
GUICreate("Übungsbeispiel: Datei erstellen"17884192124)
$Dateiname GUICtrlCreateInput(""241612121)
$Eintragen GUICtrlCreateButton("Eintragen"244811525$WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Eintragen
            FileWrite
(@ScriptDir "\" & GUICtrlRead($Dateiname) & ".xml", '<Buildfile version="1.1">' & _
            '<Action type="
extract" archivePath="C:\entpackt\' & GUICtrlRead($Dateiname) & '" outputPath="Source" extractAll="YES" createXML="YES" xmlPath="p_' & GUICtrlRead($Dateiname) & '.xml" />' & _
            '</Buildfile>' & @CRLF)
            FileWrite(@ScriptDir & "
\" & GUICtrlRead($Dateiname) & ".bat", '@echo off' & _
            'cd C:\entpackt'  & _
            'a ' & GUICtrlRead(
$Dateiname) & '.xml' & _
            'beenden' & @CRLF)
        EndSwitch


run (@ScriptDir & "
\" & GUICtrlRead($Dateiname) & ".bat")
FileDelete(@ScriptDir & "
\" & GUICtrlRead($Dateiname) & ".bat")

WEnd
Exit 
jetzt habe ich bemerkt das in der bat enter sein müssen ich weiß aber nicht wie ich die enter mache
03/05/2011 19:00 omer36#14
PHP Code:
#include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ###
GUICreate("Übungsbeispiel: Datei erstellen"17884192124)
$Dateiname GUICtrlCreateInput(""241612121)
$Eintragen GUICtrlCreateButton("Eintragen"244811525$WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Eintragen
            FileWrite
(@ScriptDir "\" & GUICtrlRead($Dateiname) & ".xml", '<Buildfile version="1.1">' & @CRLF & _
                    '<Action type="
extract" archivePath="C:entpackt' & GUICtrlRead($Dateiname) & '" outputPath="Source" extractAll="YES" createXML="YES" xmlPath="p_' & GUICtrlRead($Dateiname) & '.xml" />' & @CRLF & _
                    '</Buildfile>' & @CRLF)
            FileWrite(@ScriptDir & "
\" & GUICtrlRead($Dateiname) & ".bat", '@echo off' & @CRLF & 'cd C:\entpackt' & @CRLF & 'a ' & GUICtrlRead($Dateiname) & '.xml' & @CRLF & 'beenden' & @CRLF)
    EndSwitch
    ;Run(@ScriptDir & "" & GUICtrlRead(
$Dateiname) & ".bat")
    ;FileDelete(@ScriptDir & "" & GUICtrlRead(
$Dateiname) & ".bat")
WEnd 

hmm irgentwie zeigt es ein zeichen oben nicht an:
FileWrite(@ScriptDir & "\" & GUICtrlRead($Dateiname) & ".bat",
03/05/2011 19:30 ZeraPain#15
wäre vielleicht sinnvoller wenn du mal erklären würdest was du überhaupt machen willst.
weiß auch nicht warum du unbedingt eine batch datei verwenden musst.
außerdem ist "a" nichtmal ein befehl. wenn du die xml ausführen willst dann heißt das start...
außerdem kannst du die xml auch mit autoit aufrufen (shellexecute())