Numerical Text Script
Moderators: Víctor Paredes, Belgarath, slowtiger
Numerical Text Script
Hi.
Is it possible to write a script that increases a numerical text value by 1 each time it is pasted from the clip board?
Trying to create several dot to dot puzzles for my nephew and it is extremely time consuming typing the numbers
each time. I thought someone on the forum might know a quicker way to do this via a script?
Cheers
D.K
Is it possible to write a script that increases a numerical text value by 1 each time it is pasted from the clip board?
Trying to create several dot to dot puzzles for my nephew and it is extremely time consuming typing the numbers
each time. I thought someone on the forum might know a quicker way to do this via a script?
Cheers
D.K
http://www.creativetvandmedia.com
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
- hayasidist
- Posts: 3510
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Numerical Text Script
I'm assuming you're creating a still image? there's a function "InsertText" http://mohoscripting.com/methods/85 -- what you might consider is to use that in a loop along with CreateNewLayer(layerType) and param.Text:Set(n) where n is (text) number incremented each loop to create as many text layers as you need …
getting even more cute - if you draw just the path of the target dot to dot, adding control points in the right order, that same script could add "dots" at each control point and place the number ...
getting even more cute - if you draw just the path of the target dot to dot, adding control points in the right order, that same script could add "dots" at each control point and place the number ...
Re: Numerical Text Script
Great ideas there Hayasidist. I ended up writing an external html5 app that increments a variable by pressing a button and copies it to clipboard for pasting into Moho. Wish I knew a bit more about Moho Scripting to be able to pull off what you suggest though.
Cheers
D.K
Cheers
D.K
http://www.creativetvandmedia.com
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
Re: Numerical Text Script
In TVPaint, I'd import any counter GIF, make it a brush, and just click through ...
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
Re: Numerical Text Script
Wow slow! I would never had put those together in a million years. Nice thinking outside the box there !
Cheers
D.K
Cheers
D.K
http://www.creativetvandmedia.com
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
Re: Numerical Text Script
Comes from decade-long working in Flash (and Director before that), I must admit. I was so used to program a little thing like this. And TVPaint has this custom brush thing which has it in-built to step through a sequence of images. Much like one of those numbering stamps which increase the numbers with each punch, does anyone remember those?
(And I grew up with these connect-the-numbers-books by Hans Jürgen Press, one of my favourite illustrators.)
(And I grew up with these connect-the-numbers-books by Hans Jürgen Press, one of my favourite illustrators.)
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
- hayasidist
- Posts: 3510
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Numerical Text Script
too late for this time, but as I had a couple of hours free …
a tool that will put one number, in sequence at each mouse click (or generate the whole sequence) …
https://www.mediafire.com/file/leo0kiyp ... s.zip/file
that .zip has s folder for the script installation tool and a readme.
A word of warning: generating a whole sequence or more than (say) 50 can take what feels like a very LONG time so be patient if you do choose that option.
This tool runs on Moho 12 or later.
There are no known issues, but please let me know of errors or if there are enhancements you'd like ...
a tool that will put one number, in sequence at each mouse click (or generate the whole sequence) …
https://www.mediafire.com/file/leo0kiyp ... s.zip/file
that .zip has s folder for the script installation tool and a readme.
A word of warning: generating a whole sequence or more than (say) 50 can take what feels like a very LONG time so be patient if you do choose that option.
This tool runs on Moho 12 or later.
There are no known issues, but please let me know of errors or if there are enhancements you'd like ...
Re: Numerical Text Script
Wow! It's a really useful script! I tried it right now and I'm sure i'll be using it a lot! Thanks for developing!hayasidist wrote: ↑Sat Feb 22, 2020 2:20 pm too late for this time, but as I had a couple of hours free …
a tool that will put one number, in sequence at each mouse click (or generate the whole sequence) …
https://www.mediafire.com/file/leo0kiyp ... s.zip/file
that .zip has s folder for the script installation tool and a readme.
A word of warning: generating a whole sequence or more than (say) 50 can take what feels like a very LONG time so be patient if you do choose that option.
This tool runs on Moho 12 or later.
There are no known issues, but please let me know of errors or if there are enhancements you'd like ...
Even with the head in the clouds You can touch the ground
https://www.facebook.com/santiago.penny
https://www.behance.net/pennysantiago
https://www.facebook.com/santiago.penny
https://www.behance.net/pennysantiago
Re: Numerical Text Script
Hayasidist.
So sorry for the late reply. I never received a notification that there was a response.
I am about to look at your script now and report back.
Cheers
D.K
So sorry for the late reply. I never received a notification that there was a response.
I am about to look at your script now and report back.
Cheers
D.K
http://www.creativetvandmedia.com
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
Re: Numerical Text Script
Hayasidist! That script is amazing!
It would be even better if you could lick and drag a line then the number appears but as it is it's extremely useful.
Much faster than my "Copy number to clipboard" html5 app.
Many thanks
Cheers
D.K
It would be even better if you could lick and drag a line then the number appears but as it is it's extremely useful.
Much faster than my "Copy number to clipboard" html5 app.
Many thanks
Cheers
D.K
http://www.creativetvandmedia.com
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
Re: Numerical Text Script
I created a SpotFont to go with the script using the numbers 1 -10 on the keyboard as spots. It works great till you get to 10 then it starts putting double dots down...LOL. I clearly didn't think this through
www.creativetvandmedia.com/Forum/DKSpotFont.ttf
Cheers
D.K
www.creativetvandmedia.com/Forum/DKSpotFont.ttf
Cheers
D.K
http://www.creativetvandmedia.com
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
- hayasidist
- Posts: 3510
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Numerical Text Script
Thanks for the positive comment!!
I did think about adding the "path" and dots, but I got stuck in a brain loop thinking about placement wrt the number - in the "simple case" there's a choice of 4 relative orientations: number left / above / right / below the dot -- then, looking at the dot-to-dot's my son (he's 6!) has, there are the "lines that are pre-drawn" and .. and ...
in the end I decided that it was something that I couldn't reliably automate (possibly ever, but certainly not in the time I had to put the rest of it together) and so left it out ... BUT … given a path, it is feasible to add dots (on the path at control points where the segment is hidden) and numbers on the "outside" (i.e. on the imaginary vector that extends from shape centre through the control point) … if that's helpful, I'll stick on the list for "next time".
Re: Numerical Text Script
Yes....I noticed that when I started placing the numbers around a line. It was something you couldn't really automate especially when you reach a sharp corner or a line that goes back on itself and you need to drag the number around so it's outside the line path. It's a great script anyhow hayasidist!!!
Cheers
D.K
Cheers
D.K
http://www.creativetvandmedia.com
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315
My store on Renderosity:
https://www.renderosity.com/mod/bcs/?uid=921315