Page 2 of 2
Re: AutoHotKey Script
Posted: 09 Mar 2021 16:38
by tatewise
Yes, I'm aware that AHK scripts can be compiled but for the purposes of FH users have kept it basic as an introduction.
Users who want to get into AutoHotkey can develop their own scripts and do whatever they like.
I am thinking of using Win + Escape to transpose the case of highlighted text. Is that OK?
Re: AutoHotKey Script
Posted: 10 Mar 2021 12:16
by ColinMc
Seems fine. Thanks for this.
Re: AutoHotKey Script
Posted: 11 Mar 2021 17:01
by tatewise
The script has been published today. See FHUG KB
AutoHotkey and
AutoHotKey Scripts.
Re: AutoHotKey Script
Posted: 11 Mar 2021 19:03
by Gowermick
Miketate,
My previous post re compiling the ahk file is wrong! Amending the original ahk file, does NOT automatically update the exe file created from it. After amending the ahk, it needs re-compiling to create a new exe file, to have effect. My mistake

Re: AutoHotKey Script
Posted: 23 Apr 2021 17:00
by HeatherW
For me, Mike Tate's very useful FH AutoHotkey.ahk is now being overridden by the conflicting Windows shortcut keys while the FH program is active, e.g., Win+D goes to desktop; Win+W brings up Whiteboard (which I don't even have enabled). Does the AutoHotkey.ahk file need to be located in a specific folder to avoid possible interference by a Windows 10 update, or some other special step taken to prevent the override?
Thanks in advance.
Re: AutoHotKey Script
Posted: 23 Apr 2021 17:15
by tatewise
The AutoHotkey script works fine for me, but the FH main window must be the active window in focus.
If focus is switched to one of the FH popup windows such as the Fact Witness or Citation Window then the Windows shortcuts take precedence. Unfortunately, Windows has employed so many of the popular shortcut prefix keys such as Ctrl, Alt, Win key that to make the FH shortcuts unique would probably need two keys and that makes them more awkward to use.
Re: AutoHotKey Script
Posted: 23 Apr 2021 17:36
by Gowermick
The problem seems to be that Mike is trying to make the shortcuts easy to remember for users, hence his use of the Win key.
I wasn’t so concerned about this, so simply used Ctl + number key combinations. Fortunately Autohotkey distinguishes between numbers at top of keyboard, and numbers on the keypad, enabling one to have 20+ key combinations employed ( i.e. numbers + “=“)
and since they load at windows startup, I haven’t had a problem, and they are active in all my programmes and all FH windows.
Re: AutoHotKey Script
Posted: 23 Apr 2021 17:56
by tatewise
Mike, what functions do those Ctrl + number shortcuts perform?
I don't think they can be FH functions because the Win + shortcuts only work when the main FH menubar is active.
e.g. They perform such as the Alt + V + O + etc keyboard sequences that are meaningless in any other window.
It is easy to edit my script so the Win + shortcuts are active everywhere but they still don't do anything useful unless the FH main window is in focus.
Are you saying your shortcuts activate the FH main window before applying the Alt + V + key sequences?
Re: AutoHotKey Script
Posted: 23 Apr 2021 18:14
by Gowermick
No Mike, my shortcuts are simply to insert specific text. Like inserting full date for 1841 census by using Ctl +4. Nothing too complicated, but they could easily actuate Alt-V-O if that is what was required. I just don’t rely on the Win key.
Re: AutoHotKey Script
Posted: 23 Apr 2021 18:27
by tatewise
So as I thought, they are not FH specific functions, but generic functions that might be useful anywhere.
If you tried to make those Ctrl + number shortcuts perform FH specific functions they would only work when the FH main window was active, exactly the same as my Win + shortcuts.
Re: AutoHotKey Script
Posted: 23 Apr 2021 21:58
by Gowermick
Mike, my script might be simple, but it’s actions aren’t compromised by windows, which was what Heather was initially complaining about.
I’m sure your script would be just as useful without using the Win key. To be honest, is it really worth saving users a key stroke by creating a shortcur for Alt-V-O?
One of the things my simple script does, is it saves people from having to remember and enter the full dates of each census. i.e Ctl+4 enters the full date of 1841 census, Ctl+5 the date of the 1851 census etc, ( especially useful as one memory fades with age

)
Re: AutoHotKey Script
Posted: 24 Apr 2021 09:26
by tatewise
Mike, I think you have misunderstood a number of things.
Heather was complaining specifically about my shortcuts that only work when the FH Main window is active.
In any other situation, the Windows shortcuts apply, which is sensible because the FH Alt + V + O + sequences are ineffective unless the FH Main window is active. I suspect Heather did not have the FH Main window active even though FH was running, but may have had some other FH window active, which also ignore the FH Alt + V + O + sequences.
Your shortcuts are different because they are effective in many different active windows and therefore need to avoid the Win key if you want to retain those Windows shortcuts. They are useful shortcuts that could be added to the standard set but have a different scope.
My FH shortcuts are definitely worthwhile and save many keystrokes (you obviously have not looked at them closely).
Most of them have 6 keystrokes such as Alt + V + O + F + Ctrl + D and those that have fewer were requested by others.
Re: AutoHotKey Script
Posted: 24 Apr 2021 09:29
by ColeValleyGirl
Both sets of shortcuts are available at
AutoHotKey Scripts for anyone who wants to judge their competing merits.
Re: AutoHotKey Script
Posted: 24 Apr 2021 09:41
by Gowermick
HeatherW wrote: ↑23 Apr 2021 17:00
For me, Mike Tate's very useful FH AutoHotkey.ahk is now being overridden by the conflicting Windows shortcut keys while the FH program is active, e.g., Win+D goes to desktop; Win+W brings up Whiteboard (which I don't even have enabled). Does the AutoHotkey.ahk file need to be located in a specific folder to avoid possible interference by a Windows 10 update, or some other special step taken to prevent the override?
Thanks in advance.
Mike, sorry you are incorrect, Heather WAS complaing about the Win key being overwritten by a windows conflict, even though FH7 was active, which is what I said! Nuf said

