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
Return to QuarkXPress 8, 9 & 10: AppleScript
Users browsing this forum: No registered users and 1 guest