Exactly ! I don't know why my answer took so much time...
This apple script was send to me by Guy W. Willis (thanks !) it works
well too.

Btw there was a typo in my first mail :
and I would like to replace every searchGetter.10. by searchGetter.
16.
and searchGetter.11 by searchGetter.17 and searchGetter.13. by
searchGetter.18. etc...
It was meant to be a suite : so searchGetter.12. by searchGetter.18,
etc...

set theFile to choose file with prompt "Choose a text file"
open for access theFile
set theFileData to read theFile
close access theFile

set old_delims to AppleScript's text item delimiters
set AppleScript's text item delimiters to "."
set theDataList to every text item in theFileData


repeat with i from 2 to count of items in theDataList by 2


        set theNumber to text item i of theDataList

        set NewNumber to theNumber + 6

        set text item i of theDataList to NewNumber
end repeat

set theNewString to every item in theDataList as string
set AppleScript's text item delimiters to old_delims
tell application "BBEdit"
        make new document with properties {name:"data"}
        select insertion point before character 1 of window "data"
        set selection of text window "data" to theNewString
end tell

On 13 août, 20:11, Carlton Gibson <[email protected]> wrote:
> On 13 Aug 2009, at 15:09, pietro ildiscotto wrote:
>
>
>
> > That's precisely what I want to avoid :D
>
> Nobody likes textfactories! ;-)
>
>
>
> > Pierre
>
> > On 13 août, 15:55, Carlton Gibson <[email protected]> wrote:
> >> On 12 Aug 2009, at 23:29, pietro ildiscotto wrote:
>
> >>> Hello,
> >>> I have  a text who look like this
>
> >>> searchGetter.10.searchTerm=naim 62
> >>> searchGetter.10.searchTermType=All of these words
> >>> searchGetter.11.availableTo=
> >>> searchGetter.11.categoryList=
> >>> searchGetter.11.excludeWords=
> >>> searchGetter.11.includeDescription=0
> >>> searchGetter.11.locatedIn=
> >>> searchGetter.11.onlyBIN=0
> >>> searchGetter.11.quantityGreaterThanOne=0
> >>> searchGetter.11.searchTerm=naim 62
> >>> searchGetter.11.searchTermType=All of these words
> >>> searchGetter.12.availableTo=
> >>> searchGetter.12.categoryList=
> >>> searchGetter.12.excludeWords=
> >>> searchGetter.12.includeDescription=0
> >>> searchGetter.12.locatedIn=
> >>> searchGetter.12.onlyBIN=0
> >>> searchGetter.12.quantityGreaterThanOne=0
> >>> searchGetter.12.searchTerm=naim 62
> >>> searchGetter.12.searchTermType=All of these words
> >>> searchGetter.13.availableTo=
> >>> searchGetter.13.categoryList=
> >>> searchGetter.13.excludeWords=
> >>> searchGetter.13.includeDescription=0
> >>> searchGetter.13.locatedIn=
> >>> searchGetter.13.onlyBIN=0
> >>> searchGetter.13.quantityGreaterThanOne=0
> >>> searchGetter.13.searchTerm=naim 62
> >>> searchGetter.13.searchTermType=All of these words
>
> >>> and I would like to replace every searchGetter.10. by searchGetter.
> >>> 16.
> >>> and searchGetter.11 by searchGetter.17 and searchGetter.13. by
> >>> searchGetter.18. etc...
>
> >>> any godlike grep genius there to help me ? my head is hurting really
> >>> bad !
> >>> thanks in advance
>
> >>> Pierre
>
> >> Hi Pierre,
>
> >> I think your best bet is to do it one step at a time (perhaps with a
> >> text factory).
>
> >> First search for:
>
> >>> searchGetter.10.
>
> >> and replace with:
>
> >>> searchGetter.16.
>
> >> (No grep)
>
> >> Then repeat for the 11/17 and 11/18 pairs.
>
> >> Hope that helps.
>
> >> Regards,
> >> Carlton

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a specific feature request or would like to report a suspected (or 
confirmed) problem with the software, please email to "[email protected]" 
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to