Switch to full style
Ask all general Gimp related questions here
Post a reply

x=x+1 for Text entry

Thu Jan 27, 2022 4:56 pm

GIMP Version: 2.8.14
Operating System: Windows
GIMP Experience: New User



OKay, I'm not even sure what I want is possible, so I'll explain what I'm doing.
I regularly create png tokens for Roll20, for example, I've made a token of an Orc, but since there are often dozens of orcs at one time, I've taken to numbering each token using the Text function, then exporting the numbered token as "Orc-01.png", then renumbering the text field an exporting as "Orc-02.png" and so on.

I'd like to know if there's a macro or other way I can get GIMP to auto-renumber the text field and export the new token as an incremental number (like x=1, while x<50, enter text in field as x, then export as name tokenName-x, then x=x+1 and repeat)

Is such a thing possible?

Re: x=x+1 for Text entry

Thu Jan 27, 2022 5:23 pm

Not without writing a script for this....

Re: x=x+1 for Text entry

Thu Jan 27, 2022 10:37 pm

can it be done in javascript? If so, how/where would I plug it in?

Re: x=x+1 for Text entry

Fri Jan 28, 2022 2:45 am

What has JavaScript to do with this? In Gimp you write scripts in Scheme/Script-fu or Python.

A completely different solution is to add the labels using an external utility such as ImageMagick.

Re: x=x+1 for Text entry

Fri Jan 28, 2022 3:12 am

python it is then. thanks.
Post a reply