Hello to all!
I’m just strating to learn AS. I’m having problems creating a script for a batch print of QXP files.
We are producing catalogs. We are sometimes working with subfolders for each double-side page of a catalog, sometimes, each double-side is in one folder. The pictures are in a seperate folder structure and not necessary for this script.
We need to print all files just as they are. Does anybody know a script, which checks a folder and all subfolders for QXP documents and print it as they are?? It has to be printed on a Lexmark 820 as DIN A 3 Format (420 x 297 mm) size reduced so everthing on the double page is on one printed page.
Perhaps somebody has an idea? I just have some code of a friend, but only to find the files.
Thank you for your help, best regards from Germany
Gerd
Here is the Code:
property theNameExt : {“XDOC”, “”} (hier bitte die richtigen Bezeichnungen einsetzen,
wenn 1 item reicht das 2. löschen → {“qxpd”})
property theFileType : {“qxpd”, “”} – wie zuvor einsetzen!
on run
set theFold to (choose folder with prompt “Source-Folder:” default location (path to documents folder from user domain) with multiple selections allowed without invisibles)
if class of theFold is not list then set theFold to {theFold}
pre_processing(theFold)
end run
on open theList
pre_processing(theList)
end open
on pre_processing(theItemList)
repeat with i in theItemList
check_item(i)
end repeat
end pre_processing
on check_item(theItem)
set temp to info for theItem
if (folder of temp) then
set theFList to list folder theItem without invisibles
repeat with i in theFList
check_item(((theItem as string) & contents of i) as alias)
end repeat
else
if not (alias of temp) then
if ((name extension of temp is in theNameExt) or (file type of temp is in theFileType)) then
do_Job(theItem)
end if
end if
end if
end check_item
on do_Job(theFile)
– hier müssen wir jetzt Dein QXP dazu bringen RICHTIG zu drucken
end do_Job
AND:
open reference – list of objects to open
[use doc prefs yes/no/ask] – use document or application preferences
[remap fonts no/ask] – remap document fonts which don’t exist in the current system
[do auto picture import yes/no/ask] – whether or not to re-import any missing pictures
[reflow boolean]
print reference – objects to print
[copies small integer] – the number of copies to print
[cover page no/first page/last page] – use a cover page
[OPI omit TIFF/omit TIFF and EPS/include images] – OPI options
[paper source paper cassette/manual feed] – paper tray
[plates list] – list of plates to print
[PostScript file alias] – file to print PostScript to
[print dialog boolean] – Show the print dialog? (default is no)
close reference – the object to close
[saving yes/no/ask] – specifies whether changes should be saved before closing
[saving in alias]