Page 1 of 1

To find a text style one by one

Posted: 07 Nov 2014, 06:38
by MaryJosh
This is for text

Re: To find a particular character style one by one

Posted: 09 Nov 2014, 19:30
by ddwebdev
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

Re: To find a particular character style one by one

Posted: 10 Nov 2014, 05:14
by MaryJosh
This is for test

Re: To find a particular character style one by one

Posted: 11 Nov 2014, 05:57
by ddwebdev
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

Re: To find a particular character style one by one

Posted: 11 Nov 2014, 09:55
by MaryJosh
This is for test

Re: To find a particular character style one by one

Posted: 03 Jan 2015, 00:54
by ddwebdev
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