Omnimaga

Calculator Community => TI Calculators => Lua => Topic started by: CookieCutter1993 on August 31, 2013, 12:27:46 pm

Title: How to distinguish TI Nspires?
Post by: CookieCutter1993 on August 31, 2013, 12:27:46 pm
How can you distinguish ANY TI Nspire from another? I dont mean to distinguish CAS vs non CAS or handheld vs non-handheld, etc
Do any unique Nspire features exist that LUA can access or that can be generated?   
Title: Re: How to distinguish TI Nspires?
Post by: ElementCoder on August 31, 2013, 02:00:17 pm
If I followed the recent news you can distinguish an ndless capable one from a not ndless capable one by checking it's date stamp, if it says J in it you can't have ndless for now. Other than that there's no difference between nspires afaik. If you're looking for ways to make it obvious it's yours, take a look at some tools for ndless that enable you to use passwords or change the color scheme.
Title: Re: How to distinguish TI Nspires?
Post by: Adriweb on August 31, 2013, 02:14:45 pm
ElementCoder : I believe he meant programmatically, from a Lua script ;)

So, yes (but not exactly what you would like, after re-reading your question), especially if the script is going to run on OS 3.2 or later :
See here : http://wiki.inspired-lua.org/platform

Quickly :
[lua]platform.isColorDisplay[/lua]() : Returns true if the display of the host platform is color-capable (Nspire CX and emulator). Returns false if the display is grayscale (Nspire non-CX).
[lua]platform.isDeviceModeRendering[/lua]() : Returns true if the script is running on the hand-held device or in the emulator (with the calculator view), and false if the script is running in the normal view of the emulator.
[lua]platform.isTabletModeRendering[/lua]() : Returns true if the script is running on a tablet device (iPad app) and false otherwise.
[lua]platform.hw[/lua]() : returns a number corresponding to the type of device the script is running on.


No further ways to identify a specific device, though.
Title: Re: How to distinguish TI Nspires?
Post by: Legimet on August 31, 2013, 02:21:59 pm
But it seems like the OP wants to know how to distinguish any 2 TI-Nspires, regardless of whether the hardware is same.
Title: Re: How to distinguish TI Nspires?
Post by: ElementCoder on August 31, 2013, 02:26:08 pm
Oh I'm terribly sorry I didn't notice it was in the Lua section >< just ignore my comment on this then...
If the hardware is the same then isn't it pretty much impossible?
Title: Re: How to distinguish TI Nspires?
Post by: lkj on August 31, 2013, 02:45:37 pm
No, the serial number isn't the same and it's somewhere in memory. I don't think you can access it in Lua though...
Title: Re: How to distinguish TI Nspires?
Post by: Legimet on August 31, 2013, 02:47:14 pm
You could use Ndless lua extensions though :P
Title: Re: How to distinguish TI Nspires?
Post by: Adriweb on August 31, 2013, 04:17:39 pm
Ok, when re-reading it seems my reply isn't totally what he wants neither :P

And well, nope in Lua (let alone Basic), you can't, sorry.

Using ndless (or well, in Lua with native extensions), you probably can.