One way to do this would be using a couple of lists, fishheadtw.
As mentioned previously, I don’t use Indesign - so I’ll have to use pseudo-code to indicate the kind of thing I mean. (Since the values of the replace_list property below are also guesses, you may need to adjust them as necessary.)
[code]property search_list : {“00”, “01”, “02”, “03”, “04”, “05”, “06”, “07”, “08”, “09”, “10”, “11”, “12”, “13”, “14”, “15”, “16”, “17”, “18”, “19”, “20”, “21”, “22”, “23”, “24”, “25”, “26”, “27”, “28”, “29”, “30”, “31”, “32”, “33”, “34”, “35”, “36”, “37”, “38”, “39”, “40”, “41”, “42”, “43”, “44”, “45”, “46”, “47”, “48”, “49”, “50”, “51”, “52”, “53”, “54”, “55”, “56”, “57”, “58”, “59”, “60”, “61”, “62”, “63”, “64”, “65”, “66”, “67”, “68”, “69”, “70”, “71”, “72”, “73”, “74”, “75”, “76”, “77”, “78”, “79”, “80”, “81”, “82”, “83”, “84”, “85”, “86”, “87”, “88”, “89”, “90”, “91”, “92”, “93”, “94”, “95”, “96”, “97”, “98”, “99”}
property replace_list : {“#”, “$”, “%”, “&”, “'”, “(”, “)”, "", “+”, “,”, “-”, “.”, “/”, “0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “:”, “;”, “<”, “=”, “>”, “?”, “@”, “A”, “B”, “C”, “D”, “E”, “F”, “G”, “H”, “I”, “J”, “K”, “L”, “M”, “N”, “O”, “P”, “Q”, “R”, “S”, “T”, “U”, “V”, “W”, “X”, “Y”, “Z”, “[”, “\”, “]”, “^”, “_”, “`”, “a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “j”, “k”, “l”, “m”, “n”, “o”, “p”, “q”, “r”, “s”, “t”, “u”, “v”, “w”, “x”, “y”, “z”, “{”, “|”, “}”, “~”, “”, “Ä”, “Ã…”, “Ç”, “É”, “Ñ”, “Ö”, “Ü”} ( modify as necessary *)
(* pseudo-code )
repeat with i from 1 to count search_list
search document for (my search_list’s item i) replacing with (my replace_list’s item i)
end repeat
( /pseudo-code *)[/code]
However, it looks like there might be a pattern to the sequence of barcode characters. If that’s extendable throughout the range, you could simply try something like this:
to get_barcode for t
set b to ""
repeat with i from 1 to count t by 2
set b to b & (ASCII character (35 + (t's text i thru (i + 1))))
end repeat
b
end get_barcode
get_barcode for "000102"
--> "#$%"