Jump to content

AutoIt.chm Lose 35 Text line


wyf
 Share

Recommended Posts

From the beginning 3.3.13.0

#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <Array.au3>

If FileExists(@ScriptDir & "\@@End@@_检查.Log") Then FileDelete(@ScriptDir & "\@@End@@_检查.Log")
Global $Log_File = FileOpen(@ScriptDir & "\@@End@@_检查.Log", 9)

Global $Au3_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions"
Global $Key_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtKeywords"
Global $UDF_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions"

Global $aAu3 = _FileListToArray($Au3_Dir, "*.txt", $FLTA_FILES, False)
Global $aKey = _FileListToArray($Key_Dir, "*.txt", $FLTA_FILES, False)
Global $aUDF = _FileListToArray($UDF_Dir, "*.txt", $FLTA_FILES, False)

_Checking($Au3_Dir, $aAu3)
_Checking($Key_Dir, $aKey)
_Checking($UDF_Dir, $aUDF)

Func _Checking($Path, $Array)
    For $ii = 1 To $Array[0];
        Local $sFile = $Path & "\" & $Array[$ii]
        Local $iCountLines = _FileCountLines($sFile)
        For $i = $iCountLines To 1 Step -1
            Local $text = FileReadLine($sFile, $i)
            If $text = "@@End@@" Then
                $temp = FileReadLine($sFile, $i + 1)
                If $temp <> "" Then
                    _FileWriteToLine($sFile, $i, "@@End@@" & @CRLF, 1)
                    FileWriteLine($Log_File, $sFile & "  " & $i)
                EndIf
            Else
                ContinueLoop
            EndIf
        Next
    Next
EndFunc   ;==>_Checking
Edited by wyf
Link to comment
Share on other sites

Please explain what it is you're trying to say. You aren't clear at all.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

20 hours ago, BrewManNH said:
6 hours ago, czardas said:

I haven't tried your code, but this could be the consequence of how _FileCountLines() works. The code begins with StringStripWS() to remove trailing white space. Perhaps this is the efPlease explain what it is you're trying to say. You aren't clear at all.fect you are seeing.

 

6 hours ago, czardas said:

I haven't tried your code, but this could be the consequence of how _FileCountLines() works. The code begins with StringStripWS() to remove trailing white space. Perhaps this is the effect you are seeing.

Jon and forums administrator

I do not understand English, The following translated by Google.

I do not seek help!
Help documentation AutoIt.chm Lose 35 lines of text!
I am here this feedback error documents, and the cause of the error!
And Documentation Resources .txt file editor!

I am not a user of English documents, I am using a Chinese help documentation, and I already know the cause of the error, and has been amended!
Therefore, this error has no impact on Chinese users!

This is for the user to consider English !!!

Because do not understand English, also taking into account the code au3 language, editor Jon and documentation resources txt file should be able to understand the true intentions of the script!

If the forum administrator Jon and think this post does not make sense, please delete this post!

Link to comment
Share on other sites

@wyf

Please post here single *.txt file, but in two versions - old and new .
Of course original - I mean english version.

We need to compare to understand what you mean.

 

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

Ok. I play with it a little.

script refactoring:

;~ https://www.autoitscript.com/forum/topic/180499-autoitchm-lose-35-text-line/

#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <Array.au3>

If FileExists(@ScriptDir & "\@@End@@_检查.Log") Then FileDelete(@ScriptDir & "\@@End@@_检查.Log")
Global $hFile_Log = FileOpen(@ScriptDir & "\@@End@@_检查.Log", 9)

Global $Au3_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions"
Global $Key_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtKeywords"
Global $UDF_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions"

Global $aAu3 = _FileListToArray($Au3_Dir, "*.txt", $FLTA_FILES, False)
Global $aKey = _FileListToArray($Key_Dir, "*.txt", $FLTA_FILES, False)
Global $aUDF = _FileListToArray($UDF_Dir, "*.txt", $FLTA_FILES, False)

