Page 1 of 1

Quick Code Question

Posted: Mon Mar 02, 2026 4:46 am
by isabellspivey
Hello,
How can I stop the application from proceeding until a field contains a minimum number of characters? I’m at the end of a kiosk workflow where patients swipe their cards, and I need the script to remain idle until the required data has been entered.

Re: Quick Code Question

Posted: Mon Mar 02, 2026 7:55 am
by Emily-Elizabeth

Code: Select all

on KeyUp
   CharCheck
   pass KeyUp
end KeyUp

on DeleteKey
   CharCheck
   pass DeleteKey
end DeleteKey

on BackspaceKey
   CharCheck
   pass BackspaceKey
end BackspaceKey

private command CharCheck
   set the enabled of button "OK" to (the number of characters of me >= 3)
end CharCheck