Jump to content

Search the Community

Showing results for tags 'Text Dump'.

  • 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. hi all, this is one of my latest appI been working on today. it allows you to extract text from files and store them in a text file. it very easy to use you just pass a input and output file shown further down. Hope you find it us full. Comments are welcome as I am sure there maybe better ways to do this. Main Script #include <file.au3> Func ShowError() MsgBox(16, "Incorrect Parameters", "Example:" & @CRLF & @ScriptName & " /I InFile.exe /O InFile.exe.txt") EndFunc ;==>ShowError Func DumpText($SrcFile, $DestFile) Local $Data Local $fp Local $Buffer Local $sLine Local $lines[0] Local $i ;Open file for reading. $fp = FileOpen($SrcFile) ;Read file contents $Data = FileRead($fp) ;Close file FileClose($fp) ;Split up the file using the regex patten. $lines = StringRegExp($Data, "[\s\w\.:\\\@]+", 3, 4) ;Loop though the lines skiping spaces and empty lines For $i = 0 To UBound($lines) - 1 $sLine = StringStripWS($lines[$i], BitOR(1, 2)) If StringLen($sLine) > 2 Then $Buffer &= $sLine & @CRLF EndIf Next ;Open the output file $fp = FileOpen($DestFile, 2) ;Write to the file. FileWrite($fp, $Buffer) ;Close file FileClose($fp) ;Clear up ReDim $lines[0] $Data = "" $Buffer = "" $sLine = "" EndFunc ;==>DumpText Func Main() Local $Cmds ;Command line $Cmds = $CmdLine; ;Check command line parms count If UBound($Cmds) <> 5 Then ;Show error ShowError() ElseIf StringUpper($CmdLine[1]) <> "/I" Then ;Show error ShowError() ElseIf StringUpper($CmdLine[3]) <> "/O" Then ;Show error ShowError() ElseIf Not FileExists($CmdLine[2]) Then ;Show error MsgBox(16, "File Not Found", "Input Filename Was Not Found.") Else DumpText($CmdLine[2], $CmdLine[4]) EndIf EndFunc ;==>Main ;Main program Main() Exit Example Using batch file. REM DUMP TEXT EXAMPLE @ECHO OFF txtdump.exe /i c:\out\test.exe /o C:\out\output.txt
×
×
  • Create New...