home *** CD-ROM | disk | FTP | other *** search
/ Comic Book Maker: The Smurfs / COMIC.iso / pc / data_w / cba2_40 / 00018_startFrame.ls < prev    next >
Encoding:
Text File  |  2001-02-22  |  913 b   |  31 lines

  1. global gPlatForm, gObj5, gDialogPresent
  2.  
  3. on exitFrame me
  4.   if gDialogPresent then
  5.     go(the frame)
  6.   else
  7.     if gPlatForm then
  8.       changePalette("Mac")
  9.     else
  10.       if not gPlatForm then
  11.         changePalette("Win")
  12.         set commandStartString to baCommandArgs()
  13.         if commandStartString starts QUOTE then
  14.           delete char 1 of commandStartString
  15.         end if
  16.         set lastChar to length(commandStartString)
  17.         if char lastChar of commandStartString = QUOTE then
  18.           delete char -30000 of commandStartString
  19.         end if
  20.         set lastChar to length(commandStartString)
  21.         if char lastChar - 3 to lastChar of commandStartString = (".CB" & the pCharacterCode of gObj5) then
  22.           startProgram()
  23.           go("CBA2")
  24.           cursor(0)
  25.           openFile(gObj5, 1, 1, char 1 to lastChar - 4 of commandStartString)
  26.         end if
  27.       end if
  28.     end if
  29.   end if
  30. end
  31.