Author Topic: Getting info from the local calc with Lua  (Read 3379 times)

0 Members and 1 Guest are viewing this topic.

Offline pianoman

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 426
  • Rating: +24/-0
  • ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
    • View Profile
Getting info from the local calc with Lua
« on: August 17, 2011, 11:24:28 pm »
Is there a way to get data such as the battey status, language, serial number, etc from the local calculator using Lua?
Its not for a particular game or program, I'm just curious.
Thank you very much!

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Getting info from the local calc with Lua
« Reply #1 on: August 18, 2011, 05:31:36 am »
You can get the current locale using [lua]locale.name[/lua]. It will return the locale in a two letter language code :)

As for the battery info and the serial number, I don't think you can.

Offline pianoman

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 426
  • Rating: +24/-0
  • ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫ ♪♫
    • View Profile
Re: Getting info from the local calc with Lua
« Reply #2 on: August 18, 2011, 12:35:22 pm »
You can get the current locale using [lua]locale.name[/lua]. It will return the locale in a two letter language code :)

As for the battery info and the serial number, I don't think you can.
Ok, thanks :)

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Getting info from the local calc with Lua
« Reply #3 on: August 18, 2011, 02:32:25 pm »
Critor made a "language-aware library" in his DiagrammeNZ program in order to switch the whole program's language when the user changes it, or just simply have the program in the user's language instead of the default french one.
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation