Create floting window

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Create floting window

Post by davoodice2 »

hello.
I am newbie in moho scripting.

Is there a way to build a floating window in Moho? So that he had access to the main window of Moho. :?:
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: Create floting window

Post by Lukas »

I've been experimenting and was able to create a floating window that has access Moho but it's unstable at the moment: ExperimentDialWindow.gif

More info in this thread.
User avatar
gilcartunista
Posts: 55
Joined: Mon Mar 14, 2016 7:13 pm
Location: https://www.facebook.com/gil.cartunista
Contact:

Re: Create floting window

Post by gilcartunista »

Great Lukas!! If possible I would like to try it! Grateful!
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: Create floting window

Post by davoodice2 »

Lukas wrote: Tue Aug 10, 2021 12:37 pm I've been experimenting and was able to create a floating window that has access Moho but it's unstable at the moment: ExperimentDialWindow.gif

More info in this thread.
amazing job ! this with moho's api?
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: Create floting window

Post by Lukas »

davoodice2 wrote: Tue Aug 10, 2021 7:10 pmamazing job ! this with moho's api?
Yes Moho's API and some undocumented stuff mentioned in the thread I linked in my first reply.
gilcartunista wrote: Tue Aug 10, 2021 1:28 pm Great Lukas!! If possible I would like to try it! Grateful!
It'll just crash...
User avatar
gilcartunista
Posts: 55
Joined: Mon Mar 14, 2016 7:13 pm
Location: https://www.facebook.com/gil.cartunista
Contact:

Re: Create floting window

Post by gilcartunista »

Lukas wrote: Wed Aug 11, 2021 8:45 am
davoodice2 wrote: Tue Aug 10, 2021 7:10 pmamazing job ! this with moho's api?
Yes Moho's API and some undocumented stuff mentioned in the thread I linked in my first reply.
gilcartunista wrote: Tue Aug 10, 2021 1:28 pm Great Lukas!! If possible I would like to try it! Grateful!
It'll just crash...
OK Lukas! No problem, I test it anyway! Grateful.
User avatar
hayasidist
Posts: 3525
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Create floting window

Post by hayasidist »

the challenge (why it crashes) is, I think, to do with how the "moho" table is passed through to the "update" function (and I'm also guessing that the functions in that table are expected to be written in C / C++; so the "moho" that they get is C-friendly, and not LUA friendly.) Specifically, I haven't yet figured out how to invoke the functions that return properties that the "usual LUA moho" would give you using such as moho.layer

More here: viewtopic.php?f=12&t=33793&start=30#p198597

so if anyone can figure that out ...
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: Create floting window

Post by davoodice2 »

can you share how to create a floating window? please :cry:

just interface.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: Create floting window

Post by Lukas »

Check out the code in LM_SetOrigin.lua
Also: http://mohoscripting.com/classes/LM_SimpleDialog
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: Create floting window

Post by davoodice2 »

Lukas wrote: Wed Aug 11, 2021 4:59 pm Check out the code in LM_SetOrigin.lua
Also: http://mohoscripting.com/classes/LM_SimpleDialog
thanks man.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: Create floting window

Post by davoodice2 »

davoodice2 wrote: Thu Aug 12, 2021 8:17 am
Lukas wrote: Wed Aug 11, 2021 4:59 pm Check out the code in LM_SetOrigin.lua
Also: http://mohoscripting.com/classes/LM_SimpleDialog
thanks you.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Post Reply