Here the script or at last part just to test
Code: Select all
#Persistent
#NoEnv
F4:: ; F4 Hotkey
If WinActive("ahk_class CabinetWClass")
{
; Active window is Windows Explorer
Send, ^f ; Send Ctrl+F to focus on the search bar
Sleep, 500 ; Wait for search bar to focus
Send, .fbx{Enter} ; Search for .fbx files
Sleep, 2000 ; Wait for search results
}
Else
{
; Active window is not Windows Explorer
Send, {Blind}{F4} ; Pass through the F4 key press as normal
}
return
[Mod edit: Fixed misplaced bracket character in code tags. Code goes between the two tags, not inside the second tag.]
[Mod action: Topic moved from "Ask for Help (v2)" since this is v1 code.]