boltc Posted November 9, 2005 Share Posted November 9, 2005 i want to let my program do this: reads a file, and then search for a word.. is that possible? sorry for my very bad english Link to comment Share on other sites More sharing options...
SpookMeister Posted November 9, 2005 Share Posted November 9, 2005 (edited) one way to do that would be (in pseudo-code): Open the file Start a Loop If you have gotten to the end of the file then exit your loop Read a line from the file Search that line for the word you are looking for If you find it then do whatever it is that you want to do Loop back to the start Close your file Look in the help file for words like: FileOpen() FileReadLine() StringInStr() FileClose() Edited November 9, 2005 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
boltc Posted November 9, 2005 Author Share Posted November 9, 2005 the next problem is the following: i want to read a *.dat file.. but when the program reads a line like: PluginDisableÞÊÞMs Yep, I'm here. - provided by Wake then it only reads this: PluginDisableÞÊÞMs it stops when the comes... so the program still not find what i want... how can i fix this? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 9, 2005 Moderators Share Posted November 9, 2005 um... did you write the .dat file? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
boltc Posted November 9, 2005 Author Share Posted November 9, 2005 no:( Link to comment Share on other sites More sharing options...
boltc Posted November 9, 2005 Author Share Posted November 9, 2005 Latest "beta" version supports binarystring data.Lar.yea it works.. thank you! 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