Take text from one Quark doc into another keeping only the f

Discuss AppleScripting for QuarkXPress 10, 9 & 8 (and before)
Jean-Marie Schwartz
Posts: 1174
Joined: 23 Nov 2004, 04:30

Take text from one Quark doc into another keeping only the f

Post by Jean-Marie Schwartz » 21 Oct 2012, 21:14

Can't you "simply" delete words 2 thru -2? And I would rather go the try route instead of if. So a try block inside of the repeat loop. Tell paragraph i | delete word 2 thru -2
Haven't tried it though. Can you give it a try?

mark lane
Posts: 4
Joined: 27 Sep 2004, 14:16

Take text from one Quark doc into another keeping only the f

Post by mark lane » 16 Jan 2013, 03:32

OK, I'm getting closer, but I get an error when it get to a embedded line. Is there a way to delete embedded lines and picture boxes in my text document? The delete words 2 thru -2 is working, thank you.

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

Take text from one Quark doc into another keeping only the f

Post by Jean-Marie Schwartz » 16 Jan 2013, 05:05

Hi! :-)
I'm not with you What do you mean by "is there a way to delete embedded lines and picture boxes in my text document"? Have you tried "delete every picture box" and "delete every line box" in a tell document statement?

mark lane
Posts: 4
Joined: 27 Sep 2004, 14:16

Take text from one Quark doc into another keeping only the f

Post by mark lane » 16 Jan 2013, 05:13

I tried that but I got a error. QuarkXPress got an error: Cannot delete anchored boxes. Delete parent instead. When I said embedded lines and picture boxed, I ment anchored, sorry.

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

Take text from one Quark doc into another keeping only the f

Post by Jean-Marie Schwartz » 16 Jan 2013, 05:34

OK. I did get what you meant by embedded, but didn't get what you were really after. My bad: I didn't know AS would not let us delete anchored boxes. Unless I'm missing sth (if Scripting_Ace is around, maybe he'd confirm or help us in that).
But what's your problem again? Can you give a more detailed example?

mark lane
Posts: 4
Joined: 27 Sep 2004, 14:16

Take text from one Quark doc into another keeping only the f

Post by mark lane » 16 Jan 2013, 06:32

I have a catalog that's around 250 pages, 3 columns seperated into 5 documents. Each document is a single text box linked together on each page. I have a anchored picture box of a knife with the item description below. Each description starts with a item number, description and then the price. I'm wanting to strip out all the pictures, lines, group descripion and the text between the item number and price. So I can take nothing but the item number and price into excel and compare it to our accounting data base. This way I can check prices, and I can also make sure that everything that is in the catalog is suppose to be in the catalog. We have about 7,000 items in that catalog. I can email you a example if you want.

G46976 Sportster. 3 7/8" closed lockback. Stainless partially serrated drop point blade with bead blast finish and thumb slot. Champagne aluminum handles with black Gator Tex grip. Stainless pocket clip. Mixed packaging (boxed or hang). Closeout! 19.99

mark lane
Posts: 4
Joined: 27 Sep 2004, 14:16

Take text from one Quark doc into another keeping only the f

Post by mark lane » 16 Jan 2013, 10:14

The only problem I'm having now is it's locking up quark when the script reaches a anchored line or picture box. If I had the script to delete all anchored lines and pictures boxes at the beginning that would be awesome.

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

Take text from one Quark doc into another keeping only the f

Post by Jean-Marie Schwartz » 16 Jan 2013, 20:56

Hum! And what about exporting text as XPress tagged file and somehow delete the pic boxes in there? (Never tried so I couldn't say what it looks like when anchored pic boxes exist. You could just test on a very simple test file with 2 words and and a anchored box)
Let us know.

mark lane
Posts: 4
Joined: 27 Sep 2004, 14:16

Take text from one Quark doc into another keeping only the f

Post by mark lane » 17 Jan 2013, 02:49

I saved the text as rich text and copied and pasted back into quark and the anchored items are GONE : )
Thanks for the help!

Post Reply

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