_Checking($Au3_Dir, $aAu3)
_Checking($Key_Dir, $aKey)
_Checking($UDF_Dir, $aUDF)

FileClose($hFile_Log)

Func _Checking($sPath, $aFileArray)
    Local $sCurrentFile = '', $sAnalyzedLine = '', $sNextLine = ''
    Local $iCountLines = 0

    For $iFile_idx = 1 To $aFileArray[0] ;
        $sCurrentFile = $sPath & "\" & $aFileArray[$iFile_idx]
        $iCountLines = _FileCountLines($sCurrentFile)

        For $iLine_idx = $iCountLines To 1 Step -1
            $sAnalyzedLine = FileReadLine($sCurrentFile, $iLine_idx)
            If $sAnalyzedLine = "@@End@@" Then
                $sNextLine = FileReadLine($sCurrentFile, $iLine_idx + 1)
                If $sNextLine <> "" Then
                    _FileWriteToLine($sCurrentFile, $iLine_idx, "@@End@@" & @CRLF, 1)
                    FileWriteLine($hFile_Log, $sCurrentFile & "  " & $iLine_idx)
                EndIf
            ; Else
            ;   ContinueLoop ; by the way Continue Loop is unnecessary in this case.
            EndIf
        Next

    Next

EndFunc    ;==>_Checking

 

Results:

Spoiler

 

Quote

C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BitRotate.txt  34
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BitRotate.txt  18
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\ControlListView.txt  58
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\ControlTreeView.txt  68
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\DllCall.txt  124
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\DllCallAddress.txt  120
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\DllStructGetData.txt  18
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Send.txt  193
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  514
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  470
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  449
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  440
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  433
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  395
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  362
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  357
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  316
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  296
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  218
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  138
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  122
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\StringRegExp.txt  20
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_GUIToolTip_AddTool.txt  42
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_GUIToolTip_Create.txt  24
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_GUIToolTip_GetBubbleHeight.txt  29
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_GUIToolTip_GetBubbleSize.txt  29
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_GUIToolTip_GetBubbleWidth.txt  29
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_GUIToolTip_GetDelayTime.txt  20
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_GUIToolTip_SetDelayTime.txt  23
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_GUIToolTip_SetTitle.txt  26
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_viClose.txt  21
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_viExecCommand.txt  60
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_viExecCommand.txt  53
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_viGpibBusReset.txt  19
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions\_viGTL.txt  23
 

 

 

 

 

 


Example results: AU3_DOC.ZIP  StringRegExp.txt and modified StringRegExp_wyf.txt 

@wyf It seems that, you have to mean missing newline characters,

AU3_DOC.ZIP

 

HELPFILE_wyf_modification.png

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

1 hour ago, mLipok said:

Ok. I play with it a little.

script refactoring:

;~ https://www.autoitscript.com/forum/topic/180499-autoitchm-lose-35-text-line/

#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <Array.au3>

If FileExists(@ScriptDir & "\@@End@@_检查.Log") Then FileDelete(@ScriptDir & "\@@End@@_检查.Log")
Global $hFile_Log = FileOpen(@ScriptDir & "\@@End@@_检查.Log", 9)

Global $Au3_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions"
Global $Key_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtKeywords"
Global $UDF_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions"

Global $aAu3 = _FileListToArray($Au3_Dir, "*.txt", $FLTA_FILES, False)
Global $aKey = _FileListToArray($Key_Dir, "*.txt", $FLTA_FILES, False)
Global $aUDF = _FileListToArray($UDF_Dir, "*.txt", $FLTA_FILES, False)

_Checking($Au3_Dir, $aAu3)
_Checking($Key_Dir, $aKey)
_Checking($UDF_Dir, $aUDF)

FileClose($hFile_Log)

