Jump to content

Search the Community

Showing results for tags 'beta _FileCountLinesEx'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. This is just to demonstrate the latest feature of V3.3.9.4+ Beta (V3.3.9.3 had a problem so it's not recommended to use this.) ConsoleWrite('Number of lines: ' & _FileCountLinesEx(@ScriptFullPath) & @CRLF) ; Works only with V3.3.9.4 and above. This is a different approach to _FileCountLines using the new feature StringSplit('Text, Text', ',')[1]. Func _FileCountLinesEx($sFilePath) Local $sData = StringStripWS(FileRead($sFilePath), 2) If StringInStr($sData, @LF) Then Return StringSplit(StringStripCR($sData), @LF)[0] ElseIf StringInStr($sData, @CR) Then Return StringSplit($sData, @CR)[0] Else If StringLen($sFilePath) Then Return 1 Else Return SetError(1, 0, 0) EndIf EndIf EndFunc ;==>_FileCountLinesEx
×
×
  • Create New...