Hello,
I have a script that allows me to drop a folder of quark 7.0 files onto it and they open and print them…
I am trying to get the dialog box that asks for missing images to just by pass that message and keep going.
I tried adding a Suppress All Warnings (you can see it commented out), as it is not working.
Does anyone know how I can add a line of code to bypass the missing images dialog box?
here is the script so far…thanks
babs
on open (ItemList)
repeat with thisItem in ItemList
processfile(thisItem, "drop")
end repeat
end open
on processfile(myfile, mymethod)
tell application "QuarkXPress"
activate
--open thisItem as alias with Suppress All Warnings
if mymethod = "drop" then
open file (myfile as string)
end if
--Added delay 9/30/05 to try to allow for slow opening of documents on server.
try
delay 4
end try
end tell
try
tell application "System Events"
tell process "QuarkXPress"
tell menu bar 1
tell menu bar item "File"
tell menu "File"
click menu item "Print..."
keystroke return
end tell
end tell
end tell
delay 2
end tell
keystroke return
end tell
tell application "QuarkXPress"
activate
close document 1 saving no
end tell
end try
end processfile
Hi babs,
first of all. i guess …
open thisFile as alias do auto picture import no
may work
But why don’t you use the printer settings from xPress instead calling system events¿
please try this. open a typical file, open the print dialog, “faites vous jeux” ;-), and press the button “capture settings”
now run:
tell application "QuarkXPress Passport"
set MySetUp to print setup
end tell
→ copy the result (as shown in ScriptEditor) and paste it in the following script …
on open Dropped
repeat with aDropped in Dropped
if (aDropped as string) ends with ":" then
set aDroppedList to list folder aDropped
repeat with thisItem in aDroppedList
set MyPath to ((aDropped as string) & thisItem)
PrintMyFile(MyPath)
end repeat
else
set MyFile to (aDropped)
PrintMyFile(MyFile)
end if
end repeat
end open
on PrintMyFile(thisFile)
tell application "QuarkXPress Passport"
activate
open thisFile as alias do auto picture import no
tell document 1
--insert/paste your setup here:
set print setup to {printer type:"Generic Colour", page sequence:all pages, print spreads:true}
end tell
print document 1 without print dialog
close document 1 saving no
end tell
end PrintMyFile
Hope, it’ll work
hi Hans,
Thanks so much for your reply…I have to run and teach a photoshop class, but will try this either late tonight or tomorrow…
I will let you know how I do
thanks!
babs
Hi Hans…
Well, I tried to play around with it, but still no go…
I’ll keep trying and let you know if I get it to work.
thanks anyway!!!
babs
hm … it works for me …
but i’ll also test it at work tomorrow …
hmm…I might be doing something wotng in your steps …
I will be able to play with it again tomorrow.
thanks
babs
Hi Hans…
Mine did work…I had the suppress in the wrong place…but it worked
thanks
on open (ItemList)
repeat with thisItem in ItemList
processfile(thisItem, "drop")
end repeat
end open
on processfile(myfile, mymethod)
tell application "QuarkXPress"
activate
if mymethod = "drop" then
open file (myfile as string) with Suppress All Warnings
end if
--Added delay 9/30/05 to try to allow for slow opening of documents on server.
try
delay 4
end try
end tell
try
tell application "System Events"
tell process "QuarkXPress"
tell menu bar 1
tell menu bar item "File"
tell menu "File"
click menu item "Print..."
keystroke return
end tell
end tell
end tell
delay 2
end tell
keystroke return
end tell
tell application "QuarkXPress"
activate
close document 1 saving no
end tell
end try
end processfile
Hi barbarapress (now correctly ),
well done!
If you go in any further trouble with your code while updating your Quark version “ as you wrote, you use XPress 7.0. I’ve got 7.2 and 7.5 for testing and can’t even debug your code¿ However, the open command offers:
open‚v : Open the specified object(s)
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] : "with reflow" will update the flow version of the document
So a possible open command to “suppress all warnings” can be
open thisFile as alias use doc prefs yes remap fonts no do auto picture import no
Have a nice day
Hi Hans!!
Yes, I did hit a wall today…was working OK, but that it wasn’t…will check your new info out tomorrow
thanks!!!
babs