Hi, epvp
Und zwar möchte ich "Tidy" für HTML mit Run ausführen.
Code:
#include <Constants.au3>
Func _Tidy_HTML($sPath)
Local $iPID, $sRead
$iPID = Run(@ScriptDir & '\tidyhtml.exe --clean y --indent "yes" --indent-spaces "2" --wrap "300" --wrap-attributes y "' & $sPath & '"', @ScriptDir, @SW_HIDE,$STDERR_CHILD + $STDOUT_CHILD)
While 1
$sRead &= StdoutRead($sRead)
If @error Then ExitLoop
WEnd
Return $sRead
EndFunc ;==>_Tidy_HTML
Es funktioniert nicht :(
Was ist da los?
Es soll die html Datei $sPath cleanen, formatieren etc, es passiert aber gar nichts und $sRead ist leer.
Hier gibt es das ganze online:
[Only registered and activated users can see links. Click Here To Register...]
€dit:
Code:
Func _Tidy_HTML($sPath)
Local $iPID, $sRead
$iPID = Run(@ScriptDir & '\tidyhtml.exe --clean y --indent "yes" --indent-spaces "2" --wrap "300" --wrap-attributes y --write-back yes "' & $sPath & '" -f tidyhtml.log', @ScriptDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
$sRead = FileRead(@ScriptDir & '\tidyhtml.log')
Return $sRead
EndFunc ;==>_Tidy_HTML
Jetzt funktioniert es :)
Aber das direkte Auslesen ohne den Umweg über FileRead hab ich nicht hin bekommen.
MfG