6105 Posted October 25, 2012 Posted October 25, 2012 (edited) Dear Autoit community,i have a problem with parsing my file,can anybody give me some tips who i'll can do it?i read help file, but can not find the solution, thanks.My file:RandomWords111 Fixed: RandomWordsFixed1: RandomNrFixed2: Random%Fixed4Random-Nr4$Random-N7Fixed8i need tips how i'll can to navigate and take any needed random number or word in the file.I'll try to surf more this forum, if i'll find solution i'll update topic.Thank you. Edited October 25, 2012 by 6105 [center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]
jdelaney Posted October 25, 2012 Posted October 25, 2012 would you paste in the actual data (remove sensitive info), and maybe surround the data you are looking for with [] just so we can see if a regexp would be easily coded IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
6105 Posted October 25, 2012 Author Posted October 25, 2012 (edited) #jdelaney, sorry i don't understand your question but if you ask about code, i try now this: $sText = FileRead("C:UsersJohnDocumentstest.txt") $aString = _StringBetween($sText, "Fixed", "Fixed8") ConsoleWrite("$aString = " & $aString & @CRLF) $OutputFriends = StringStripWS($aString[0], 4) _ArrayAdd($avArray, $OutputFriends) _ArrayDisplay($aString) ConsoleWrite("$OutputFriends = " & $OutputFriends & @CRLF) It put all the needed words in console, separated by new line, i think maybe to find posibility to read by line, if i'll can't parse. but, StringRegExp code, will need to look like it: $sText = FileRead("C:UsersJohnDocumentstest.txt") $aString = StringRegExp($sText,'11Fixed(.*[d+]).*Fixed1',1) $OutputFriends = StringStripWS($aString[0], 8) ConsoleWrite("$OutputFriends = " & $OutputFriends & @CRLF) Problem, is in search string "'11Fixed(.*[d+]).*Fixed1'" i'm not sure how to navigate in it, i have 2 lines: 1. Fixed word 2. Needed number How i can find fixed word and take needed number from next line? Thank you so much for any tips. Edited October 25, 2012 by 6105 [center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now