Hello Guest it is April 19, 2024, 10:18:19 AM

Author Topic: Where to find documentation to develop scripts?  (Read 2039 times)

0 Members and 1 Guest are viewing this topic.

Where to find documentation to develop scripts?
« on: June 01, 2018, 02:49:36 AM »
Hello

I modified a milling machine BF30 Optimum by adding a motorization on the 3 axes as well as for the turntable. I use a Pokeys57cnc and 4 drivers PoStep60_256.

I have been running Mach4 for a while and everything works with GCode programs.

Since I do a lot of development in VB.net (I master the programming), I started to modify the screen of Mach4 to add personal features.

I read "Mach4 Screen Editor V1.0" and "Mach4 LUA Scripting Manual". I saw that in the help of the script editor, there is the list and definition of Mach core API functions (mc.*********x).

When I look at some examples of scripts, I see that there are wx functions. (ex: wx.wxPanel, wx.wxMessageBox, ...), functions str.********* (ex: scr.SetProperty, scr.ExecMdi, ...). And maybe others!

Where can I find the list of all these functions (wx, str, ...) with the syntax and parameters to use?

Thank you all for your help.

Jean-Pierre
Re: Where to find documentation to develop scripts?
« Reply #1 on: June 01, 2018, 03:13:19 AM »
Hi,
there is no list but rather snippets here and there. It is one of the serious frustrations about Mach4 is that there is no major repository
for documentation.

Personally I find the wx.Widget functions the most confusing, and they actually have superb documentation, its just so much that I overload so quickly.

When I am coding this link is permanently open:

https://www.lua.org/manual/5.2/

Another good source is the Lua  Examples folder that ships with Mach. You can take snippets from here and snippets from there to do many things.

The true source is this forum, there is always some one to help and chip in.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Where to find documentation to develop scripts?
« Reply #2 on: June 01, 2018, 03:54:35 AM »
Hi Craig and thanks for your answer.

I understand easily that it can be a frustration if no list exists. That's what happens to me.

But if everyone is forced to build a list, a lot of energy is lost and the software loses interest. And besides, we can not develop if we do not even know the list of functions. We walk on the head (French expression).

There is nothing worse than software that can develop things but for which there is no documentation that goes with it.

I looked at the LUA documentation, but I do not see the correspondence with the functions of Mach4. Example, I want to test the status of a toggle button and I can not find any information about it. I lose hours and I do not move.

Jean-Pierre
Re: Where to find documentation to develop scripts?
« Reply #3 on: June 01, 2018, 04:11:53 AM »
Hi,
your comment has been made before by many, and by myself as well.

While  Mach4's documentation lags considerably NFS has not been idle. Examples are the Probing Module, the PMC module, and most recently the Zero Brane editor.
If NFS were to devote the time and energy to documenting what they have all three of these advances would not have happened.

This is my interpretation of the observation 'NFS is very much committed to developing Mach as completely and quickly as possible at the expense of documenting
it all because it needs all these features to be considered a genuine CNC software solution for OEM builders'.

The potential for frustration re lack of documentation is high but I sure do love all the new 'goodies', so much so that I prefer the 'goodies' to boring old 'docs'  anyway.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Where to find documentation to develop scripts?
« Reply #4 on: June 01, 2018, 05:25:13 AM »
Jean-Pierre

Here is a text file I have compiled from various posts here by Steve Murphy. Hopefully this will help you with the screen (.scr) API calls. I am not aware of any further detail on these other than any given within the Zero Brain editor.

You might want to look up wxWidgets for some of the wx function calls.

Allan