I'm new to AHK scripts and I would like to be able to press #n (windows key + n) and trigger a series of keyboard combinations (shift + end, alt + tab, ^T, ^V, enter, tab, enter) each time I press that.
This is as far as I've gotten but no matter how much I read online about it, I feel i need some extra help (samples out there are usually super complex).
(Edited final code that worked for me thanks to Robert Ilbrink, a slight modification of his proposal)
#SingleInstance Force
#installKeybdHook
#Persistent
SetTitleMatchMode, 2
#IfWinActive, Word ; #n will only trigger when working inside Word.
#n:: ; [Win]+n trigger key
ClipBoard = ; Clear ClipBoard
Send, +{End} ; [Shift]+[End]
Send, ^c ; Store selected text in ClipBoard
Sleep, 100 ; ClipWait seems unreliable
WinActivate, ahk_class Chrome_WidgetWin_1
Send, ^t ; In my Chrome setup I immediately get a Google search page.
Send, ^v;
Send, {Enter};
Sleep, 1000 ;
Send, {Tab}{Enter};
;SoundBeep, 500, 500
Return
#IfWinActive