Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Array.au3>
- #include <File.au3>
- #include <MsgBoxConstants.au3>
- ;Opt("TrayIconHide", 1)
- Opt("TrayIconDebug", 1)
- Opt("WinTitleMatchMode", 2)
- Opt("WinWaitDelay", 500)
- pdf_strip()
- Func pdf_strip()
- Local $aArray, $j = 0, $end_array[1], $file
- If FileExists(@ScriptDir & "\book-test.txt") = 0 Then
- MsgBox(0, "File book-test.txt missing", "Place it in the same folder", 5)
- Exit
- EndIf
- _FileReadToArray(@ScriptDir & "\book-test.txt", $aArray)
- For $i = 5 To UBound($aArray) - 1
- If StringLeft($aArray[$i], 6) <> "Page: " And StringLeft($aArray[$i], 6) <> "------" And StringLeft($aArray[$i], 8) <> "Author: " Then
- _ArrayInsert($end_array, 0, StringStripWS($aArray[$i], 3))
- EndIf
- Next
- _ArrayReverse($end_array)
- _ArrayDelete($end_array, 0)
- _FileWriteFromArray(@ScriptDir & "\book-final.txt", $end_array, 0)
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment