Hey I have a string
set theBodyLong to content of eachMessage
theBodyLong can be a HUUUUUUUGE string, I need to shorten it down to 100 characters… How would I do this?
FYI: I wrote an applescript that takes each email that comes in and sends them to my phone through iChat’s SMS feature… and when I have a text more than 160 characters, it splits it up into a text message for every 160 characters… ya… I need this ASAP… I am being raped by texts…
Hey-
set theBodyLong to "aslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgkaslfbkjgblkgbkasbgkabgkhbg;kbgk"
text 1 thru 100 of theBodyLong
I’m sure you can see how to change this so it will work with other lengths of characters.
that will just work… I just toss that in and it makes my string down to 100 characters…???
if yes… then THANKS
Try something like this:
set theBodyLong to content of eachMessage
try
-- Using a try block because this will cause an error if the text is shorter than 100 characters
set theBodyLong to text 1 thru 100 of theBodyLong
end try