this is the challenge::grin:

i want to download a txt file (scrip made it by me ) with some web addresses (1 per line) and some commands, for the program who is downloading and reading this file... so

the download part it's done! (piece of cake) but now , ....

to perform the commands stored on the script downloaded (over the adresses) i want to allocate them on an array, i was reading a lot of thing about it but i want to know if this is a good solution...

1?.- create a structure for the array
address dd 128 dup ?
destination dd 128 dup ?
cammand dd 8 dd ?
mystruct ends

2? .- then declare an array of this struct

myarray my struct 1000 dup ?

3?.- and allocate some memory to store this array... but at this point everything comes blurry...:grin:

some 1 can give me some tips?
Posted on 2003-02-18 12:26:22 by DrBios
Can you please do me a favour and stop posting in the wrong forum all the time?
Dont you wonder why all your threads get moved?
Posted on 2003-02-18 12:42:56 by bazik
ok's just than i just now i see the GENERAL part of the forum
Posted on 2003-02-18 13:08:56 by DrBios

ok's just than i just now i see the GENERAL part of the forum

There is also a little text under each forum:

Everything concerning hutch's MASM32 package. The compiler, NOT programming.
Posted on 2003-02-18 14:24:27 by bazik
if you know the format of a line why bother with the array of structures? Simply parse one line at a time.

http:\\[url][/url] dl file.exe
htpp:\\[url][/url] ul dl order.rar

say the contents of the script were the above lines (statements).
each statement has the following format : site command arg ... and each statement is separated from the next by a crlf pair. In a statment the tokens are separated by a single space.
1) read the script into a buffer and append a NULL at the end
2)parse each line for
a: site address (all chars up to first space)
b: skip space
c: command (upto next white space)
d: skip white space
e: argument (upto next white space or crlf or NULL pair)
f: do stuff with site +command +arg
g: if crlf then skip crlf and start at step "a" if NULL then alllines are parsed otherwise repeat steps "b" to "g"
Posted on 2003-02-18 16:35:41 by MArtial_Code