Date
1 - 3 of 3
2 tricky questions
Brian Christmas
G’day scripters Two questions, if you don’t mind. Question 1. I’m trying to make life easier for my Application users entering a 28 digit password, broken into 4 groups. I’ve created a window with 28 text fields, of 4 groups, each field of which will allow the entry of 1 digit. I can start at the leftmost field, but want to move to the next right after ‘return’. I’ve assigned every field a missing value property, Entry1, Entry2, Entry3, etc through to Entry28. For some reason, I cannot finf any way of actually naming them. Seems to be missing. However, I’m trying to retrive the value of the Referncing Outlet, so I can get the numeric value on the end, and add 1 and move to the next field. Never had to do it before, and cannot work out how. ‘Name’ does not work. Any thoughts, or suggested changes to methods used? on checkthecode2:sender set y to sender set c to y's stringValue() as text if (count of characters of c) > 1 then set y's stringValue() to character 1 of c say 3 set n to y's name as text — Naturally fails say 3.1 tell application "System Events" to display dialog n say 4 set nn to characters 6 through -1 of n as text as integer say nn if nn as integer < 28 then say 6 makeFirstResponder_(text field("Entry" & ((nn as integer) + 1))) end if end checkthecode2: Question 2. with the entries, I’m restricting each field to one digit, but is there any way of automatically moving to the next text field once one number is entered? AND, could I still select and edit that number? Tall order I think, but I know some App distributors manage it somehow. Thanks for reading, and why can’t I simply set a name for the text boxes? Nothing showing! Do I need to assign each one a named property? Still can’t assign to a name! And Titles display in the fields! Regards Santa |
|
2551phil
Why don’t you just have the user copy and paste the entire sting into one text field?
toggle quoted message
Show quoted text
Nobody wants to manually type in a registration key. Best Phil @sqwarq
|
|
Brian Christmas
Thanks Phil.
toggle quoted message
Show quoted text
I’ve thought of that, and have a button to paste in from the clipboard. I just wanteed to emulate the procedures I’ve seen, just in case someone needed to type the passcode in. Santa
|
|