• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

Recent content by shelvacu

  1. shelvacu

    LUA Script To Detect Colors On Screen

    You'd need a library to interface with the OS to grab (effectively) a screenshot, and to send a click event or whatever you're hoping to trigger. You might be able to hack something together with a screenshot binary that spits out a file that you parse... but I'd recommend just learning...
  2. shelvacu

    Which mqtt_lua fork to use?

    I find the "networks" page to be useful when trying to find a fork: https://github.com/geekscape/mqtt_lua/network From that, it seems like thunderace/mqtt_lua is the fork with the most changes. All the others look like just single-change forks
  3. shelvacu

    Common pitfalls to avoid in Lua

    Yes, I glossed over that for dramatic effect. It depends on which version of Lua is in use; Lua 5.2 says: Thus, if a __len metamethod is not defined and the table is not a "sequence", then technically it's undefined behaviour. However I suspect that in the standard implementation of Lua it's...
  4. shelvacu

    Common pitfalls to avoid in Lua

    This guide assumes you are already familiar with the basics of Lua, including tables, strings, the number type, and functions. Here are a few things you can do to avoid common and/or hard-to-debug mistakes in Lua. Do not compare tables with ==. Ex: --Do not do this! {a = 5} == {a = 5} --=>...