Can you remove kerning through Applescript

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

Can you remove kerning through Applescript

Postby jim63 » 09 Oct 2014, 08:00

We were looking for a way to remove all kerning from documents supplied to us using Applescript Does anyone first know if it is possible and second have a script to do so.

We also would like to remove all hyphenation.
jim63
 
Posts: 1
Joined: 09 Oct 2014, 07:51

Re: Can you remove kerning through Applescript

Postby ddwebdev » 18 Oct 2014, 10:45

Dont know if it's too late But this is my solution
The Hyphenation problem is more complex due to the h and j setting (i work on it)
Code: Select all
tell application "QuarkXPress"
   tell project 1
      set kern of every character of every story of every text box of every page of every layout space to "0"
   end tell
end tell
ddwebdev
 
Posts: 23
Joined: 11 May 2012, 12:34

Re: Can you remove kerning through Applescript

Postby Jean-Marie Schwartz » 20 Oct 2014, 02:00

The point is that it's not working at my end.

EDIT: My bad! I took kerning for tracking so didn't see any change. So this kind of code is working OK though very slow (up to 38 sec for a single 3500-char text box)! I guess working out on an exported tagged text then reimported would be quicker but I've never gone that far in scripting my files yet.
Code: Select all
tell application "QuarkXPress9"
   tell document 1
      tell story 1 of current box
         set kern of every character to 0
         set track of every character to 0
      end tell
   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: 2483
Joined: 23 Nov 2004, 04:30

Re: Can you remove kerning through Applescript

Postby Jean-Marie Schwartz » 20 Oct 2014, 02:45

Something like this is much much quicker:
Code: Select all
tell application "QuarkXPress9"
   activate
   tell document 1
      set the selection to story 1 of current box
      my Reset()
   end tell
end tell

on Reset()
   tell application "QuarkXPress9"
      select menu item 28 of menu 10 -- that is, for me, Remove Manual Kerning
   end tell
end Reset
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: 2483
Joined: 23 Nov 2004, 04:30

Re: Can you remove kerning through Applescript

Postby ddwebdev » 20 Oct 2014, 08:01

I didn't know if my solution was the best
At least, my post shake the tree and someone else answers the question
ddwebdev
 
Posts: 23
Joined: 11 May 2012, 12:34


Return to QuarkXPress 8, 9 & 10: AppleScript

Who is online

Users browsing this forum: No registered users and 1 guest