quillpro Posted April 12, 2005 Posted April 12, 2005 I have a text field that is blank at the start. When you press a button and the field is blank it add the letter "A". What I want then is if you press that button again the letter will become "B" and so on. I could write it out of course. Case ( field = A ; B ; field = B ; C and so on ) Is there a better way to write? TIA
quillpro Posted April 12, 2005 Author Posted April 12, 2005 Sorry, I put this in the wrong topic. Should have gone in Scriptmaker.
comment Posted April 12, 2005 Posted April 12, 2005 Try Set Field[] with the following calculation: Let ( [ alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; pos = Position ( alpha ; field ; 1 ; 1 ) ; len = Length ( alpha ) ; next = Mod ( pos ; len ) + 1 ] ; Middle ( alpha ; next ; 1 ) ) This will rotate the alphabet in a loop.
Recommended Posts
This topic is 7168 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