Check for second occurence of the same string?

Doubts, help and support about QuickBMS and other game research tools
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Check for second occurence of the same string?

Post by BloodRaynare »

How to make quickbms to look for the second occurence of the same string that obtained from get NAME string?

I'm currently working on the script that adds TIM2 header to the extracted VINYLS.bin files from NFS series, and those extracted files actually holds the texture name at the end of it and rename the files accordingly. But some of the texture names has duplicate names when it was actually different textures (like alpha masks) and since I'm using MEMORY_FILE and append, those duplicates will be merged automatically by quickbms instead of asking to rename or overwrite the files.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Check for second occurence of the same string?

Post by aluigi »

quickbms asks ever if you want to overwrite a file.
The only situations in which it doesn't happen is when the append mode is enabled while you perform the Log operation on file.
If the situation is just that, you can use:

Code: Select all

...
append # disable append mode
log NAME 0 SIZE MEMORY_FILE
append # re-enable append mode
...
I have not fully understood the situation so let me know if this is enough or I can help in other ways.
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: Check for second occurence of the same string?

Post by BloodRaynare »

That trick works! I never knew you could disable/enable append commands.
Thanks aluigi. :D