How to remove a carriage return from a field?

Martin Baxter mb.ur at harbourhost.co.uk
Thu Jan 19 16:37:41 EST 2006


Claire Bradin Siskin wrote:
> In my stack, the user enters identifying information into a field, and 
> this text is used to build a filename for ftp upload. This works fine as 
> long as the user does not enter a carriage return at the end of the 
> field. If the user does press "enter," this messes up the upload. How 
> can I script it so that any carriage returns are removed from the field?
> 
> Suggestions for actual scripts would be very much appreciated since I am 
> a newbie. :-)
> 
> Thanks very much,

or this field script:

on closefield
   put line 1 of me into me
end closefield

Martin



More information about the use-livecode mailing list