Very easy question

sschofield sschofield at computing.dundee.ac.uk
Thu Sep 5 04:34:01 EDT 2002


Hi, I'm totally new to scripting language. I want to switch but it always
comes up "not registered". The if way works fine (though scripting does seem
a very verbose way of coding so again any help on shortening my typing
gratefully received). Also any hints on how best to learn scripting as I'm
not finding it at all intuitive. I'm a windows Fortran/C++/VB bod.

On mouseup  
--message box just to show I've picked out the correct property
show message box
  put the text of the field "login" into message
 
 if the text of the field "login" is "susie" then
   put "hello susie" into field "MyMessage"
 else if the text of the field "login" is "ros" then
   put "hello ros" into field "MyMessage"
 else
   put "not registered" into field "MyMessage"
 end if
   
--  switch the text of the field "login"
--    case "susie"
--      put "hello susie" into field "MyMessage"
--    case "ros"
--      put "hello ros" into field "MyMessage"
--    default
--      put "not registered" into field "MyMessage"
--  end switch

End mouseup

Cheers



More information about the use-livecode mailing list