Recover Lingo Script

Posted on 2007-10-21
Last Modified: 2013-12-24
I was working on a file to day when my system crashed and I didn't backup any thing but I lost all hard earned work about 3 months worth but I have a dxr file from today dose any know how I can get my cast members and lingo script back from this dxr file???
Question by:jasoncopel
    LVL 1

    Expert Comment

    I fear that your scripts (code) are lost.  There is no tool to recover a DIR from a DXR or DCR.  There are tools however that can recover media such as images and audio. The tool is called DirOpener, see link below.
    LVL 2

    Accepted Solution

    You can extract most cast members (except scripts) from a DXR or DCR using director itself:

    Import the dcr/dxr as a cast member into a new director movie.

    Place it on the stage, in sprite 1, frame 1. Make sure the playback head is on that

    Next, open a script window, and paste this:
    on extractAssets
      mov = sprite(1).movie
      repeat with cn = 1 to mov.castlib.count
        tCast = mov.castlib(cn)
        repeat with mn = 1 to tcast.member.count
          tMem = mov.member(mn,cn)
          if tMem.type <> #empty then
            newMem = new(#bitmap) -- type doesn't matter
            put "extracted "&" (mem "&mn&" castlib "&cn&" - "&tMem.type&")"
          end if        
        end repeat
      end repeat

    Next, check that the script type of the script you just pasted is set to 'movie' (in the property inspector).
    Hit the little lightning button in the script window toolbar (recompile all scripts).

    Now open the message window, and type:


    ...and hit return. Voila, your cast is filled with the cast members from the dcr. Any script cast members
     will be empty though!
    For recovering your script source code, you will have to attempt to recover your original dir files from your hard drive. If the .dir file is still present, but unopenable, you may be able to open the file in a text editor, and brows through until you find the lingo script.

    If the .dir file appears to have been deleted from the hard drive, you may be able to use file recovery software to find it, and 'un-delete' it.
    (see: )

    If the .dir file seems completely unrecoverable or if the hard drive actually no longer works, you may still be able to use a data recovery company who will take your broken hard drive and extract what they can from it. This can be fairly expensive though, so you will need to decide how badly you need the original data!.
    (see: )

    Hope this helps!
    LVL 1

    Expert Comment

    Boo. That is exactly what the DirOpener tool does. You couldn't split the points. Boo on you.
    LVL 2

    Expert Comment

    Err, not in all cases it doesn't. I actually tried it on a number of my own dcr files and it failed to recover anything from any of them. Wheras my script in Director does.

    Perhaps it only works for very old files, since DirOpener itself is published with quite an old version of Director.

    Also, the OP didn't say whether it was even that method which recovered the file, or one of the other two suggestions I made. Anyway, thanks for the warm welcome, Charles!

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
    Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
    The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
    The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: : Click on Too…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now