Delete all Manual Guides from a Document

Discuss AppleScripting for QuarkXPress 10, 9 & 8 (and before)
britsmith
Posts: 337
Joined: 03 Jul 2006, 06:55
Location: Northern England

Delete all Manual Guides from a Document

Post by britsmith » 05 Apr 2011, 10:37

I would like a script which will remove all of the manually-placed guides from a Quark document. I have to process files from graphic designers and they leave numerous guides in all kinds of weird places. I need to show margin guides, plus any I might need to add myself, and therefore can't use Hide Guides, so a script to do that would be very useful. [Y]

User avatar
eyoungren
Posts: 3259
Joined: 27 May 2004, 16:08
Location: Phoenix, AZ USA
Contact:

Delete all Manual Guides from a Document

Post by eyoungren » 05 Apr 2011, 18:03

I don't have a script for you, but there may be an easier way. When you open the offending document zoom in so that you can place the top edge of the document underneath the ruler (make sure Show Guides is on). OPTN+Click on the ruler bar (the top one). Move the document over so that you place the left edge of the document underneath the left ruler bar. OPTN+Click on the left ruler bar. Zoom out. ALL of the guides will be gone. Now you can place all your guides.
Incidentally, Mig knows a trick to have guides appear only at certain view percentages. I forget what it is, but you might ask him if it's something that interests you.

User avatar
max.peter
Posts: 888
Joined: 11 Sep 2010, 12:35
Location: Romania
Contact:

Delete all Manual Guides from a Document

Post by max.peter » 05 Apr 2011, 19:40

Hi britsmith,
Assuming you're using QXP v.8, you can use the Guides palette (Windows > Guides). After opening the palette, make sure the guides are not locked, select all and click on the trash icon in the palette. This trick doesn't work if the guides are placed on a master page.
HTH
Regards

Jean-Marie Schwartz
Posts: 1168
Joined: 23 Nov 2004, 04:30

Delete all Manual Guides from a Document

Post by Jean-Marie Schwartz » 05 Apr 2011, 20:25

Reading you I just wonder how you understand the manually-placed guides. On my side, I understand it as guides dragged from the rules as opposed to guides created via the Guides palette. Am I wrong? If I'm right then I can't see any way to differenciate both kinds (unless differnt colors are used).
Now if your aim is to simply delete every guides then create your own remaining visibles, that's another thing. So deleting guides and hiding guides are 2 distinct things.
Oh! one more question: do you absolutely need an AppleScript or is any manual trick good for you?

britsmith
Posts: 337
Joined: 03 Jul 2006, 06:55
Location: Northern England

Delete all Manual Guides from a Document

Post by britsmith » 05 Apr 2011, 22:05

Thanks guys, the Guides Palette does it!
The trick of option-clicking on the rulers is useful for individual pages, but recently I was sent 21 x 8-page brochures to work on, so wish I'd known the palette could do that! I'll certainly use it next time!

Emma
Posts: 657
Joined: 07 Jul 2004, 08:43

Delete all Manual Guides from a Document

Post by Emma » 05 Apr 2011, 22:13

It's definitely scriptable too. You'd need to cover horizontal and vertical guides, and cover page guides and spread guides. But this works as a starter:
tell document 1 of application "QuarkXPress"
repeat with i from 1 to count of horizontal guides of spread 1
tell horizontal guide i of page 1
delete
end tell
end repeat
end tell

Emma
Posts: 657
Joined: 07 Jul 2004, 08:43

Delete all Manual Guides from a Document

Post by Emma » 05 Apr 2011, 23:01

Britsmith wrote:
numerous guides in all kinds of weird places

Don't they just!! And I've got one who always moves the zero point about. Why??

Jean-Marie Schwartz
Posts: 1168
Joined: 23 Nov 2004, 04:30

Delete all Manual Guides from a Document

Post by Jean-Marie Schwartz » 06 Apr 2011, 00:53

Emma wrote:And I've got one who always moves the zero point about. Why??
This can be very helpful in some circumstances when laying out a project and placing objects accurately. It can also helps in measuring distance between 2 objects. Now the question is: Why does he leave it like that? He should set the zero point back to normal after he's done.

britsmith
Posts: 337
Joined: 03 Jul 2006, 06:55
Location: Northern England

Delete all Manual Guides from a Document

Post by britsmith » 06 Apr 2011, 02:22

Emma wrote:
It's definitely scriptable too. You'd need to cover horizontal and vertical guides, and cover page guides and spread guides. But this works as a starter:
tell document 1 of application "QuarkXPress"
repeat with i from 1 to count of horizontal guides of spread 1
tell horizontal guide i of page 1
delete
end tell
end repeat
end tell

Thanks Emma, I've obviously done something wrong because I can't make this work. It seems OK in Applescript Editor and in Quark's AS menu, but it doesn't delete any of the horizontal guides. It would be useful if it could work, but meanwhile the palette is OK, so don't worry if it's a problem.
I wish I knew why people use so many guides, as the tools are already in Quark to get things precise. I just wonder where some operators get their training, or whether most try to teach themselves. Things are no better in jobs I receive in InDesign, in fact they're usually worse, with items locked document-wide and stuff left all over the pasteboards. 'Things Designers Do' is a vast topic in itself!

muckraker
Posts: 1
Joined: 02 Sep 2010, 08:41

Delete all Manual Guides from a Document

Post by muckraker » 12 May 2011, 07:08

The OPT+click method worked perfectly for me! I wish I knew this years ago. Glad I do now! Thanks!

Post Reply

Return to “QuarkXPress 8, 9 & 10: AppleScript”