On 9/18/07 12:25 PM, "Michael Lerner" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> When a new version of Skim comes out, I usually have 3-4 PDFs open.
> Would it be possible for "install and relaunch" to open those PDFs
> when it relaunches Skim?

>From my point of view, this is exactly the kind of thing that can result in
"bloat ware".  Skim is a Mac application, with a (thankfully!) rich
AppleScript dictionary.

What that means for us Mac users is that we don't have to have the developer
put in every kind of esoteric feature request -- we just make it ourselves.

Firstly, and very simply, Skim (and most Mac apps) have a 'Recent Documents'
menu item, which is populated with, um, the recent documents.

It's a matter of a menu selection to open again what you were working on.

Secondly, Skim's AppleScript dictionary provides a 'document' class, which
has both a 'path' property and a 'file' property (roughly equivalent.)

So, with just a few lines of very simple script, you can make yourself a
personalized "Open What I Was Working On" script...for use anytime, not only
when there is an update.

You could run this script when you wanted to stop working for some time, and
then you can run it again to start where you were (same documents open
again.)

Look...

-- Copy this to the Script Editor (pre-installed on all Macs).
-- Save as an application.

-- It's only one simple example.

property openDocs : {}
property openPaths : {}

tell application "Skim"
    -- Reopen File List
    if openDocs is {} then
        -- Remember Open File List
        set openDocs to documents
        set openPaths to {}
        repeat with someDoc in openDocs
            copy someDoc's file to end of openPaths
        end repeat
        display dialog "I remembered " & (count openPaths) & " documents."
    else
        repeat with someFile in openPaths
            open someFile
        end repeat
        copy {} to openDocs
        copy {} to openPaths
    end if
end tell


That's just one example, and it is 6:30 in the morning here, so with only a
1/2 cup of coffee, that's not too shabby.

;)

See you, and ask again here if you are not sure about this script, or
how/where to save it.

I tested the script about 6 times, with different docs open and such, so
it's not a bad start on a pretty useful script.  (I'll use it myself, now!)

-- 
Gary



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users

Reply via email to