LuaMacros bug and initial feedback
Posted: 15 May 2015, 21:26
Greetings Petr. I understand your desire to move on to LuaMacros. It looks like a very exciting project. I hate working on GUIs too! I don't know if you're familiar with the phrase but when I read your announcement I thought "follow your bliss." HidMacros has helped me achieve a dream that I had for years but couldn't execute. I use AutoHotkey like a madman and one keyboard was getting pretty cramped. I now how 3 full keyboards and two gamepads at work. I have shortcuts mapped all over the place. Without HidMacros, this was impossible. I'm delighted to find that LuaMacros, with just a little (fun) work, is already doing more than HidMacros. The big thing that I've worked out is how to use any key as a modifier for any other key. I also have multi key combos recognized. It's all slipped very well into the spot HidMacros lived in my solution.
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.
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.
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.
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:
Code: Select all
cleanThisKey=cleanThisKey:gsub("%(","%(")
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.