Search found 9 matches
- 13 Mar 2019, 10:31
- Forum: General
- Topic: Unicode support?
- Replies: 10
- Views: 6963
Re: Unicode support?
In ohter words: lmc_send_input() send/write a UTF-16 "character"... God damit, it's going to be long and complicated before we get to a function write_text() full Unicode compatible. But I am beginning to see the end of it and it clearly doesn't seem impossible. Thank you for your answers :D EDIT: U...
- 12 Mar 2019, 11:46
- Forum: General
- Topic: Unicode support?
- Replies: 10
- Views: 6963
Re: Unicode support?
I found/do better than with the Alt Code ! function write_text(text) if (text == nil) then text = "" end; local tbl = utf8_explode(tostring(text)); if (tbl.len > 0) then for i, c in pairs(tbl.codepoints) do lmc_send_input(0, c, 4) -- press lmc_send_input(0, c, 6) -- release end; end; end; --[[ utf8_...
- 06 Mar 2019, 15:27
- Forum: General
- Topic: 2 keyboards in different languages
- Replies: 3
- Views: 3044
Re: 2 keyboards in different languages
So, if I understand correctly: The second argument uses the Unicode decimal value of the character?! It's excelent! To answer you, No, all are not them described in Simulate keyboard input . Ex: I thinking the second argument was a "Delay send input". Another thing: Why are the flags different in "U...
- 11 Feb 2019, 16:39
- Forum: General
- Topic: Unicode support?
- Replies: 10
- Views: 6963
Re: Unicode support?
Okay, I found a parade. A large amount of character can be written using the "Alt Code". Not all Unicode, but enough to stop being a big problem. function write_altcode(altcode) lmc_send_input(18, 0, 0); -- press ALT lmc_send_keys(altcode, 10); -- typing AltCode lmc_sleep(string.len(altcode) * 10); ...
- 06 Feb 2019, 10:38
- Forum: General
- Topic: Unicode support?
- Replies: 10
- Views: 6963
Re: Unicode support?
Unfortunately, this does not work. The problem is that you want to simulate keyboard writing, and I think that's not the right solution. What happens if we remapped our keyboard (not the default mapping)? or if we want to write characters that are not present on the keyboard? Many variables and unkn...
- 06 Feb 2019, 10:09
- Forum: General
- Topic: Assign a keyboard in the start of the script
- Replies: 3
- Views: 3837
Re: Assign a keyboard in the start of the script
Ok thank. However, I notice that the ID is lost in the middle of a large alphanumeric mush, it would be convenient to extract it and display it separately (ID: <ID>) Another good thing would be a function that lists the devices in a table. Feature request : lmc_get_devices() would give a table in th...
- 05 Feb 2019, 12:31
- Forum: Bug reports
- Topic: Asynchron execution
- Replies: 1
- Views: 2714
Asynchron execution
I start with LuaMacro and I tested this piece of code: elseif (button == 72) then lmc_send_keys('Hello'); lmc_send_keys(' '); lmc_send_keys('world'); elseif ... The expected result should be "Hello world", but LuaMacro produces a this "H Weolrllod". It would be more logical for the "lmc_send_keys()"...
- 05 Feb 2019, 11:06
- Forum: General
- Topic: Unicode support?
- Replies: 10
- Views: 6963
Unicode support?
LuaMacro is powerful, and I'm sure I could do a lot with it, but I have to give him one big blame: It does not support Unicode. Unicode and especially UTF-8 are now so common that there is no excuse for not supporting it ( see this article from 2003 , the idea and the problem can be applied everywhe...
- 05 Feb 2019, 10:31
- Forum: General
- Topic: Assign a keyboard in the start of the script
- Replies: 3
- Views: 3837
Assign a keyboard in the start of the script
The problem is simple: When I run my script, I know exactly which keyboard I will use for my Macro. But it is impossible to find out how to automatically assign it to the "handler" . The objective of this script is to be launched at the same time as Windows (registre key, command line "LuaMacros -r ...