To find a text style one by one

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

To find a text style one by one

Postby MaryJosh » 07 Nov 2014, 06:38

This is for text
Last edited by MaryJosh on 19 Jun 2015, 23:49, edited 3 times in total.
MaryJosh
 
Posts: 4
Joined: 28 Oct 2014, 06:10

Re: To find a particular character style one by one

Postby ddwebdev » 09 Nov 2014, 19:30

i can help you but i need to understand first
-Why pass by the find/change window instead of targeting directly the box and story by script
-And what is control key +8 doing
on my mac the control key does nothing.. even the command+8 does nothing
-So what do you want to do? (accept or reject change ???)
At this time i'm able to get the find/change window and uncheck the “Ignore Attributes” by script
But not sure is the best way
Need more detail
ddwebdev
 
Posts: 23
Joined: 11 May 2012, 12:34

Re: To find a particular character style one by one

Postby MaryJosh » 10 Nov 2014, 05:14

This is for test
Last edited by MaryJosh on 19 Jun 2015, 23:50, edited 2 times in total.
MaryJosh
 
Posts: 4
Joined: 28 Oct 2014, 06:10

Re: To find a particular character style one by one

Postby ddwebdev » 11 Nov 2014, 05:57

Excuse me, its not clear enough for me
If you're text is already formated by Character style... why just pout the color in that style sheet
...
in case its not what you mean... why the One By one is important
Do you have to approve each modification one by one
you could find and modify ALL desire i.e.: Helv 12pt Bold to Red color in one operation
...
I just be sure of you're need
ddwebdev
 
Posts: 23
Joined: 11 May 2012, 12:34

Re: To find a particular character style one by one

Postby MaryJosh » 11 Nov 2014, 09:55

This is for test
Last edited by MaryJosh on 19 Jun 2015, 23:51, edited 2 times in total.
MaryJosh
 
Posts: 4
Joined: 28 Oct 2014, 06:10

Re: To find a particular character style one by one

Postby ddwebdev » 03 Jan 2015, 00:54

Sorry i'm very busy and dont have time
im with quark 9.5 on osx Maverick 10.9.5
this code open the find/change window
and uncheck the "Ignore Attributes" feature
Done by position window and click by coordinate X - Y
With a little script in Python.
Not sure what is the next step... User interaction ?? to select fonts etc... ??

Code: Select all
tell application "QuarkXPress"
   activate
   tell application "System Events" to key code 3 using command down
   delay 2   
   tell application "System Events"
      set the position of window 1 of process "QuarkXPress" to {200, 200}
      set x to 654
      set y to 287
      set l to 1
      
      do shell script "
/usr/bin/python <<END
import sys
import time
from Quartz.CoreGraphics import *
def mouseEvent(type, posx, posy):
          theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
          CGEventPost(kCGHIDEventTap, theEvent)
def mousemove(posx,posy):
          mouseEvent(kCGEventMouseMoved, posx,posy);
def mouseclick(posx,posy):
          mouseEvent(kCGEventLeftMouseDown, posx,posy);
          mouseEvent(kCGEventLeftMouseUp, posx,posy);
ourEvent = CGEventCreate(None);
currentpos=CGEventGetLocation(ourEvent);             # Save current mouse position
for x in range(0, " & l & "):
          mouseclick(" & x & "," & y & ");
mousemove(int(currentpos.x),int(currentpos.y));      # Restore mouse position
END"
      
   end tell
   
end tell


Last bumped by MaryJosh on 03 Jan 2015, 00:54.
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 2 guests