Jump to content

Finding a certain line in a text file?


Recommended Posts

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:

-Nanascalala

Link to comment
Share on other sites

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

EndIf

Wend

Edited by SupraNatural

Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!

Link to comment
Share on other sites

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:

ftp://myuser:mypass@myhost.com:21/mydir/tempcap.txt

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
Link to comment
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.

<{POST_SNAPBACK}>

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

Cheers

Kurt

__________________________________________________________(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 *

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...