Page 2 of 2

Re: Lua 3rd-Party Libraries Not Loading

Posted: Thu Nov 24, 2022 10:33 pm
by synthsin75
Defims wrote: Thu Nov 24, 2022 7:42 pm WOW, Moho 11 is nice! I wonder how to pass the color value back to Moho in your color picker dll, Is it some code like:

Code: Select all

lua_pushstring(L, "#000");
Is it possible to call other function? like:

Code: Select all

lua_getglobal(L, "CHANNEL_BONE_3");
It was so long ago, I no longer remember.
I think I lost the source files, but I'll look around.

Re: Lua 3rd-Party Libraries Not Loading

Posted: Sat Nov 26, 2022 10:08 am
by synthsin75
Defims wrote: Thu Nov 24, 2022 7:42 pm WOW, Moho 11 is nice! I wonder how to pass the color value back to Moho in your color picker dll, Is it some code like:

Code: Select all

lua_pushstring(L, "#000");
Is it possible to call other function? like:

Code: Select all

lua_getglobal(L, "CHANNEL_BONE_3");
It used:

Code: Select all

require('pickcolor')
to access the pickcolor.dll, and called:

Code: Select all

s = pickcolor.text()
to get the string the dll copied to the clipboard.

Then it tested if that string contained color info and converted the hex string to a Moho color object.

Re: Lua 3rd-Party Libraries Not Loading

Posted: Sun Nov 27, 2022 6:20 pm
by Defims
synthsin75 wrote: Sat Nov 26, 2022 10:08 am
Defims wrote: Thu Nov 24, 2022 7:42 pm WOW, Moho 11 is nice! I wonder how to pass the color value back to Moho in your color picker dll, Is it some code like:

Code: Select all

lua_pushstring(L, "#000");
Is it possible to call other function? like:

Code: Select all

lua_getglobal(L, "CHANNEL_BONE_3");
It used:

Code: Select all

require('pickcolor')
to access the pickcolor.dll, and called:

Code: Select all

s = pickcolor.text()
to get the string the dll copied to the clipboard.

Then it tested if that string contained color info and converted the hex string to a Moho color object.
WoW! thanks for taking the time of testing and posting the code.
As SimplSam posted in Moho Plugin API (proof-of-concept) , newer Moho version still support string in/out. So pickcolor can work.
Still hope Moho to fixed the problem in Moho.