Welcome to the Machine

C Scripting questions and answers
Post Reply
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4586
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Welcome to the Machine

Post by ArtF »

This is a board for discussions related to scripting in C , generally in MonkeyScipt as thats what we use in
Auggie. I will be doing a series of videos to show basic scripting and to help teach anyone who wishes
to learn the art of scripting.

  Coding is getting important in most peoples lives, up here in Canada, they have even started teaching codeing
in Grade 3. This underscores how usefull it can be to know how to code. Scripting can help in spreadsheets, CAD,
or just in general applications that allow interfacing. Once you know how to script in near any language, you find
your adaptable to any other scripting language with a bit of work.

   Game Monkey Script, which will be my focus of course, is very C-Like, so its usefull in many applications.
Should anyone have questions on scripting, no matter how basic, plase ask them here, if its a difficult to
explain topic, Ill add a video on it. If you can script, youll be able to run Auggie in vastly more powerfull
ways than you can imagine. Auggie truly becomes a "Roll your own controller" if you know the arcane
magic of scripting. Its truly a very easy thing to learn for the most part, and I dont mind helping from the
guy who doesnt know what a variable is, to the person who wants to use this pointers to redirect
blocked signals.

  So if you'd like to learn scripting, or know already but would like to help others learn it, drop by here
occasionally and drop wisdom, or withdraw knowledge, as is your wont.

This board will stand as an archive of scripting tips, hints, help and tutorials.

:)
Art


Last edited by ArtF on Mon Jan 04, 2016 4:19 am, edited 1 time in total.
GlennD
Old Timer
Posts: 80
Joined: Tue Oct 18, 2011 4:19 pm

Re: Welcome to the Machine

Post by GlennD »

Here is a Gamemonkey reference PDF i found online.
Hopefully helpful to others.
Happy new year
Glenn
Attachments

[The extension pdf has been deactivated and can no longer be displayed.]

User avatar
Mooselake
Old Timer
Posts: 522
Joined: Sun Dec 26, 2010 12:21 pm
Location: Mooselake Manor

Re: Welcome to the Machine

Post by Mooselake »

Thanks, Glenn!

Interestingly, there's no mention of switch in the language description, but it's used in an example.  Wonder what other goodies they aren't talking about?

Kirk
GlennD
Old Timer
Posts: 80
Joined: Tue Oct 18, 2011 4:19 pm

Re: Welcome to the Machine

Post by GlennD »


Kirk
Same thought here.
I am glad that Art started this thread, since I can write code and have done C but not very good at it.
Spend most of my time in VB.Net.
A lot of the finer points I don't really get with C\C++.
Thank goodness for Art, YNN, you and google.

I have about 5 more functions for the Tabbed box to convert then test and hopefully have a panel that I can share after that.
Started back to work so will go slower from here on out.

Glenn
Nate
Old Timer
Posts: 107
Joined: Fri May 08, 2015 6:11 am

Re: Welcome to the Machine

Post by Nate »

Based on the reference, MonkeyScript is more like Javascript than like C.  (Though that's probably a good thing.)
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4586
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Welcome to the Machine

Post by ArtF »

Hi:

I find monkey to be closer to raw C than anything else, but I haven't programmed much in Java. In 41 years of
programming Ive lost count of the number of languages Ive used, but Monkey is about as easy as it gets. Its autotyping
and ability to retype on the fly is powerful, though of course any language has its limits and Monkey definitely has limits,
the question is, what are they?

  I do not in any way pretend to be an expert on Monkey script or really any scripting in particular, but as Ive modified
Monkey to suit Auggie, and added rudimentary preemptive abilities to it, Ive come to understand a lot of its internals.
Ive bound numerous functions to it, and in the next release many changes have been made and parallel threading is now
possible as well. This means as a line of Gcode, a parallel thread ( or several) may be started to run while the gcode
completes. This allows the scripter the power to monitor any condition and change the way the GCode or the hardware
itself reacts to incoming conditions. 

          Most controllers either have a function, or they don't, or you try to talk the developer,
( me, once upon a time) into adding it. The main thrust behind Auggie is to invent a system where the users are free to
add pretty much any function they wish, from THC type of functions perhaps to ms by ms variation of output signals during
runtime. I have no idea if a "roll your own" controller is actually possible, but all my tests to date seem to indicate it is,
or may be, now that computers are as good as they are. (Master5 , Mach3's original title, was 16 years ago).
  So while I make myself a laser unit, Ill see just how versatile a program would have to be to allow a designer, perhaps with
assistance from this area, to make a machine to do "X", where "X" is something totally foreign to me. I will consider
this project a success when someone presents a user screen run machine that does something I totally did not anticipate.
Cake decorator perhaps.. oops, too late, I anticipate it..

  We'll talk about that more as I get more libraries out and begin to show how to use the system. I suspect its really for the
brave and the stupid at this point, but I said that many times over the years and always had many other nuts join
me for the exercise. I guess all I can say at this point, is Im having more fun with Auggie than Ive had in awhile,
its a very interesting way to design a machine, totally backwards to Mach3, hope it all works out :-)

  Thanks Glen for the docs, I will include them in future versions of the installer as well, their a great start to using the scripter,
if anyone has questions on whats there, drop them here and we'll attempt to answer them. Ill be doing a final overview video
next on how scripting works in the system , how its attached and what the flow of operations is really like internally. It
may help people understand how the scripting will control things. 

Art

Ken_Shea
Old Timer
Posts: 122
Joined: Sat Oct 09, 2010 2:19 pm

Re: Welcome to the Machine

Post by Ken_Shea »

This should be very helpful.
Where and how to just getting started is often the biggest hurdle.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests