Very easy question

Jan Schenkel janschenkel at yahoo.com
Thu Sep 5 06:24:01 CDT 2002


--- sschofield <sschofield at computing.dundee.ac.uk>
wrote:
> Ha ha, forgot the breaks. Now why do I only notice
> that soon as I hit the
> send?Without the semicolons at the end of the lines
> I go into vb mode. Weak
> excuse I know!  Rest of question, ie how to shorten
> script/learn script
> still applies

Hi, and Welcome to the RunRev community :-)

To learn scripting skills, you could download the
MetaCard tutorial on the Metacard ftp-site. Goto:
ftp://ftp.metacard.com/Metacard/

And download the files:
mtp.mc
mtpguide.mc

Open mtp.mc from RunRev and go through the tutorials.
That should get you a long way.

As for your script, try this:

on mouseUp
  switch (field "login")
  ## field "login" = the text of field "login"
  case "susie"
    put "hello susie" into field "MyMessage"
    break
  case "ros"
    put "hello ros" into field "MyMessage"
    break
  default
    put "not registered" into field "MyMessage"
    ## no break needed here, as it's the last one
  end switch
end mouseUp

Hope this helped,

Jan Schenkel.

"As we grow older, we grow both wiser and more foolish
at the same time."  (De Rochefoucald)

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com



More information about the use-livecode mailing list