Magic Lantern Forum

Developing Magic Lantern => Scripting Corner => Scripting Q&A => Topic started by: l_d_allan on March 28, 2018, 01:05:21 AM

Title: HowTo? Get "Hello, world!" to appear on LCD? Tutorial available?
Post by: l_d_allan on March 28, 2018, 01:05:21 AM
Sorry if this has already by asked & answered ....

Is there a tutorial available with step-by-step instructions on getting "Hello, world!" to appear on the LCD of my Canon DLSR's (6d, 5dm2, 600d)?
Title: Re: HowTo? Get "Hello, world!" to appear on LCD? Tutorial available?
Post by: dfort on March 28, 2018, 03:38:00 AM
Since this is posted in the Scripting Corner I suppose you wan to run the LUA, "Hello, world!"


(https://farm1.staticflickr.com/895/39252965080_e732aa4054.jpg) (https://flic.kr/p/22NDGY1)

Nothing special required to edit the script, just a text editor. It lives on your card under ML/scripts/hello.lua

-- Hello, World!
-- Prints 'Hello World' on the console

menu.close()
console.show()
print "Hello, World!"
print "Press SET to exit."
key.wait(KEY.SET)
console.hide()


That's the beauty of LUA scripts, no special development environment required.
Title: Re: HowTo? Get "Hello, world!" to appear on LCD? Tutorial available?
Post by: l_d_allan on March 28, 2018, 05:35:31 AM
Quote from: dfort on March 28, 2018, 03:38:00 AM
Since this is posted in the Scripting Corner I suppose you wan to run the LUA, "Hello, world!"
... snip ...
That's the beauty of LUA scripts, no special development environment required.

Thanks for the reply. As you mention, it isn't all that difficult once you start grappling with it and get it wrestled to the ground.

I did manage to modify "hello.lua" to "hi_lda.lua", upload to ML/scripts on the SD card and ... magical drum roll ... it worked.

Big Fun!

Now for a script to "Drain Battery to 95 Percent"