Sign in to follow this  
Followers 0

Finding a certain line in a text file?

6 posts in this topic

2 Questions!

I need to find a specific line in a text file. What function can I use to do this? I don't want to have it open notepad and do a Ctrl+F. I need it all to run in the background so as to not affect other programs.

I'm searching the file for something similiar to this:

'<td><tr><img src="http://'

Also, how do you do FTP uploads with AutoIt? :whistle: I see the new FTP proxy setup, but how do you upload files? It it just for INetGet? Would some sort of Com function work for this?

This program downloads a site to a txt file, I need to find the new image link in the text, then upload just the new link in a file to a ftp.

Any and ALL suggestions are welcome!

I appreciate all posts!

Thanks :dance:


Share this post

Link to post
Share on other sites

#2 ·  Posted (edited)

I think you might be able to do something like

$file = "downloadedsite.txt"

While 1

$line = FileReadLine($file)

If @error = -1 Then ExitLoop

if $line = "<td><tr><img src=" Then

your actions here



Edited by SupraNatural

Visit for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!

Share this post

Link to post
Share on other sites

#3 ·  Posted (edited)

Yeah, just got that part working thanks, SupraNatural! Got the missing bit.

But now, is there anyway to do FTP uploads? I don't think there is a function, and I tried saving it in notepad as:

But it said invalid. Any other way to do an upload? I might just have to open SmartFTP and do the upload.

Any ideas?

Edited by Nanascalala

Share this post

Link to post
Share on other sites

I can't find an upload function but i think since windows has a built in FTP capability you might be able to find something there.


Search the "Scripts and Scraps" forum for "+ftp +udf".



__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

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