#SingleInstance force ; ; AutoHotkey Version: 1.x ; Language: English ; Platform: Win9x/NT ; Author: A.N.Other ; ; Script Function: ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder) ; #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. ;right mouse double click---------autohotkey to launch simple filename (cursor should be on line ) ~RButton:: If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500) { ;msgbox double right clicked winactivate Sleep 100 ; wait for right-click menu, fine tune for your PC send !{Home}{Home}+{End} sleep 100 send ^c ;selects the entire line and copies it sleep 100 ;msgbox %clipboard% winactivate sleep 100 send {home} linestring = %clipboard% sleep 500 ;msgbox linestring is %linestring% ;find the position of the character "[", call it leftmark bit1 = [ StringGetPos, leftmark, linestring, %bit1% leftmark := leftmark + 2 ;msgbox leftmark is %leftmark% ;find the position of the character "]", call it rightmark bit2 = ] StringGetPos, rightmark, linestring, %bit2% rightmark := rightmark + 1 ;msgbox rightmark is %rightmark% ;stringlength= %rightmark%-%leftmark% stringlength := rightmark - leftmark ;msgbox stringlength is %stringlength% thefilename := SubStr(linestring, leftmark , stringlength) ;msgbox thefilename is %thefilename% IfExist, %thefilename% { run %thefilename% } IfNotExist, %thefilename% { MsgBox, 260,, the File "%thefilename%" does not exist. Create the file? IfMsgBox Yes { FileAppend, %thefilename%, %thefilename% SplashTextOn, 320, 100, file created Sleep, 400 SplashTextOff run %thefilename% } else Exit } } Return