• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is there a variable for the current batch round when using batch actions?

Community Beginner ,
Jun 17, 2024 Jun 17, 2024

Copy link to clipboard

Copied

Hi,

For years I've been using scripts in batch actions, because I often need to make designs with different QR-codes. Until now I could always make it work with my limited C# knowledge and scripts I found online. But now I'm facing a new challenge: besides a different QR-code, I now also need to change the displayed name in every file. I know I can do the latter with the Variables panel, but I don't think I can make this work with my other scripts. So I would like to script something like the Variables feature does. What I can't seem to find however, is how to target the batch round number. Something like "batchround(n)"? I assume there is an existing variable for this, but I can't find anything about it. With this, I can target a row in an .xml of .txt file with the names in it. So; anyone who knows this? 🙂 Thanks!

TOPICS
Scripting

Views

171

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jun 20, 2024 Jun 20, 2024

For now I found another workaround, which is even better for this situation actually; I turned the QR-code into a dynamic object in the Variables panel.  With this method they become variable, and if I save the QR-codes as separate .ai files, they work just like the names. I list the names and the QR-code locations in a .csv file, and batch process them as a dataset.

 

So for now I'm good and I'll leave this solution here in case it's helpful for anyone else. But I would still really like to know

...

Votes

Translate

Translate
Adobe
Community Expert ,
Jun 17, 2024 Jun 17, 2024

Copy link to clipboard

Copied

what's a batchround? is it a row in a txt file or spreadsheet that represents a record?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2024 Jun 17, 2024

Copy link to clipboard

Copied

No, it's the index of the iteration of the loop. So if you batch action 20 files, the first file would be [0], and the last file would be [19]. 🙂

 

I used the wrong brackets in my example, sorry. That should be "batchround[n]".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 20, 2024 Jun 20, 2024

Copy link to clipboard

Copied

LATEST

For now I found another workaround, which is even better for this situation actually; I turned the QR-code into a dynamic object in the Variables panel.  With this method they become variable, and if I save the QR-codes as separate .ai files, they work just like the names. I list the names and the QR-code locations in a .csv file, and batch process them as a dataset.

 

So for now I'm good and I'll leave this solution here in case it's helpful for anyone else. But I would still really like to know the answer to my question, so I'll leave that open as well. 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines