Page 1 of 1

Text field respond to carriage return

Posted: Tue Apr 25, 2006 3:05 pm
by bard
I've built several basic programs to suit certain needs and I tend to learn things as I go along. Now I want to build a program that can respond to typed text in a simple input field. For example, if the user typed "start", then pressed enter, text on the screen would change, etc.

But alas, I've hit a roadblock and can't find help in the documentation (unsure what to look for, really). So if anyone can point me in the right direction I would appreciate it greatly!

Thanks!

Posted: Tue Apr 25, 2006 3:08 pm
by malte
Hi bard,

look for the enterInField and returnInField messages in the dictionary.

for example (in the fields script)

Code: Select all

on enterInField
  beep
  --do some useful stuff here
end enterInField

on returnInField
  enterInField
end returnInField
Hope that helps,

Malte

Posted: Wed Apr 26, 2006 2:26 am
by bard
Aah, excellent. Many thanks, malte!