Func _Checking($sPath, $aFileArray)
    Local $sCurrentFile = '', $sAnalyzedLine = '', $sNextLine = ''
    Local $iCountLines = 0

    For $iFile_idx = 1 To $aFileArray[0] ;
        $sCurrentFile = $sPath & "\" & $aFileArray[$iFile_idx]
        $iCountLines = _FileCountLines($sCurrentFile)

        For $iLine_idx = $iCountLines To 1 Step -1
            $sAnalyzedLine = FileReadLine($sCurrentFile, $iLine_idx)
            If $sAnalyzedLine = "@@End@@" Then
                $sNextLine = FileReadLine($sCurrentFile, $iLine_idx + 1)
                If $sNextLine <> "" Then
                    _FileWriteToLine($sCurrentFile, $iLine_idx, "@@End@@" & @CRLF, 1)
                    FileWriteLine($hFile_Log, $sCurrentFile & "  " & $iLine_idx)
                EndIf
            ; Else
            ;   ContinueLoop ; by the way Continue Loop is unnecessary in this case.
            EndIf
        Next

    Next

EndFunc    ;==>_Checking

 

Results:

  Reveal hidden contents

 

 

 

 

 

 


Example results: AU3_DOC.ZIP  StringRegExp.txt and modified StringRegExp_wyf.txt 

@wyf It seems that, you have to mean missing newline characters,

AU3_DOC.ZIP

 

HELPFILE_wyf_modification.png

OK !!!! mean missing newline characters, Resulting in the loss of the document text.

StringRegExp.txt missing 14 lines of text

Edited by wyf
Link to comment
Share on other sites

That's how I designed the new build script. No real issue as far as I am concerned.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

here is little modified scirpt:

;~ https://www.autoitscript.com/forum/topic/180499-autoitchm-lose-35-text-line/

#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <Array.au3>

If FileExists(@ScriptDir & "\@@End@@_检查.Log") Then FileDelete(@ScriptDir & "\@@End@@_检查.Log")
Global $hFile_Log = FileOpen(@ScriptDir & "\@@End@@_检查.Log", 9)
Global $hFile_Log_2 = FileOpen(@ScriptDir & "\@@End@@_检查_2.Log", 9)

Global $Au3_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions"
Global $Key_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtKeywords"
Global $UDF_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions"

Global $aAu3 = _FileListToArray($Au3_Dir, "*.txt", $FLTA_FILES, False)
Global $aKey = _FileListToArray($Key_Dir, "*.txt", $FLTA_FILES, False)
Global $aUDF = _FileListToArray($UDF_Dir, "*.txt", $FLTA_FILES, False)

_Checking($Au3_Dir, $aAu3)
_Checking($Key_Dir, $aKey)
_Checking($UDF_Dir, $aUDF)

FileClose($hFile_Log)
FileClose($hFile_Log_2)

Func _Checking($sPath, $aFileArray)
    Local $sCurrentFile = '', $sAnalyzedLine = '', $sNextLine = ''
    Local $iCountLines = 0

    For $iFile_idx = 1 To $aFileArray[0] ;
        $sCurrentFile = $sPath & "\" & $aFileArray[$iFile_idx]
        $iCountLines = _FileCountLines($sCurrentFile)

        For $iLine_idx = $iCountLines To 1 Step -1
            $sAnalyzedLine = FileReadLine($sCurrentFile, $iLine_idx)
            If $sAnalyzedLine = "@@End@@" Then
                $sNextLine = FileReadLine($sCurrentFile, $iLine_idx + 1)
                If $sNextLine <> "" Then
                    _FileWriteToLine($sCurrentFile, $iLine_idx, "@@End@@" & @CRLF, 1)
                    FileWriteLine($hFile_Log, $sCurrentFile & "  " & $iLine_idx)
                Else
                    FileWriteLine($hFile_Log_2, $sCurrentFile & "  " & $iLine_idx)
                EndIf
            EndIf
        Next

    Next

EndFunc    ;==>_Checking

 

Remarks:
The second file log shows that there is many (much more) other files, which have such, a new line just after @@End@@
So it's kind of exception to the rule (inconsistency). I think that's what Members wanted to tell us.


Edit:
EXAMPLE:
 

Spoiler

 

Quote