Re: AutoHotKey Script
Posted: 24 Apr 2021 09:57
by tatewise
I know what she said, but I suspect she is mistaken. I know she said the FH program was active, but I suspect the main FH window was NOT in focus, and by active I suspect she just meant running which is not the same thing.
Re: AutoHotKey Script
Posted: 24 Apr 2021 19:37
by HeatherW
Hi,
To clarify, by "active" I was referring to having only the Records Window open, with one record selected for AHK operation (as it is my understanding that the Records Window is the only workspace where AHK functions). The FH AHK worked fine until recently. I have tried re-booting, etc. In case it's relevant, I have Windows 10 Pro, which I keep undated. As it appears that most others are not experiencing this issue, I guess I'll just change the key combinations.
On a more positive note, I've been using FH for a few months, and I really appreciate its speed and deep capabilities - it's a terriffic program! And I also greatly appreciate the impressive expertise of FHUG members!
Heather
Re: AutoHotKey Script
Posted: 24 Apr 2021 20:00
by tatewise
It does not matter which FH sub-window is open as long as the main FH window is actively in focus.
You can tell if that FH window is active by clicking the Alt key on your keyboard.
The menu bar across the top of the FH window will get each command initial letter underlined, e.g.
File Edit View Add Tools Intenet Window Help
It does not matter which version of Windows is being used.
AutoHotkey must be running, i.e. Its green square with white H icon is in the Windows Notification bar bottom right.
If you right-click that icon it will offer Reload This Script and Edit This Script, etc.
Re: AutoHotKey Script
Posted: 24 Apr 2021 21:08
by HeatherW
Mike T,
My FH window was definitely active; however, reloading the script turned out to be the simple solution - thank you!
To others who may have this issue, if the Hotkey icon (green square with white H) is not in the Windows taskbar at the lower right (whether visible or hidden), just click the Windows start key to view the list of apps, and the AutoHotkey program should be in the list, and you can get at the options from there.
Heather