As a bit of a side note, I am really appreciating your choice of Lua. I'd run into it a couple years ago in SciTE, my text editor of choice for AutoHotkey but I didn't do much with it. It definitely seems to be on the rise.
Phew, so thank you so much! I've got some bills coming up but after that, I owe you a donation
Lastly a question and a bug. I'm not sure how error handling is supposed to work in Lua but it seems like errors are being caught and suppressed inside the function passed into lmc_set_handler. This is a simple example. If I put an improperly escaped pattern string like this at the top of my script (should be "%%(" at the end), it hits the line, prints an error, and stops. Like you'd expect:
Once it's in the anonymous function though, it'll stop executing there, but the error message doesn't print out in the display.
Code: Select all
From the bit I've read about Lua, I think that might be by design. Or maybe you are trapping the errors and not printing them out. I don't know. Anyone have any suggestions.
Code: Select all
lmc_set_handler("Razer",function(button, direction) cleanThisKey=cleanThisKey:gsub("%(","%(") end)
Lastly, what I am pretty sure is a bug. If I close out AutoHotkey (to simplify) and open LuaMacros, without loading a script or anything, something goofy happens to my alt key. At the minimum, when I press alt and an arrow key for navigation in Firefox or Visual Studio, when I release alt it types these characters: ♦♠◘☻. A diamond, spade, box, and face. Again, there is no Lua script loaded. This is happening on my "plain" keyboard so even if a script were running, it wouldn't be binding to that keyboard. The behavior also stops as soon as I close LuaMacros. I use those shortcuts in visual studio a lot so hopefully you can get it sorted out. I just checked, it does the exact same thing in Notepad too which normally doesn't do anything with those shortcuts.
So, thanks again. The work you've done has changed my life. It's brought me much joy.