I'm VERY new to AHK. I've written some 5 or 6 scripts in my first 4 days and I'm loving it.
I must say I found this pretty interesting: https://www.autohotkey.com/board/topic/44574-intelligent-auto-close-bracketbraceparen/
However, I cannot get it to work. Here is the error message:
Code: Select all
---------------------------
close_brackets.ahk
---------------------------
Error: "~ " is not a valid key name.
Line#
029: GroupAdd,TextEditors,ahk_class XLMAIN
030: GroupAdd,TextEditors,ahk_class OpusApp
033: altkeys = AppsKey : LWin : RWin : LControl : LShift : RShift : LAlt : RAlt:PrintScreen : CtrlBreak : Pause : Break:Space : Tab : Enter : Escape : Delete : Insert : Home : End : PgUp : PgDn : Up : Down : Left : Right:ScrollLock : CapsLock : NumLock:Numpad0 : Numpad1 : Numpad2 : Numpad3 : Numpad4 : Numpad5 : Numpad6 : Numpad7 : Numpad8 : Numpad9:NumpadDown : NumpadLeft : NumpadRight : NumpadUp:NumpadIns : NumpadEnd : NumpadPgDn : NumpadClear : NumpadHome : NumpadPgUp:NumpadDot : NumpadDel :
051: Loop,Parse,altkeys,:,%A_Space%
052: Hotkey,"~" A_LoopField,EndcharIsTyped,ON
055: Chars = -'@#$^&*_{+}:;"|/\,.?! `% 1234567890-=qwertyuiop\asdfghjkl;'zxcvbnm,./''
056: Loop,Parse,Chars
---> 057: Hotkey,"~" A_LoopField,EndcharIsTyped,ON
061: Return
068: if (A_HotString = "(" )
069: Send,{del}
070: if (A_HotString = "{" )
071: Send,{del}
072: if (A_HotString = "[" )
073: Send,{del}
The current thread will exit.
---------------------------
OK
---------------------------