Closed Avastgard closed 1 year ago
Does the code work or no? I think this depends on the type of encoding you view your code in.
I tried: Which generates the following when viewed on notepad++ with ANSI encoding: But switching to UTF-8:
Maybe something like this will help: https://www.mrexcel.com/board/threads/vba-create-text-file-in-utf-8-rather-then-ansi.1204545/
Does the code work or no?
It doesn't. Sometimes it throws me an error message and prevents me from reloading the script. Other times, the script reloads, but the command fails every time. These behavior seem to be related to the kind of special character I use.
I think this depends on the type of encoding you view your code in.
I tried: Which generates the following when viewed on notepad++ with ANSI encoding: But switching to UTF-8:
Yes, opening the code with notepad shows me the correct characters, but on Scite4AutoHotkey, it shows the weird character I posted in the OP.
How should I approach this? I'm thinking that since the macro recreates the script everytime it runs, then the issue should be in the way the macro always creates the file with ANSI encoding, no? I tried changing the encoding of LNCHR-Main.ahk to UTF-8 and UTF-8 without BOM, but everytime I ran the macro, the encoding defaulted back to ANSI.
Your suggestion from your second post might help, but it's a little too advanced for me. Might give it a shot some time in the future, though.
Try changing the Flase to True in the VBA file as shown below, it seems to work for me:
Sweet, it worked and was far easier than I thought!
Sorry for opening so many issues, but I'm in the process of adopting your code as my daily driver and so many questions have been appearing so far. Thanks for your support!
If I have a command with a special character in the spreadsheet, pressing Ctrl + L will generate a script with incorrect character.
For example, the command
revisão
will produce this line of code: