Quick Code Question

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
isabellspivey
Posts: 3
Joined: Mon Aug 18, 2025 3:20 am

Quick Code Question

Post by isabellspivey » Mon Mar 02, 2026 4:46 am

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.

Emily-Elizabeth
Posts: 147
Joined: Mon Jan 03, 2022 7:10 pm
Contact:

Re: Quick Code Question

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

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

Post Reply