mLipok Posted July 18, 2012 Share Posted July 18, 2012 (edited) I want to read file into memory revers byte order and write into a diffrent file I try some concept with for next but when I use 200 kbytes files it was too slow Do anybody have any concept how to do that in fast way ? Edited December 2, 2012 by mlipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
AZJIO Posted July 18, 2012 Share Posted July 18, 2012 How do I know that this is a different concept, if I don't see yours?$sText = FileRead(@ScriptDir&'file.txt') $timer = TimerInit() $aText = StringSplit($sText, '') $sText = '' For $i = $aText[0] To 1 Step -1 $sText &= $aText[$i] Next MsgBox(0, 'time : ' & Round(TimerDiff($timer), 2) & ' msec', $sText) My other projects or all Link to comment Share on other sites More sharing options...
UEZ Posted July 18, 2012 Share Posted July 18, 2012 Is the file a text or binary file?If text you can use _StringReverse() function. If is binary it will a little more complicated.Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
mLipok Posted October 3, 2012 Author Share Posted October 3, 2012 thanks for answer I was little busy so I try to continue now Yes it's binary file for example try any PDF or JPG Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
AZJIO Posted October 4, 2012 Share Posted October 4, 2012 (edited) There is a problem, but I tried to. Some of the characters still disappear.$hFile = FileOpen(@ScriptDir & 'file.gif', 16) $sText = FileRead($hFile) FileClose($hFile) $sText = BinaryToString($sText) $a = StringRegExp($sText, '(?s)(.)', 3) $sText = '' MsgBox(0, 'Size', UBound($a)) ; Exit For $i = UBound($a) - 1 To 0 Step -1 $sText &= $a[$i] Next MsgBox(0, 'Size', StringLen($sText)) ; I do not understand why size is smaller Exit $sText = Binary($sText) $hFile = FileOpen(@ScriptDir & 'file2.gif', 16 + 2) FileWrite($hFile, $sText) FileClose($hFile)I give up#include <Array.au3> $hFile = FileOpen(@ScriptDir & 'file.gif', 16) $sText = FileRead($hFile) FileClose($hFile) $sText = String($sText) ; MsgBox(0, 'Size', $sText) ; Exit ; MsgBox(0, 'Size', StringLen($sText)) $a = StringRegExp($sText, '(?s)(..)', 3) ; $sText = $a[0] $sText = '' ; _ArrayDisplay($a, 'Array') ; MsgBox(0, 'Size', UBound($a)) ; Exit For $i = UBound($a) - 1 To 1 Step -1 ; $sText &= Chr($a[$i]) $sText &= $a[$i] Next ; MsgBox(0, 'Size', StringLen($sText)) ; I do not understand why size is smaller ; Exit $sText = StringToBinary($sText) If @error Then MsgBox(0, 'StringToBinary', 'error') $sText = Binary($sText) If @error Then MsgBox(0, 'Binary', 'error') $hFile = FileOpen(@ScriptDir & 'file2.gif', 16 + 2) FileWrite($hFile, $sText) FileClose($hFile) Edited October 4, 2012 by AZJIO My other projects or all Link to comment Share on other sites More sharing options...
UEZ Posted October 4, 2012 Share Posted October 4, 2012 (edited) Try this: #include <WinAPI.au3> $t = TimerInit() _WinAPI_FileReverse(@ScriptDir & "Test.bmp", @ScriptDir & "Test_reversed.bmp") ConsoleWrite(TimerDiff($t) & @LF) _WinAPI_FileReverse(@ScriptDir & "Test_reversed.bmp", @ScriptDir & "Test_reborn.bmp") ShellExecute(@ScriptDir & "Test_reborn.bmp") Func _WinAPI_FileReverse($sFile, $sNewFile) ;coded by UEZ build 2012-10-04 If Not FileExists($sFile) Then Return SetError(1, 0, 0) Local $iFileSize = FileGetSize($sFile) If $iFileSize > 4294967296 Then Return SetError(2, 0, 0) ; 4294967296 = 2^32 If $sNewFile = "" Then Return SetError(3, 0, 0) Local $hFile= _WinAPI_CreateFile($sFile, 2, 2, 2), $iBytes, $p, $bNewData If Not $hFile Then Return SetError(4, 0, 0) Local $tBuffer = DllStructCreate("byte[" & $iFileSize & "]") Local $tBuffer_new = DllStructCreate("byte[" & $iFileSize & "]") _WinAPI_SetFilePointer($hFile, 0, $FILE_BEGIN) _WinAPI_ReadFile($hFile, DllStructGetPtr($tBuffer), $iFileSize, $iBytes) _WinAPI_CloseHandle($hFile) Local $bData = DllStructGetData($tBuffer, 1) For $p = $iFileSize To 1 Step - 1 $bNewData &= Hex(BinaryMid($bData, $p, 1), 2) Next DllStructSetData($tBuffer_new, 1, Binary("0x" & $bNewData)) $hFile = _WinAPI_CreateFile($sNewFile, 1, 4, 4) If Not $hFile Then Return SetError(5, 0, 0) _WinAPI_WriteFile($hFile, DllStructGetPtr($tBuffer_new), $iFileSize, $iBytes) _WinAPI_CloseHandle($hFile) $tBuffer = 0 $tBuffer_new = 0 Return 1 EndFunc Br, UEZ Edited October 4, 2012 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
trancexx Posted October 4, 2012 Share Posted October 4, 2012 Doesn't the OP want to reverse the byte order? Not read file backward? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
UEZ Posted October 4, 2012 Share Posted October 4, 2012 Yes you are right. I read reverse only and did the file backward stuff. However, here the next try (slightly modified version from the code above): expandcollapse popup#include <WinAPI.au3> $t = TimerInit() _WinAPI_ReverseByteOrder(@ScriptDir & "Test.bmp", @ScriptDir & "Test_reversed.bmp") ConsoleWrite(TimerDiff($t) & @LF) _WinAPI_ReverseByteOrder(@ScriptDir & "Test_reversed.bmp", @ScriptDir & "Test_reborn.bmp") ShellExecute(@ScriptDir & "Test_reborn.bmp") Func _WinAPI_ReverseByteOrder($sFile, $sNewFile, $iW = 2) ;coded by UEZ build 2012-10-04 If Not FileExists($sFile) Then Return SetError(1, 0, 0) Local $iFileSize = FileGetSize($sFile) If $iFileSize > 4294967296 Then Return SetError(2, 0, 0) ; 4294967296 = 2^32 If $sNewFile = "" Then Return SetError(3, 0, 0) Local $hFile= _WinAPI_CreateFile($sFile, 2, 2, 2), $iBytes, $p, $bNewData If Not $hFile Then Return SetError(4, 0, 0) Local $tBuffer = DllStructCreate("byte[" & $iFileSize & "]") Local $tBuffer_new = DllStructCreate("byte[" & $iFileSize & "]") _WinAPI_SetFilePointer($hFile, 0, $FILE_BEGIN) _WinAPI_ReadFile($hFile, DllStructGetPtr($tBuffer), $iFileSize, $iBytes) _WinAPI_CloseHandle($hFile) Local $bData = DllStructGetData($tBuffer, 1) For $p = 1 To $iFileSize Step $iW $bNewData &= ReverseByteOrder(Hex(BinaryMid($bData, $p, $iW), 2)) Next DllStructSetData($tBuffer_new, 1, Binary("0x" & $bNewData)) $hFile = _WinAPI_CreateFile($sNewFile, 1, 4, 4) If Not $hFile Then Return SetError(5, 0, 0) _WinAPI_WriteFile($hFile, DllStructGetPtr($tBuffer_new), $iFileSize, $iBytes) _WinAPI_CloseHandle($hFile) $tBuffer = 0 $tBuffer_new = 0 Return 1 EndFunc Func ReverseByteOrder($bString) Local $aBytes = StringRegExp($bString, ".{2}", 3) Local $i, $sRevers For $i = UBound($aBytes) -1 To 0 Step - 1 $sRevers &= $aBytes[$i] Next Return $sRevers EndFunc Is this what you want? Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
MilesAhead Posted October 4, 2012 Share Posted October 4, 2012 I want to read file into memoryrevers byte orderand write into a diffrent fileI try some concept with for next but when I use 200 kbytes files it was too slowDo anybody have any concept how to do that in fast way ?If you are more interested in getting it done than learning how to implement it then get a Windows port of the Linux "dd" command. Copying from input file to output file with bytes reversed is a one-liner with dd.http://forums.techguy.org/linux-unix/66330-byte-swap.html My Freeware Page Link to comment Share on other sites More sharing options...
mLipok Posted November 19, 2012 Author Share Posted November 19, 2012 I finally do what I need expandcollapse popup#include Local $start_time = TimerInit() $f_plik = @ScriptDir & '\TEST2.pdf' $f_plik = @ScriptDir & '\TEST.pdf' _FileReverse($f_plik) Func _FileReverse($f_file_to_reverse, $b_check_after_Reverse = False) ConsoleWrite('' & @CRLF) $f_handle = FileOpen($f_file_to_reverse, 16 + 32) ;~ FileSetPos($f_handle, 0,0) ;~ $v_test = FileRead($f_handle, 170) $v_test = FileRead($f_handle) ;~ ConsoleWrite('Use Unicode UTF16 Little Endian reading and writing mode. Reading does not override existing BOM.' & @CRLF) ;~ ConsoleWrite($v_test & @CRLF) FileClose($f_handle) ;~ ConsoleWrite('' & @CRLF) ;~ ConsoleWrite('$v_test__1 = ' & $v_test & @CRLF) $v_test__1_len = StringLen($v_test) ;~ ConsoleWrite('$v_test__1_len= ' & $v_test__1_len & @CRLF) $s_BtoS = BinaryToString($v_test) ;~ ConsoleWrite('$v_test__$s_BtoS_Len = ' & StringLen($s_BtoS) & @CRLF) $v_test__StoB = StringToBinary($s_BtoS) ;~ ConsoleWrite('$v_test__StoB = ' & $v_test__StoB & @CRLF) ;~ ConsoleWrite('' & @CRLF) $s_REVERSE2 = _StringReverse2($v_test__StoB) ;~ ConsoleWrite('' & @CRLF) ;~ ConsoleWrite('' & @CRLF) ;~ ConsoleWrite('$v_test__5_LE = ' & StringToBinary($s_REVERSE) & @CRLF) ;~ ConsoleWrite('' & @CRLF) $v_test__5_LE2 = BinaryToString($s_REVERSE2) ;~ ConsoleWrite('$v_test__5_LE2= ' & $v_test__5_LE2 & @CRLF) ;~ ConsoleWrite('' & @CRLF) ;~ ConsoleWrite('$v_test__StoB = ' & $v_test__StoB & @CRLF) ;~ ConsoleWrite('' & @CRLF) ;~ ConsoleWrite('' & @CRLF) ;~ ConsoleWrite('' & @CRLF) ;~ ConsoleWrite('' & @CRLF) ConsoleWrite('ACOMPLISHED' & @CRLF) ConsoleWrite('TESTING' & @CRLF) ;~ ConsoleWrite('' & @CRLF) ;~ ConsoleWrite('' & @CRLF) Local $timer = TimerInit() Local $timer_roznica = $timer - $start_time Local $tick_time_klienta = TimerDiff($start_time) ConsoleWrite($tick_time_klienta / 1000) If $b_check_after_Reverse = True Then For $i = 1 To $v_test__1_len Step 2 $s_1 = StringMid($v_test__StoB, $i, 2) $s_2 = StringMid($v_test__5_LE2, StringLen($v_test__5_LE2) - $i, 2) If $s_1 <> $s_2 Then ConsoleWrite('$s_1 = ' & $s_1 & '<====>' & '$s_2 = ' & $s_2) ConsoleWrite(' HERE ARE DIFF ') ConsoleWrite(@CRLF) EndIf Next EndIf ;~ ConsoleWrite('' & @CRLF) ;~ ConsoleWrite('' & @CRLF) ConsoleWrite('FINISHED' & @CRLF) ;~ ConsoleWrite('' & @CRLF) ConsoleWrite('' & @CRLF) EndFunc ;==>_FileReverse ;###################################################################################################################################### Func _StringReverse2($s_String) Local $i_len = StringLen($s_String) If $i_len < 1 Then Return SetError(1, 0, "") Local $t_chars = DllStructCreate("char[" & $i_len + 1 & "]") DllStructSetData($t_chars, 1, $s_String) Local $a_rev = DllCall("msvcrt.dll", "ptr:cdecl", "_wcsrev", "struct*", $t_chars) ConsoleWrite('--> TEST 1' & @CRLF) If @error Or $a_rev[0] = 0 Then Return SetError(2, 0, "") ConsoleWrite('--> TEST 2' & @CRLF) $v_var_to_return = DllStructGetData($t_chars, 1) ConsoleWrite('--> TEST 3' & @CRLF) Return $v_var_to_return EndFunc ;==>_StringReverse2 it works but there is one problem ... Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted November 19, 2012 Author Share Posted November 19, 2012 (edited) when I use it in that loop For $i = 1 To 100 ConsoleWrite('> test : ' & $i & @CRLF) _FileReverse($f_plik) Next then in console I've got that error > test : 11 --> TEST 1 --> TEST 2 --> TEST 3 ACOMPLISHED TESTING 0.156006657143164FINISHED > test : 12 --> TEST 1 --> TEST 2 !>02:21:45 AutoIT3.exe ended.rc:-1073741819 Edited November 19, 2012 by mlipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Solution mLipok Posted December 2, 2012 Author Solution Share Posted December 2, 2012 SOLVED Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now