Jump to content

Recommended Posts

Posted (edited)

Multiple blocks, hmm

in the while loop, where you read the data from the file, (here is a pseudo description):


Read the Starting position, compare it with the 1st byte of the 1st block, if not found, compare the 1st byte of the 2nd block, 3rd,  4th and so on.

If found, use an offset of the starting position, and compare it with the second byte. if match, repeat until the whole string matches *1, if not, continue searching the blocks from the starting position, until all of the blocks are checked.

Increase the starting position and repeat.

 

*1 If the String was found, replace the values, and add the replaced length to the starting position.

 

In this way, the script needs to go through the whole file only once. 

I do not have an autoit script file, but something similar in Blitzmax, but the code is not comparing the whole file, it only searches the defined location (mostly starting) for multiple strings/bytes.

(Edit, and the search values are hard-coded, still.)

Edited by Dan_555

Some of my script sourcecode

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
  • Recently Browsing   0 members

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