escaping special character ::///::<!--

Get help with using AutoHotkey and its commands and hotkeys
partof
Posts: 95
Joined: 16 Jan 2016, 08:38

escaping special character ::///::<!--

11 Mar 2018, 17:18

Hi, sorry for the dumb question but I can't find an answer:

I want to ahk to automatically change /// into <!--

I tried

Code: Select all

::`/`/`/::`<!--
Any idea ?
BoBo
Posts: 2519
Joined: 13 May 2014, 17:15

Re: escaping special character ::///::<!--

11 Mar 2018, 17:23

Code: Select all

::///::
   SendRaw, <!--
   Return
Not tested.
User avatar
jeeswg
Posts: 6541
Joined: 19 Dec 2016, 01:58
Location: UK

Re: escaping special character ::///::<!--

11 Mar 2018, 18:02

Perhaps this:

Code: Select all

:*?:///::{Raw}<!--
You may like to look at the hotstring options, sometimes * and ? are/aren't desirable.
Hotstrings and Auto-replace (similar to AutoText and AutoCorrect)
https://autohotkey.com/docs/Hotstrings.htm
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
gregster
Posts: 2659
Joined: 30 Sep 2013, 06:48

Re: escaping special character ::///::<!--

11 Mar 2018, 18:03

It doesn't work in which context? It seems to work for me.
You can use

Code: Select all

:T:///::<!--
in AHK 1.1.27+
gregster
Posts: 2659
Joined: 30 Sep 2013, 06:48

Re: escaping special character ::///::<!--

12 Mar 2018, 03:40

gregster wrote:It doesn't work in which context?
In which programs? Not even notepad? And if you run the script as admin?
Which AHK version do you use? Which windows version?
partof
Posts: 95
Joined: 16 Jan 2016, 08:38

Re: escaping special character ::///::<!--

12 Mar 2018, 08:52

sorry for the delay: I'm running the last version of ahk. No it doesn't work on notepad. I believe it's a forbidden characters '/' issue
gregster
Posts: 2659
Joined: 30 Sep 2013, 06:48

Re: escaping special character ::///::<!--

12 Mar 2018, 09:03

Yes, sure, I tried them all. Bobo's, jeeswg's and my version all work (a bit differently, but still). So it cannot be a "forbidden character" thing. But even this works for me on AHK 1.1.27+:

Code: Select all

::`/`/`/::{text}<!--

if you insist on escaping /... do other hostrings work for you? What about running as admin?
partof
Posts: 95
Joined: 16 Jan 2016, 08:38

Re: escaping special character ::///::<!--

12 Mar 2018, 16:10

thanks for your help, I'm on the version 1.1.28.00, I tried to run the script by admin.

It doesn't work* (actually it's even weirder, :T:///::<!-- worked, but only once).

But I gave up, I found another solution.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], JavierBO, julesverne and 73 guests