How to change the behavior of accents from ´ symbol to ` symbol - autohotkey

I have the following script for typing Spanish accents:
AppsKey::var := "´"
#if (var = "´"), var := ""
a::Send, á
e::Send, é
i::Send, í
o::Send, ó
u::Send, ú
+a::Send, Á
+e::Send, É
+i::Send, Í
+o::Send, Ó
+u::Send, Ú
If I run this then I have to type the ´ symbol (Acute accent - spacing acute) for the vowels to have the accent.
This symbol is not "easy" to type on a US keyboard, so I want to change that for the following symbol: ` (Grave accent)
The issue is, when I change it on the script all the vowels have the accent always, not just when I press de grave accent symbol.
I don't know why this is and haven't been able to solve it. Does anybody know how?

It seems that what you need is to use hotstrings instead of hotkeys, but declare a different escape character, so something like this:
#EscapeChar /
:*C:`a::á
:*C:`e::é
:*C:`i::í
Etc…
The asterisk in the first set of colons indicates that the hotstring will not wait for an end key such as space or enter to be pressed for the hotstring to fire. The capital C indicates that hotstring is case sensitive. What new escape char you use is up to you.

The grave accent is used in AHK as the escape sequence character. "`" isn't read as the string containing a grave, it's an open string containing a single ". You should be able to fix this back escaping the grave itself by writing "``".

Related

Print non-printable character (VS Code)

I am writing a batch file in VS Code and I have a question. What are the ways to insert a non-printable character other than copying it from somewhere.
I have tried Alt+27, Alt+027, Alt+001b... but it doesn't work.
The question is not only in terms of echo, but in general about VSC. What are the possibilities to insert a non-printable character in VS Code? In the command line console, I can do this:
where ^[ is the non-printable Esc character typed in Alt+027. But how to do this in VSC when there is a need to insert a non-printable character? Alternatively, I can always write an extension for VSC that will open, copy and paste such characters, but it is useful when it is not possible to simply print them.
It's not a good idea to have non-printable characters in a text file.
You can use the escape sequence \e instead:
echo "\e[32m color green \e[0m"

How to search certain characters based on their unicode number?

In Emacs, I would like to search certain characters and replace them. They can be separated by their unicode number. For example, below 3 characters has different unicode number.
á(#xe1), ⓐ(#x24d0), 𝒶(#x1d4b6)
What if I want to search characters between the range #x1d000 to #x1dfff, and then I will use regxp replace to add a double quote("") for each of these characters?
First of all, you can enter Unicode characters by their hexadecimal codes using the key binding C-x 8 C-m (the command is called insert-char). So type C-x 8 C-m, enter 1d000, and then hit RET to insert the character with Unicode code point 1d000.
Then we can use this to search and replace.
Type C-M-% to run the command query-replace-regexp
For the search expression, enter [, then C-x 8 C-m 1d000 RET , then -, and then C-x 8 C-m 1dfff RET, and finally ]. That is, search for any character in the range between 1d000 and 1dfff. (This is similar to the "normal" regexp [a-z], which matches all characters between a and z, i.e. all lowercase characters.)
For the replace expression, enter "\&". \& is a special sequence for inserting the text matched by the search expression, so we're going to wrap every matching character in double quotes.
Then, hit y to replace matches one by one, or ! to replace all remaining matches.

How do I type an accented letter in VSCode?

I cannot find anything remotely resembling instructions for typing an accented character in VSCode.
On Windows, entering special characters (including letters with accents) can be done with ALT Codes. Pressing down the Alt key and then a specific series of numbers on the num pad will type the corresponding character.
e.g.
Alt+0233 = é
Alt+0225 = á
On OSX, the method is a bit simpler: https://support.apple.com/en-us/HT201586
Typing special characters on Linux is a bit hairy...
You can use the Insert Unicode plugin.
To type 'É'
(which is not easy to get, even on a French keyboard, unless you remember Alt+0201):
simply type E (shift+e)
then "Insert Unicode" (through the palette command), and select 0x301 COMBINNING ACUTE ACCENT
You can easily define keyboard shortcut to insert your favorite emoji
{
"key": "ctrl+e f",
"command": "insert-unicode.insertTextExact",
"args": "fire"
}
tape in command-line setxkbmap fr , and tape 2 for é , 0 for à and 7 for è

Microsoft word wildcard find and replace using ctrl h function

Hi I am a complete novice with Microsoft word wildcard function using ctrl h
I need some assistance with finding all capital letters in a word document and insert line break before each capital letter
Example
Perfect party wear Classic black jacket Open front Collarless
I need to change the above to:
Perfect party wear
Classic black jacket
Open front Collarless
I have tried using Find what:<[A-Z][a-z]{2,}> Replace with ^13 and it replaces the all the words that start with a capital letter with a line break instead of inserting a line break before the capital letter.
I would really appreciate some help please
Find what: <[A-Z][a-z]{2,}>
Replace with: ^p^&
Options: Use wildcards
^p is a paragraph mark (end of paragraph, same as typing <Enter>, not the caracter ¶). ^& means "the text what was found". Press the button Special with the cursor in the Find what or the Replace with fields to see (some of) the available specialties.

Scratch equals operator problems

I am using scratch.mit.edu version 2.0 on the internet and writing a program to evaluate a postfix expression. As I iterate through the input string such as: "23+" (postfix) letter by letter using the letter..of...block, it works fine.
I then add a letter.. of.. block to identify a spacebar character so the user can insert blanks in the expression eg "2 3 +"
However, there seems no way to recognize a blank character. I tried
1) Lookahead = ""
2) Lookahead =' '
3) Lookahead =''
None of which pick up that a space has been encountered.
Here is the project: https://scratch.mit.edu/projects/77653712/
In Scratch, the box is the string literal - no quotes, unless you're looking for literal quotes. Just put a space in the box.
Just set it to check <(Lookahead) = [ ]>: (brackets are the symbol for the box)
(That black line is me pressing ctrl+a to highlight and show that it exists.)
OK, I have found the solution. There is no character to represent a blank. You simply press space bar once!
You can see the letter nextChar of blanks is an empty space but, you must add space using the spacebar for it to work!!