Count the # of occurrences of a hex s... Log Out | Topics | Search
Moderators | Edit Profile

X-Ways Support Forum » Advanced Features » Count the # of occurrences of a hex string « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Douglas S. Lacey
Posted on Sunday, May 14, 2006 - 23:12:   

When scripting, is there any way to use the "Find" command to simply count the number of occurrences of a particular hex string in a file?

I don't need to "SaveAllPos"; I just need to return a decimal value for how many times the string appears in the file.

I realize that I can do this with a loop by incrementing a variable by one every time it finds it, but I'm already inside of a loop and am unable to nest them.

Thanks!
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Sunday, May 14, 2006 - 23:49:   

You are not unable to nest loops if you move the inner loop to an external script and call that script with ExecuteScript.

Add Your Message Here
Post:
Username: Posting Information:
Only registered users may post messages here, i.e. you need to have an account.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:
Forum operated by X-Ways Software Technology AG.