batch-find-and-replace icon indicating copy to clipboard operation
batch-find-and-replace copied to clipboard

following documents are changed to last query

Open magicsun opened this issue 12 years ago • 5 comments

Document number one is edited properly, but documents 2, 3 and so on, are changed to the last query in the toml file it seems. So instead of running the script for the specific text fields, it changes all fields to the same query all at once.

Let me explain my situation so that you can get a picture of what I mean.

I have 3 exact the same files, I duplicated them. They all contain 2 textfields with text. textfield 1 has swatch_a assigned to it, textfield 2 has swatch_b assigned to it. I made 2 queries, one for textfield 1 and one for textfield 2. Telling them to replace swatch_a with swatch_aa and swatch_b with swatch_bb. Textfield one should be coloured to orange, textfield 2 should be coloured to grey.

After running the script, document one has an orange textfield and a grey textfield. If I hit cmd+z I can see the perfect steps the script took to realise this. But document 2 and 3 have all grey textfields.

I can see that when I press cmd+z the steps the script took to recolour. All textfields first have been changed to orange, then to grey, instead of textfield 1 being coloured only to orange, and textfield 2 being coloured only to grey.

I hope that explains it a bit :)

magicsun avatar Apr 12 '13 12:04 magicsun

Can you provide me with some example .indd files, your fcquery .xmls and your .toml file so I can try to reproduce the error? Would be easier to understand. I will take a look into it this weekend. You can paste a download link in here or find my email on my profile page here on github.

ff6347 avatar Apr 12 '13 15:04 ff6347

swatch_aa = orange
swatch_bb = grey

Textfield 1 has swatch_a
Textfield 2 has swatch_b in all 3 files

In document 2 and 3 the script changes also textfield 1 and 2 first to swatch_aa (orange) and then to swatch_bb (grey) Is that right?

ff6347 avatar Apr 12 '13 15:04 ff6347

Hi Mirna, I had an idea where the problem can come from. Please download the script package again and test if it works now

ff6347 avatar Apr 13 '13 09:04 ff6347

I'm sorry for the really late response, I had the files at my work computer.

I tested the new script, I don't see any difference. Tested it a few times to be sure.

I will send you a complete package of the files.

"Productname" should change to orange, price (two prices together) should change to grey (and one price being a percentage of grey, but that works great as they are in the same textfield).

As you can see, for all the documents other then the active one, it changes all fields to the first query, and then all fields to the second query. Instead of query 1 for the title only, and query 2 for the price only.

Again thank you so much for your help so far, I really appreciate it.

magicsun avatar Apr 15 '13 11:04 magicsun

Again thank you so much for your help so far, I really appreciate it.

No problem. I want the project to work to. I also need this for several print projects. It is cool to have somebody test it and give me feedback.

ff6347 avatar Apr 15 '13 11:04 ff6347