home *** CD-ROM | disk | FTP | other *** search
/ Invenzioni E Inventori 1: Lavoro E Vita Quotidiana / invenzioni-inventori-1.iso / mac / Invenzio / ALBGENEA / Alberi.cst / 00013_Script_13 < prev    next >
Text File  |  1997-10-07  |  2KB  |  85 lines

  1. on mouseup
  2.   global parola
  3.   set parola to ""
  4.   set ca to the mousecast
  5.   if the type of member ca = #shape then
  6.     
  7.     set parola to the name of cast ca
  8.     cercap parola
  9.   end if
  10. end
  11.  
  12. on cercap parolal
  13.   global correlati
  14.   put "** ",parolal
  15.   if parolal <> "" then
  16.     if char 1 to 2 of parolal = "ms" then
  17.       set correlati to parolal
  18.       chiamapopsot
  19.       exit
  20.     end if
  21.     
  22.     if char 1 of parolal = "#" then
  23.       global inventore
  24.       delete char 1 of parolal
  25.       set inventore to parolal
  26.       chiamapopinv
  27.       exit
  28.     end if
  29.     
  30.     if char 1 to 2 of parolal = "mp" then
  31.       if the machinetype >= 256 then
  32.         go to movie char 1 of the moviepath&":\invenzio\tori\"&parolal&".dir"
  33.       else
  34.         go to movie "invenzioni:invenzio:tori:"&parolal&".dir"
  35.       end if
  36.       exit
  37.     end if
  38.     
  39.     set dove to offset (",",parolal)
  40.     if dove > 0 then
  41.       set mov to (char 1 to dove-1 of parolal)&".dir"
  42.       set l to char dove+1 to length(parolal) of parolal
  43.       if l="ex" then set cartella to "extraurb"
  44.       if l="ct" then set cartella to "citta"
  45.       if l="ci" then set cartella to "cielo"
  46.       if l="ma" then set cartella to "mare"
  47.       if l="sp" then set cartella to "spazio"
  48.       --      if l="si" then set cartella to "sottoinv"
  49.       --   if l="mp" then set cartella to "tori"
  50.       if the machinetype >= 256 then
  51.         go to movie char 1 of the moviepath&":\invenzio\"&cartella&"\" &mov
  52.       else
  53.         go to movie "invenzioni:invenzio:"&cartella&":"&mov
  54.       end if
  55.       
  56.     end if
  57.   end if
  58. end
  59.  
  60.  
  61. on pulisci cosa
  62.   if offset(numtochar (013), cosa) > 0 then put "" into char offset(numtochar (013), cosa) of cosa
  63.   set r to chartonum (char (the number of chars in cosa) of cosa)
  64.   if  (r < 97 or  r > 122)  then
  65.     if (r < 65 or  r > 90) then
  66.       if (r < 48 or  r > 57) then
  67.         if (r < 126) then
  68.           delete char (the number of chars in cosa) of  cosa
  69.         end if
  70.       end if
  71.     end if
  72.   end if
  73.   set r to char 1 of cosa
  74.   set r to chartonum (char (the number of chars in cosa) of cosa)
  75.   if  (r < 97 or  r > 122)  then
  76.     if (r < 65 or  r > 90) then
  77.       if (r < 48 or  r > 57) then
  78.         if (r < 126) then
  79.           delete char 1 of  cosa
  80.         end if
  81.       end if
  82.     end if
  83.   end if
  84.   return cosa
  85. end if