I’m having trouble with stylized copy in Quark, and I thought of writing a script to help…I’m just getting started with the script, but I thought I’d ask for some opinions and/or hints
What I need to do is have it so the script begins to search a Quark document (when opened) for any text that is stylized…ie “Font Name <>”, “Font Name <>”, etc.–this is bad font usage in Quark
I need to search a document and if it is found “true” that any fonts are not “Font Name <>” in the font usage, I will get an alert stating that something is wrong
I’m sure this is possible, but I have limited work with scripting and fonts in Quark 6…does anyone have any hints that may help?
on pathName(fileAlias)
copy fileAlias as string to xx
copy text item delimiters of AppleScript to savedDelim
set text item delimiters of AppleScript to {":"}
set q to count of text items of xx
set filePath to (text items 1 thru (q - 1) of xx as string) & ":"
set fileName to last text item of xx as string
set text item delimiters of AppleScript to savedDelim
end pathName
on open opy
set opx to 1
repeat number of items in opy times
path to desktop from user domain
set theHD to result as string
set simPath to theHD & "Upgraded Items"
tell application "QuarkXPress"
activate
open item opx of opy use doc prefs yes remap fonts no do auto picture import yes with reflow
set docpath to file path of front document
my pathName(docpath)
tell front document
repeat with x from 1 to count of text boxes
try
if ((size of last character of text box x) as real) is 7 then
tell text boxes
try
tell (characters whose style is {class:text style info, on styles:{bold}})
set font to "B New Century Schlbk Bold"
set style to plain
end tell
end try
try
tell (characters whose style is {class:text style info, on styles:{bold, all caps}})
set font to "B New Century Schlbk Bold"
set style to plain
end tell
end try
try
tell (characters whose style is {class:text style info, on styles:{bold, italic}})
set font to "BI New Century Schlbk BoldIt"
set style to plain
end tell
end try
try
tell (characters whose style is {class:text style info, on styles:{italic}})
set font to "I New Century Schlbk Italic"
set style to plain
end tell
end try
end tell
end if
end try
end repeat
close saving yes
end tell
end tell
set opx to opx + 1
end repeat
tell application "QuarkXPress"
display dialog "Done." buttons {"OK"} default button 1
end tell
end open
This one that I use to correct the same Pseudo issue that Quark does not like. I am trying to rewrite this script to drop entire directories. But for now, you can drop Quark files on it as an app. Copy some files and test it out on your end.
Model: Dual 2.3GHz G5
AppleScript: 2.1.1
Browser: Firefox 2.0.0.4
Operating System: Mac OS X (10.4)
Good script sprale, as you wish I made an every Quark file in dropped and in sub folder (includes alias) in this script to remove unused master pages. find here. Simple enough to add to yours.