Smart Bone Helpers by Ramón López

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

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

Post by Rai López »

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!
...
Stan
Posts: 199
Joined: Sun Apr 19, 2009 3:22 pm

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

Post by Stan »

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.
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

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

Post by Rai López »

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 :)
...
User avatar
KuzKuz
Posts: 472
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

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

Post by KuzKuz »

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
Lukas
Posts: 1295
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

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

Post by Lukas »

Thanks for the quick fix Ramón!
User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

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

Post by Rai López »

You're all welcome! :)
...
sillyanimate
Posts: 145
Joined: Mon Feb 15, 2016 7:28 pm

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

Post by sillyanimate »

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