Author Topic: Contact Sheet Maker query...  (Read 1943 times)

0 Members and 1 Guest are viewing this topic.

Offline TecNik

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 0
  • Gender: Male
Contact Sheet Maker query...
« on: February 16, 2009, 03:07:27 AM »
Hi There,

A quick query regarding the Contact Sheet Maker from the 'Downloads'.
I've downloaded the script and had a play and it does exactly what it says on the tin which is great :-)
I was just wondering how easy it would be to tweak the script so it does subfolders too?

Thanks in advance.

NIck

Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: Contact Sheet Maker query...
« Reply #1 on: February 17, 2009, 07:15:28 PM »
Hi Nick,

Sorry for the delayed response. Here is what I use for "recursive folders". Just set the Traverse variable to true and it will do as you wish.

Sorry I do not have the time to plug this in the mentioned script but in short you will need to make FileList into a property and have the ProcessFile handler populating it.

Quote
001   on ProcessFile(ThisFile)
002      -- What to do with the file
003   end ProcessFile

004   on ProcessFolder(ThisFolder, Traverse)
005      set FolderList to list folder ThisFolder without invisibles
006      repeat with ThisItem in FolderList
007         set {folder:IsAFolder} to info for alias ((ThisFolder & ThisItem) as text)
008         if IsAFolder then
009            -- What to do with the folder
010            if Traverse then
011               my ProcessFolder((ThisFolder & ThisItem & ":") as text, Traverse)
012            end if
013         else
014            my ProcessFile((ThisFolder & ThisItem) as text)
015         end if
016      end repeat
017   end ProcessFolder
Note:
The line numbers included with this script are there to aid future discussions. In order to use this script, you will have to strip all of them.


Hope this helps!
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline TecNik

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 0
  • Gender: Male
Re: Contact Sheet Maker query...
« Reply #2 on: February 18, 2009, 03:11:52 AM »
Thanks for your reply Michel and for the help with my query.

I'll add the 'recursive folders' code to the existing script and see how I get on.

Thanks once again, it's much appreciated  :)

Best Regards,

Nick