#include <GUIConstantsEx.au3> #Include <File.au3> #NoTrayIcon $filetext = FileOpenDialog("Выбор текстового файла.", @ScriptDir & "", "все (*.*)", 1 + 4 ) If @error Then Exit ; Для демонстрации скрипта создайте многострочный text.txt с любым текстом. ;Текст будет конвертирован в скрипт file.au3. ;Это иногда необходимо для функций FileWrite при генерации ini-файлов. Global $aRecords _FileReadToArray($filetext,$aRecords) $text='$text= _'&@CRLF For $i = 1 to UBound($aRecords) - 1 If $aRecords[$i]='' Then $text&='@CRLF & _'&@CRLF Else $text&=''''&$aRecords[$i]&''' & @CRLF & _'&@CRLF EndIf Next $text&='@CRLF'&@CRLF $text&='MsgBox(0, "Сообщение", $text)' $file = FileOpen(@ScriptDir&'\file.au3' ,2) FileWrite($file, $text) FileClose($file) |