AutoHotkey for Toggling Comments in Command Editor

I've gotten used to have a hotkey to Toggling Comments in NP++ while playing in auto, kept going to that shortcut in dopus to no avail! So I wrote it into my AutoHotKey.

NOTE!! It only works the "Command Editor - Directory Opus" window for Standard Function (Opus or external) commands. It only affect the single active line. It is not for block quoting.

It could work on the others, thou I dont know if they use the same comment symbol?? (I know js is different, and alas dont really understand js, yet.)

If anyone is keen for it put this in your AutoHotkey Script...

#IfWinActive Command Editor - Directory Opus ; ahk_exe dopus.exe
^/:: ;dopus command editor, comment line
send, {home}
sleep 50
send, //{space}
sleep 50
send, {end}
return
^+?:: ;dopus command editor, un-comment line
send, {home}
sleep 50
send, {del 3}
sleep 50
send {end}
return
#IfWinActive 

Also NOTE! I prefer a // {space} following a comment, if you don't use a Space change the {del 3} to {del 2}

Cheers
X