i use a script from the AHK forums that i modified for my needs. with this script you can copy your text 1st then call this script which will open the text editor and paste the clipboard contents for you.
i wrote this small script that checks the clipboard for filename then:
a) opens the file in a text editor
b) if there is no valid filename, open the text editor then paste the contents -website
; PasteClipboard.ahk
#NoTrayIcon
SetKeyDelay,0
;Change to your editor here...
edtPath=%ProgramFiles%\Metapad\metapad.exe
edtTitle=new file - metapad
;save clipboard contents
tmpString=%Clipboard%
If FileExist(tmpString) ;file or folder exists...
{
FileGetAttrib, Attrib, %tmpString%
IfInString, Attrib, D ; contains folder
{
Run, %edtPath%, %tmpString%
}
Else ; contains file
{
SplitPath, tmpString,CurFile,CurFolder,CurExt,,
If CurExt in txt,ahk,bat,diz,inf,log,ini,m3u,nfo,reg,rtf,htm,html,css
{
Run, %edtPath% %tmpString%, %CurFolder%
}
Else
{
;just paste clipboard...
Run, %edtPath%, %A_MyDocuments%
WinWaitActive, %edtTitle%
Send,^v
}
}
}
Else
{
;restore clipboard...
Clipboard=%tmpString%
Run, %edtPath%, %A_MyDocuments%
WinWaitActive, %edtTitle%
Send,^v
}
Return
Exit ; exits program
Source: http://www.autohotke...viewtopic.php?t=6962