Sign in to follow this  
Followers 0
newber

Need some guidance

5 posts in this topic

What i am trying to do is read the value of an input box and then find that value in a text file, so i can copy the text that follows the space after the beginning of that line. Each entry in the text file starts with a 4 digit number followed by a space and then the rest of the text i am looking to copy. So basically someone would enter a value in the input box and then hit a button that would find the appropriate text and copy whatever info if after the space. Any help would be greatly appreciated. Thank you very much.

Share this post


Link to post
Share on other sites



If each entry is on a separate line, the basic way would be to...

Open the file ( FileOpen() )

Iterate through the lines of the file ( FileReadLine() )

Check The first 4 chars of each line ( StringLeft() )

Return the rest of the line if found ( StringTrimLeft() )


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Unfortunately I'm at college at the moment so I can't really help you with the code right now however In the help file I would suggest starting by reading up on fileopen, filereadline, stringinstr and while loops.

Edit: Beat Me To It Woops (Didn't think about stringtrim silly me) :D

Edited by Venix

Share this post


Link to post
Share on other sites

Thank you both for the prompt response. I ll work on writing some code and posting it. So far i was using StringMid and I was able to open a file for reading and trim the first 6 characters i needed to eliminate and then copy the other 45 to the clipboard with Clipput. I am not sure though how i would go about matching it and then telling it that that's the line i want it to work with. Thanks again.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0