Page 1 of 1

Incremental numbers

PostPosted: Thu Aug 06, 2009 12:46 am
by Loudspeaker
Hi there,

I was wondering if your program supports incremental numbers. Lets assume you want to change the string XXX in the file test013 with 013 and in file test014 with 014 and so on, is that possible?

Or for programmers, this would be enormously helpful: You write in a code and save it as 013.txt.
else if( _root.run + _root.var013 == _root.wanted )
{
_root.run = _root.run + _root.var013;
_root.resultat = String(_root.resultat) + newline + String(_root.var013);
_root.resultatk = String(_root.resultatk) + newline + String(_root.vark013);
}

And now, you want to replace 013 with 014 and at the same time make a new file called 014.txt. Is anyhing like this possible using your program? A dream feature would be for a program to produce the textsfiles produced with the code above, where the string XXX is replaced with an incremental number from 001.txt to the number you want.txt

Re: Incremental numbers

PostPosted: Thu Aug 06, 2009 8:21 am
by Marc G
It cannot be done automatically in the current version.
However, you can use the "Advanced Find and Replace" feature. Configure it to find using regular expressions. That regular expression can be constructed to find your xyz numbers. Combine this with the replace action to replace it with the number you want. Unfortunately, you'll have to change the "replace with" action for every file.

I'm wondering though, why are you creating so many file where only the number is different?
Can't you redesign your code to avoid this?