scale bar

Klaus Major k_major at osnabrueck.netsurf.de
Sat May 11 08:58:01 EDT 2002


Hi Martin,

> hi
> I want different answers depending on a scalebar-position to be 
> displayed by
> an answer-dialogue. What's wrong with the following script:
>
> on mouseup
>   put the thumbposition of me into ThumbVal
>   if thumbVal = 1 or 2 or 3 is true then
>     answer "1,2,3"
>   end if
>   if thumbVal = 4 or 5 or 6 is true then
>     answer "4,5,6"
>   end if
> end mouseup
>
> Martin

looks like you mix to many incorrect expressions here.

Try this (the long, but correct way):

on mouseup
   put the thumbposition of me into ThumbVal
   if (thumbVal = 1) or (thumbVal  = 2) or (thumbVal  = 3)  then
     answer "1,2,3"
   end if
if (thumbVal = 4) or (thumbVal  = 5) or (thumbVal  = 6)  then
     answer "4,5,6"
   end if
end mouseup


BUT you can have it much shorter (and save hours of typing ;-)

on mouseup
   if the thumpos of me < 4 then
      answer "1,2,3"
   else
      answer "4,5,6"
   end if
end mouseup


Hope that helps...


Regards

Klaus Major
k_major at osnabrueck.netsurf.de




More information about the use-livecode mailing list