🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17434

Re: Script to print pages

#17434
From: Shane Stanley
Date: Wed, 11 Jun 2003 23:15
35 lines
2098 bytes
in article 1de96a17.2@WebX.la2eafNXanI, Luis Oliveira wrote:

> a way to print documents that are on a folder, kind of a hot folder action

This is untested, but it should get you started. Save it as a stay-open
application, and change the older path and printer style names to suit:

o n idle
 set theFolder to "Macintosh HD:Folder to watch:"
 tell application "Finder"
  try
   set idFiles to every folder of entire contents of folder theFolder whose
file type is "indd" as alias list
  on error -- work around bug if there is only one file
   set idFiles to (every folder of entire contents of folder theFolder whose
file type is "indd") as alias as list
  end try
 end tell
 if idFiles is not {} then
  tell application "InDesign 2.0.2"
   set user interaction level to never interact
   repeat with i from 1 to count of idFiles
    open item i of idFiles
    print document 1 using "House style" without print dialog -- name of
print style to use
    close document 1 saving no
   end repeat
   set user interaction level to interact with all
  end tell
 end if
 return 10 -- try again in 10 seconds
end idle

-- 
Shane Stanley,  sstanley@myriad-com.com.au
Technical Details
Message-ID: <BB0DF53D.5C6DD%sstanley@myriad-com.com.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de96a17.-1@WebX.la2eafNXanI> <1de96a17.2@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,83e544207eba7d74
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-06-11 16:38:06 PST
From: Shane Stanley <sstanley@myriad-com.com.au>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Script to print pages
Message-ID: <BB0DF53D.5C6DD%sstanley@myriad-com.com.au>
Date: Wed, 11 Jun 2003 16:15:41 -0700
References: <1de96a17.-1@WebX.la2eafNXanI> <1de96a17.2@WebX.la2eafNXanI>
Lines: 40
User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit