Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.
Moderators: Víctor Paredes , Belgarath , slowtiger
davoodice2
Posts: 397 Joined: Tue Jun 15, 2021 1:14 pm
Post
by davoodice2 » Tue Aug 10, 2021 12:20 pm
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.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Lukas
Posts: 1336 Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:
Post
by Lukas » 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 .
davoodice2
Posts: 397 Joined: Tue Jun 15, 2021 1:14 pm
Post
by davoodice2 » Tue Aug 10, 2021 7:10 pm
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?
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Lukas
Posts: 1336 Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:
Post
by Lukas » Wed Aug 11, 2021 8:45 am
davoodice2 wrote: ↑ Tue Aug 10, 2021 7:10 pm amazing 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...
gilcartunista
Posts: 55 Joined: Mon Mar 14, 2016 7:13 pm
Location: https://www.facebook.com/gil.cartunista
Contact:
Post
by gilcartunista » Wed Aug 11, 2021 3:27 pm
Lukas wrote: ↑ Wed Aug 11, 2021 8:45 am
davoodice2 wrote: ↑ Tue Aug 10, 2021 7:10 pm amazing 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.
hayasidist
Posts: 3841 Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England
Post
by hayasidist » Wed Aug 11, 2021 3:41 pm
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 ...
davoodice2
Posts: 397 Joined: Tue Jun 15, 2021 1:14 pm
Post
by davoodice2 » Wed Aug 11, 2021 4:33 pm
can you share how to create a floating window? please
just interface.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Lukas
Posts: 1336 Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:
Post
by Lukas » Wed Aug 11, 2021 4:59 pm
davoodice2
Posts: 397 Joined: Tue Jun 15, 2021 1:14 pm
Post
by davoodice2 » Thu Aug 12, 2021 8:17 am
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
davoodice2
Posts: 397 Joined: Tue Jun 15, 2021 1:14 pm
Post
by davoodice2 » Thu Aug 12, 2021 8:19 am
davoodice2 wrote: ↑ Thu Aug 12, 2021 8:17 am
thanks you.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش