Does anybody have any info on how I might be able to acomplish the following in Quark using applescript.
Checking for RGB pics. Checking for none backgrounds in pics. Text overflows And artifical fonts eg. using Bold instead of using the bold font. Suppressed images
If anybody has any code to do any of the following I would appreciate it.
Cheers
I highly recommend Shirley Hopkins’ “AppleScripting Quark Xpress” book. It comes with a CD packed with example and ready-to-use code specifically for Quark.
It’s available at Amazon.com
This is not the tightest code, but it should get you started:
tell application "QuarkXPressâ„¢ 4.11"
tell document 1
-- artifical fonts eg. using Bold instead of using the bold font.
repeat with storyCount from 1 to count of stories
tell story storyCount
repeat with TSRcount from 1 to count of text style ranges
set theStyle to style of text style range TSRcount
if on styles of theStyle is not {plain} then
--it's artificial
end if
end repeat
end tell
end repeat
--Text overflows
set textOFs to (uniqueID of every text box whose box overflows is true) as text
-- picture stuff, note that image is 'image 1 of picture box x'
repeat with thePic from 1 to (count of picture boxes)
tell picture box thePic
--Checking for none backgrounds in pics.
if (image type of image 1 = unknown image) then -- it has no image
if color = null then -- it has no background color
if width of frame = 0 then -- it has no frame, so
-- it's an 'invisible' picture box
end if
end if
end if
--Suppressed images
if suppress printing is true then -- it's suppressed
end if
--Checking for RGB pics.
if model of image 1 is RGB model then -- it's RGB
end if
end tell
end repeat
end tell
end tell
–tet
Hi
I am trying to get the checking for RGB pics to work for me in Quark 6.5, but it does not work. The code is the following:
tell application "QuarkXPress Passport"
tell document 1
-- picture stuff, note that image is 'image 1 of picture box x'
repeat with thePic from 1 to (count of picture boxes)
tell picture box thePic
--Checking for RGB pics.
if model of image 1 is RGB model then
display dialog "There are RGB pics in the document." buttons {"OK. I will convert them!"} default button 1
end if
end tell
end repeat
end tell
end tell
I am relativ new to scripting, and has borroed from the above mentioned script, so maybe I did something wrong.
If I could get it to work. Then I would also like to have the file names displayed of the RGB images.
But again I am not sure how.
I would appreciate all help.
Thanks.
Kind regards
Jimmy Høiby
Model: PowerPC G4
Browser: Safari 312.3.1
Operating System: Mac OS X (10.3.9)
i don’t have Quark at the moment, so i can’t test this, but try:
tell application "QuarkXPress Passport"
tell document 1
set thePics to document 1's picture boxes
-- picture stuff, note that image is 'image 1 of picture box x'
repeat with aPic in thePics from 1 to (count thePics)
if model of aPic's image 1 is RGB model then
set RGBex to true
end if
end repeat
if RGBex is true then
display dialog "There are RGB pics in the document." buttons {"OK. I will convert them!"} default button 1
end if
end tell
end tell
Hi Alex
In the quoted line I get an error on the from statement and cant run or compile.
As I stated earlier, then my scripting skills are limited, and I do not know what to do.
Kind regards
Jimmy