HyperCard: Script to Indent Text Automatically (7/92)

The returnInField handler makes a field indent its text automatically.

on returnInField
get the value of the selectedLine
put empty into indent
repeat with i = 1 to the number of chars in it
if char i of it is " " then put " " after indent
else exit repeat
end repeat
send returnInField to HyperCard
put indent after the selection
end returnInField


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012