C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Abs.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\ACos.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\AdlibRegister.txt  22
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\AdlibRegister.txt  16
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\AdlibUnRegister.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Asc.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\AscW.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\ASin.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Assign.txt  30
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Assign.txt  24
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\ATan.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\AutoItSetOption.txt  158
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\AutoItSetOption.txt  22
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\AutoItSetOption.txt  16
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\AutoItWinSetTitle.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Beep.txt  16
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Binary.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BinaryLen.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BinaryMid.txt  18
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BinaryToString.txt  30
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BinaryToString.txt  22
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BitAND.txt  18
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BitNOT.txt  14
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BitOR.txt  18
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BitRotate.txt  28
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BitShift.txt  16
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BitXOR.txt  18
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BlockInput.txt  35
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BlockInput.txt  23
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\BlockInput.txt  17
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Break.txt  18
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Call.txt  22
C:\!WORK\AU3_DOC\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions\Call.txt  16
 

The complete log contains 6220 entries.

 

 

 

 

 

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

14 minutes ago, mLipok said:

here is little modified scirpt:

;~ https://www.autoitscript.com/forum/topic/180499-autoitchm-lose-35-text-line/

#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <Array.au3>

If FileExists(@ScriptDir & "\@@End@@_检查.Log") Then FileDelete(@ScriptDir & "\@@End@@_检查.Log")
Global $hFile_Log = FileOpen(@ScriptDir & "\@@End@@_检查.Log", 9)
Global $hFile_Log_2 = FileOpen(@ScriptDir & "\@@End@@_检查_2.Log", 9)

Global $Au3_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtFunctions"
Global $Key_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtKeywords"
Global $UDF_Dir = @ScriptDir & "\autoit-docs-v3.3.15.0-src\docs\autoit\english\txt2htm\txtlibfunctions"

Global $aAu3 = _FileListToArray($Au3_Dir, "*.txt", $FLTA_FILES, False)
Global $aKey = _FileListToArray($Key_Dir, "*.txt", $FLTA_FILES, False)
Global $aUDF = _FileListToArray($UDF_Dir, "*.txt", $FLTA_FILES, False)

_Checking($Au3_Dir, $aAu3)
_Checking($Key_Dir, $aKey)
_Checking($UDF_Dir, $aUDF)

FileClose($hFile_Log)
FileClose($hFile_Log_2)

Func _Checking($sPath, $aFileArray)
    Local $sCurrentFile = '', $sAnalyzedLine = '', $sNextLine = ''
    Local $iCountLines = 0

    For $iFile_idx = 1 To $aFileArray[0] ;
        $sCurrentFile = $sPath & "\" & $aFileArray[$iFile_idx]
        $iCountLines = _FileCountLines($sCurrentFile)

        For $iLine_idx = $iCountLines To 1 Step -1
            $sAnalyzedLine = FileReadLine($sCurrentFile, $iLine_idx)
            If $sAnalyzedLine = "@@End@@" Then
                $sNextLine = FileReadLine($sCurrentFile, $iLine_idx + 1)
                If $sNextLine <> "" Then
                    _FileWriteToLine($sCurrentFile, $iLine_idx, "@@End@@" & @CRLF, 1)
                    FileWriteLine($hFile_Log, $sCurrentFile & "  " & $iLine_idx)
                Else
                    FileWriteLine($hFile_Log_2, $sCurrentFile & "  " & $iLine_idx)
                EndIf
            EndIf
        Next

    Next

EndFunc    ;==>_Checking

 

Remarks:
The second file log shows that there is many (much more) other files, which have such, a new line just after @@End@@
So it's kind of exception to the rule (inconsistency). I think that's what Members wanted to tell us.


Edit:
EXAMPLE:
 

  Reveal hidden contents

 

The complete log contains 6220 entries.

 

 

 

 

 

Thank you

Link to comment
Share on other sites

@wyf We have a separate forum for Chinese users, did you try it?

我们对中国用户的独立论坛,你尝试了吗?

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

@wyf I can't translate your post, but it does not look like a question to me... :unsure:

我不会翻译您的文章,但它看起来并不像我的一个问题...

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

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