I copy a certain DOS/PowerShell/etc. command string from a Word document and I send it a console using AHK. Since the command was placed in a Word document, there is at least 4 types of special characters which suffer modification when they are thrown in Microsoft Word:
For example, this is what some PowerShell command looks like (pay no attention to the command itself, it's fictitious for the purpose of illustration):
Code: Select all
Install-Feature -DBPath "C:\Windows\Logs"
This is my code so far, but for some reason the conversion is not taking place
Code: Select all
:*:hello::
StringReplace, clipboard, clipboard, “ , " , All ; Reference: chr(147) Left double quotation mark
StringReplace, clipboard, clipboard, ” , " , All ; Reference: chr(148) Right double quotation mark
StringReplace, clipboard, clipboard, – , - , All ; Reference: chr(150) En Dash
StringReplace, clipboard, clipboard, — , - , All ; Reference: chr(151) Em Dash
clipboard = %clipboard%
SendRaw, %clipboard%
return
Any help will be much appreciated it.
Ruy