It is currently Thu Jun 27, 2024 2:44 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: x=x+1 for Text entry
PostPosted: Thu Jan 27, 2022 4:56 pm  (#1) 
Offline
New Member

Joined: Jan 27, 2022
Posts: 3
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?


Attachments:
orcA-02.png
orcA-02.png [ 69.82 KiB | Viewed 603 times ]
orcA-01.png
orcA-01.png [ 69.09 KiB | Viewed 603 times ]
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: x=x+1 for Text entry
PostPosted: Thu Jan 27, 2022 5:23 pm  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4750
Not without writing a script for this....

_________________
Image


Top
 Post subject: Re: x=x+1 for Text entry
PostPosted: Thu Jan 27, 2022 10:37 pm  (#3) 
Offline
New Member

Joined: Jan 27, 2022
Posts: 3
can it be done in javascript? If so, how/where would I plug it in?


Top
 Post subject: Re: x=x+1 for Text entry
PostPosted: Fri Jan 28, 2022 2:45 am  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4750
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.

_________________
Image


Top
 Post subject: Re: x=x+1 for Text entry
PostPosted: Fri Jan 28, 2022 3:12 am  (#5) 
Offline
New Member

Joined: Jan 27, 2022
Posts: 3
python it is then. thanks.


Top
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Entry point _ZdaPv could not be located

2

No new posts Attachment(s) Missing menu entry for 'Fade Retinex' in 2.10.18

4

No new posts Attachment(s) GEGL Text Style Collection - plugin with many fancy text styles

14

No new posts script to load text file and create text layer

6

No new posts Attachment(s) manipulate a portion of text inside a text layer using python-fu

2



* Login  



Powered by phpBB3 © phpBB Group