Trying do do a simple
StringReplace, clipboard, clipboard, \, /, All
That code works w/ other characters, but gives an error with '\' and/or '/' also tried ASCII codes but those do not work either since % is a variable in AHK.
How to StringReplace a '\' with AutoHotkey?
I get no error using that line. I used the following snippet to test:
CapsLock & p::
clipboard = are\there\backslashes?
MsgBox, %clipboard%
StringReplace, clipboard, clipboard, \, /, All
MsgBox, %clipboard%
return
I'm using AutoHotKey 1.0.46.1 (which is probably old by now...) on a Windows XP laptop.
What version are you using?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With