#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. Gui, Add, Text,, Pick a file to launch from the list below.`nTo cancel, press ESCAPE or close this window. Gui, Add, ListBox, vMyListBox gMyListBox w640 r15 Gui, Add, Button, Default, OK Loop, E:\!Dropbox\My Dropbox\My EverNote Files\DataBases\*.enb ; Change this folder and wildcard pattern to suit your preferences. { GuiControl,, MyListBox, %A_LoopFileFullPath% } Gui, Show return MyListBox: if A_GuiEvent <> DoubleClick return ; Otherwise, the user double-clicked a list item, so treat that the same as pressing OK. ; So fall through to the next label. ButtonOK: MyListBox := "" GuiControlGet, MyListBox ; Retrieve the ListBox's current selection. Run, %MyListBox%,, UseErrorLevel if ErrorLevel = ERROR { MsgBox Could not launch the specified file. Perhaps it is not associated with anything. return } SetTitleMatchMode 2 WinWait EverNote WinActivate Send ^!v GuiClose: GuiEscape: Gui, Destroy ;WinClose ExitApp