Smart Bone Helpers by Ramón López

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

User avatar
Ramón López
Posts: 1802
Joined: Sun Aug 08, 2004 1:41 pm
Location: Elda! Again...
Contact:

Re: Smart Bone Helpers by Ramón López

Post by Ramón López » Tue Oct 14, 2014 5:35 pm

KuzKuz wrote:Hi, need this wonderful script fix for ASP 10.1.1. Thanks!

...Oh, yes! Thankfully I already made a quick fix for this, so now it's only an upload matter. Here is the new link: It is kind of a "mend" but it should do the job for 10.1.1, anyway... let me know whatever you consider appropriate. Greetings!
♪♫♬ Y si no puedes estar (animando) con el programa que amas
Ama el programa con el que estás (animando)
♪♫♬
Stan
Posts: 125
Joined: Sun Apr 19, 2009 3:22 pm
Contact:

Re: Smart Bone Helpers by Ramón López

Post by Stan » Tue Oct 14, 2014 5:51 pm

Ramón López wrote:It is kind of a "mend" but it should do the job for 10.1.1, anyway... let me know whatever you consider appropriate. Greetings!
Hey Ramon, I just want to add my 2 cents. Here's how I solved the same problem in my scripts:

Code: Select all

	if moho.AppVersion ~= nil then
		local sVersion = string.gsub(moho:AppVersion(), "^(%d+)(%.%d+)(%..+)", "%1%2")
		version = tonumber(sVersion)
	end
That simple pattern will always return an appropriate number from any string versions like "11", "11.1", "11.1.2.1111", etc.
________________________________________________________________________
http://mohoscripting.com/ - Unofficial Moho (Anime Studio) Lua Scripting Documentation
http://2danimator.ru/ - Russian Anime Studio Forum
User avatar
Ramón López
Posts: 1802
Joined: Sun Aug 08, 2004 1:41 pm
Location: Elda! Again...
Contact:

Re: Smart Bone Helpers by Ramón López

Post by Ramón López » Tue Oct 14, 2014 6:25 pm

Stan wrote:Hey Ramon, I just want to add my 2 cents. Here's how I solved the same problem in my scripts:

Code: Select all

	if moho.AppVersion ~= nil then
		local sVersion = string.gsub(moho:AppVersion(), "^(%d+)(%.%d+)(%..+)", "%1%2")
		version = tonumber(sVersion)
	end
That simple pattern will always return an appropriate number from any string versions like "11", "11.1", "11.1.2.1111", etc.
Wow! I'll study that thanks! :D

I'm currently out of shape about all this and I had to make a quick fix that I knew it was not going to be perfect under all the possible situations (as someone pointed afterwards), but I left that way because it was the nearest solution I could find at that moment. Of course, I always wanted a simpler and more trustworthy solution, something more like yours seems to be, at least at first sight and for what you say, because I have to re-learn how to deal with strings as soon as I stop doing in a daily basis... Anyway... it's so/very welcomed! So thanks again :)
♪♫♬ Y si no puedes estar (animando) con el programa que amas
Ama el programa con el que estás (animando)
♪♫♬
User avatar
KuzKuz
Posts: 78
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

Re: Smart Bone Helpers by Ramón López

Post by KuzKuz » Wed Oct 15, 2014 6:58 am

Ramón López wrote:
KuzKuz wrote:Hi, need this wonderful script fix for ASP 10.1.1. Thanks!

...Oh, yes! Thankfully I already made a quick fix for this, so now it's only an upload matter. Here is the new link: It is kind of a "mend" but it should do the job for 10.1.1, anyway... let me know whatever you consider appropriate. Greetings!
Thanks! :D
User avatar
Ramón López
Posts: 1802
Joined: Sun Aug 08, 2004 1:41 pm
Location: Elda! Again...
Contact:

Re: Smart Bone Helpers by Ramón López

Post by Ramón López » Wed Oct 15, 2014 10:55 am

You're all welcome! :)
♪♫♬ Y si no puedes estar (animando) con el programa que amas
Ama el programa con el que estás (animando)
♪♫♬
sillyanimate
Posts: 145
Joined: Mon Feb 15, 2016 7:28 pm

Re: Smart Bone Helpers by Ramón López

Post by sillyanimate » Thu Feb 25, 2016 2:30 am

um where do i put the pictures??!??!
Don't forget! No one is perfect!
Post Reply