batgirl003 Posted December 30, 2002 Share Posted December 30, 2002 If I have a file name let say AB1234 and I want my applescript to return 4321BA (backwards text of original) do you know of a quick way to do that? I have looked up different additions that will break down the name, but not a simple backwards command. Please help!! What is the easiest and fastest way to achieve this. Remember the name lengths will differ. Link to comment Share on other sites More sharing options...
jfmcel Posted December 30, 2002 Share Posted December 30, 2002 Here's a simple solution... set theLength to count of characters in theText set ReverseText to "" repeat with i from theLength to 1 by -1 set ReverseText to ReverseText & character i of theText end repeat Link to comment Share on other sites More sharing options...
batgirl003 Posted December 30, 2002 Author Share Posted December 30, 2002 You rock! you are always my savior! Link to comment Share on other sites More sharing options...
jfmcel Posted December 30, 2002 Share Posted December 30, 2002 Always glad to help a superhero. Link to comment Share on other sites More sharing options...
Newbies laderadirectory Posted January 18, 2003 Newbies Share Posted January 18, 2003 Quicker: (reverse of (characters of "AB1234")) as string Chris Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7793 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now