Script Sanity Check

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
asheroto
Posts: 7
Joined: 25 Apr 2019, 16:12
Contact:

Script Sanity Check

Post by asheroto » 25 Apr 2019, 16:24

Hey all,

I've been using AHK for so long, I believe since its inception... 2012-2013 era???

Anyway, I have had the same script for years... doing some digital spring cleaning and I noticed I had this at the top of my script:

Code: Select all

#InstallKeybdHook
#Hotstring EndChars `t
#Hotstring O SI
Line 1:
Now, I think I have the keyboard hook in there because at one time it allowed AHK to work with Chrome, but it doesn't (by the way is there a workaround yet?), is there any other reason I should have it?

Line 2:
Doesn't AHK default to this? So unnecessary?

Line 3:
I do want to omit the ending character (O), but is SendInput on by defaut (SI) now? Since I've been using it so long it may not be required?

---

Thank you!

gregster
Posts: 9095
Joined: 30 Sep 2013, 06:48

Re: Script Sanity Check

Post by gregster » 25 Apr 2019, 23:07

asheroto wrote:
25 Apr 2019, 16:24
I've been using AHK for so long, I believe since its inception... 2012-2013 era???
That would be more like 2003... ;) only this forum incarnation is from 2013. You can also look at the archived forum (it was still used for some time in parallel): https://autohotkey.com/board/
asheroto wrote:
25 Apr 2019, 16:24

Code: Select all

#InstallKeybdHook
#Hotstring EndChars `t
#Hotstring O SI
Line 1:
Now, I think I have the keyboard hook in there because at one time it allowed AHK to work with Chrome, but it doesn't (by the way is there a workaround yet?), is there any other reason I should have it?

Line 2:
Doesn't AHK default to this? So unnecessary?

Line 3:
I do want to omit the ending character (O), but is SendInput on by defaut (SI) now? Since I've been using it so long it may not be required?
ad 1: How do you mean? What is the problem with Chrome? I don't see how this directive would affect it... perhaps someone else has an idea.

ad 2: By default, there are a lot more Hotstring ending characters than just `t:
https://www.autohotkey.com/docs/Hotstrings.htm#EndChars wrote:Ending characters initially consist of the following: -()[]{}':;"/\,.?!`n `t (note that `n is Enter, `t is Tab, and there is a plain space between `n and `t).

ad 3: SendInput is "the default mode in [v1.0.43] and later" for Hotstrings (which would mean since March 25, 2006, it seems): see https://www.autohotkey.com/docs/Hotstrings.htm#Options

Post Reply

Return to “Ask for Help (v1)”