Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Bill_O on March 28, 2019, 05:36:11 PM

Title: scr list
Post by: Bill_O on March 28, 2019, 05:36:11 PM
I am unable to find a list of the scr calls that can be made in Mach4.
Does anyone know where one is?

Thanks,
Bill
Title: Re: scr list
Post by: joeaverage on March 28, 2019, 05:45:57 PM
Hi,
this is the best I know of:

https://www.machsupport.com/forum/index.php?topic=29452.0 (https://www.machsupport.com/forum/index.php?topic=29452.0)

Craig
Title: Re: scr list
Post by: Bill_O on March 28, 2019, 05:56:01 PM
Craig,

I saw that but was hoping there was a more complete list.
I realize not many things need the scr but as far as I can see at least some do.

Thanks again,
Bill
Title: Re: scr list
Post by: joeaverage on March 28, 2019, 05:58:54 PM
Hi,
to be honest I try to avoid them, not the least amongst the reasons is that they are not documented clearly
and comprehensively.

Craig
Title: Re: scr list
Post by: Chaoticone on March 28, 2019, 08:25:00 PM
If you open a script in zerobrain editor and type scr. you will get a complete list I think. No docs on them but they are pretty self explanatory.
Title: Re: scr list
Post by: joeaverage on March 29, 2019, 01:11:09 AM
Hi Chaoticone,
that's a great idea.

I also rememberd that Daz has done a video to add elements to the auto-fill feature of the Zero Brane
editor.

https://www.machsupport.com/forum/index.php?topic=37784.0 (https://www.machsupport.com/forum/index.php?topic=37784.0)

Using Daz's suggestion I looked in Mach4Hobby/ZeroBraneStudio/api/lua/scr.lua, I have extracted the text
and posted it. It could be tidied up to exclude some of the Lua logic....

Craig
Title: Re: scr list
Post by: joeaverage on March 29, 2019, 01:30:16 AM
Hi,
edited the Lua listing to make it a bit more readable.
Is a straight out list of available functions and value definitions, it does not explain what each one does.
Still better than no listing at all!

Thanks to Chatoicone for the idea, Daz to highlight the means and to whomever in NFS that cast the info
into the Lua file in the first place.

Craig
Title: Re: scr list
Post by: Bill_O on March 29, 2019, 07:50:15 AM
Brett and Craig,

That is great.
Thanks for extracting it and editing it.

Bill
Title: Re: scr list
Post by: Chaoticone on March 29, 2019, 10:24:57 AM
Nice Craig!  :)
Title: Re: scr list
Post by: smurph on March 29, 2019, 07:44:25 PM
The reason they are not documented is to discourage their use.  Because most of the time, there is better way to solve the problem.  Some of them were for Mach 3 like behavior.  The only ones I would even suggest for general purpose use are the scr.GetProperty(), scr.SetProperty() and scr.ExecMdi().  There are plenty examples that use these.  The ones prefixed with "Editor" are for industrial licenses only where an in screen editor can be present. 

Steve