anandnz Posted February 17, 2011 Share Posted February 17, 2011 Hi AutoIt Gurus, Thank you for all the help, i am trying to add little bit intelligence to my program which basically publishes the documents and copies to destination. Since the publisher is a third party, i want to confirm the document i have published is same i am copying to the destination folder. My idea is to ensure the document has a file name, same as i am asking to publish at a particular location in file and compare it against it every time. Searching the whole file for the file name may mislead as i may get lot of references. Now how to read a particular location of the file. Say header of the file, which i propose to have same file name i am print FileReadLine() i guess reads line by line all the lines of the document. Is there a quick way to FileOpen() read a particular string at a particular location and confirm that file is right. Appreciate your help. Thanks in advance -- Anand Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 18, 2011 Share Posted February 18, 2011 FileReadLine() accepts a parameter for line number. If you know which line you want, there is no need to loop through them. If you have a byte offset you could use FileSetPos() to go there for FileRead(). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
anandnz Posted February 18, 2011 Author Share Posted February 18, 2011 Thank you PsaltyDs, Probably i will write into template the file name, based on which documen is published. get the filegetpos() to use filesetpos() to read to compare the contents. Thank you. cheers --Anand Link to comment Share on other sites More sharing options...
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