1 Reply Latest reply on May 11, 2006 11:01 AM by Newsgroup_User

    Exporting from Cast files

    RabcR
      Hi,

      I have a load of cast files that contain a few hundred bmps each, and I need to export them. I never used Director before and I don't know the lingo syntax one bit.

      I was pointed in the direction of SharpExport Xtra and I have installed it (at least I think so)
      How do I get my bmps out?
      Since there are so many I need a script to loop through them all and give them sensible file names (1.bmp 2.bmp will be fine).
      I need step-by-step since like I said, I never used director and this is sort of someone elses mess i'm trying to sort out here.

      Thanks

      [Edit]
      I'm still rather stuck on this problem although i've learned a bit about lingo now.

      result = xtraInst.exportBMP(member 1073872996, "filename.bmp")
      How do I make a loop to generate those ID numbers for all members?
      The loop doesn't seem to be executing anything.


      The cst files are called "01.cst" "01.cst".
      Once I load them into director the cast members have high random values so a 1 to 40 loop doesn't work.
      Also the member() function can only "see" the internal cast, putting member(i, "01").name gives nothing.


      If I can't get this to work I'll have no choice but to hack up some program in C to macro copy&paste the images out.
      Curse the iMac weilding idiot who locked up critical files in such a bizzare format.
        • 1. Re: Exporting from Cast files
          Level 7
          Here's a rough script


          repeat with i = 1 to the number of omember of castLib 2
          if member(i, 2).type = #bitmap then -- not empty and a bitmap
          -- I'm too lazy to look up sharp xtra format, here are the params
          sharpexport member(i, 2), the pathName & i & ".jpg"
          end if

          end repeat


          using member number number for file name gurantees unique names for a
          given castlib, if you were sure member names were unique you could use
          them, or a combo of name and number.

          sharpexport member(i, 2), the pathName & i & member(i, 2).name &
          ".jpg"