I am trying to write a script that will only work in Notepad. What I want to achieve is a keystroke combination that will take me to the top of my file each time I launch a search. The rationale is that Notepad only searches from cursor position, so if I forget to go back to the top of the document, my search will only operate from that point on.
To get to the top of my document, I need to press Ctrl+Fn+Home.
So far I have tried:
Code: Select all
#IfWinActive ahk_class Notepad
^+f::
Send, ^{Fn}{Home}
Sleep, 2000
Send, ^f
return
It is not working, and I am pretty sure it is because of the {Fn} part, but this is my best guess of how to send the Fn key.
Also, ideally I would use the regular Ctrl+F to trigger the search, instead of the modified Ctrl+Shift+F, but I don't know how to reassign the key if it is part of the sequence, so if this is possible I would be grateful for any help.
Iza