Jump to content

[SOLVED] How to save any file in a reverse byte order


Go to solution Solved by mLipok,

Recommended Posts

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 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 Codefor 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 APIErrorLog.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 TaskSchedulerIE 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 stuffOnHungApp handlerAvoid "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"
:naughty:  :ranting:, 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

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

  • 2 months later...

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 Codefor 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 APIErrorLog.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 TaskSchedulerIE 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 stuffOnHungApp handlerAvoid "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"
:naughty:  :ranting:, 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

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 by AZJIO
Link to comment
Share on other sites

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 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

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):

#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

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 ?

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

Link to comment
Share on other sites

  • 1 month later...

I finally do what I need

#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 Codefor 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 APIErrorLog.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 TaskSchedulerIE 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 stuffOnHungApp handlerAvoid "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"
:naughty:  :ranting:, 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

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 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 Codefor 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 APIErrorLog.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 TaskSchedulerIE 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 stuffOnHungApp handlerAvoid "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"
:naughty:  :ranting:, 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

  • 2 weeks later...
  • Solution

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 Codefor 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 APIErrorLog.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 TaskSchedulerIE 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 stuffOnHungApp handlerAvoid "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"
:naughty:  :ranting:, 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...