set t to "1234.jpg, 5678.jpg, 4444.jpg, 5555.jpg, 9876.jpg,
6969.jpg."
set text item delimiters to ", "
set t to t's text 1 thru text item -2 & " & " & t's text item -1
set text item delimiters to {""}
May you explain the reason which pushed you to use braces in the
second setting of the text item delimiters [ {""} ] but not in the
first one [ ", " ] ?
Of course it's a detail but I'm curious ;-)
Sure, Yvan.
As you know, AppleScript's Text Item Delimiters property consists of
a list of strings used as delimiters. Its initial value is a single-
item list containing an empty string: {""}. AppleScript has (thus
far) used only the first delimiter in the list - and a regular string
works just as well. In fact, I've found it generally faster
(especially in routines that frequently switch the tids value) to use
strings. However, when finally restoring the property to its initial
value, I tend to revert to the list form - to preserve at least some
semblance of consistency... ;-)