Change font

Discuss AppleScripting for QuarkXPress 10, 9 & 8 (and before)

Change font

Postby LittleIron » 05 Sep 2014, 10:47

Hi all, I'm not a developer.
Is it possible, using AppleScript, change font of all character in all story is using specific font?
Best Regards
LittleIron
LittleIron
 
Posts: 15
Joined: 22 Oct 2007, 03:56

Re: Change font

Postby LittleIron » 16 Sep 2014, 02:57

I have some Chinese word in Occident story and I need to change font only to these word. I tried as follows but it didn't run.
Someone know how to do it?

tell application "QuarkXPress"
tell document 1
try
set (every text of every story where font is "华文黑体") to "HYCuHeiJ"
end try
end tell
end tell

It is not a Chinese font problem, it is not running using Arial or Times.
Best Regards
LittleIron
 
Posts: 15
Joined: 22 Oct 2007, 03:56

Re: Change font

Postby Jean-Marie Schwartz » 16 Sep 2014, 03:54

Try this:
Code: Select all
tell application "QuarkXPress"
   tell document 1
      set font of (every text style range of every story whose font is "华文黑体") to "HYCuHeiJ"
   end tell
end tell
Jean-Marie Schwartz

= Mac Pro Quad-Core Intel 2.8 GHz • 10 Go 1066 MHz DDR3 • Mac OS 10.10.4 • QuarkXPress 9.5.4.1 • Adobe CS5 =
Jean-Marie Schwartz
 
Posts: 2484
Joined: 23 Nov 2004, 04:30

Re: Change font

Postby LittleIron » 16 Sep 2014, 05:11

ok,it is running :D
Thank you very much
LittleIron
LittleIron
 
Posts: 15
Joined: 22 Oct 2007, 03:56


Return to QuarkXPress 8, 9 & 10: AppleScript

Who is online

Users browsing this forum: No registered users and 1 guest

cron