ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Select text then drag to instant txt file

(1/2) > >>

trw:
Frequently I find myself having to create a blank text file using Notepad, navigate to a license email or web page, select the relevant text I want to save, copy it, paste it to the blank text file, and save it in the proper destination folder. I'd prefer to have the destination folder already open on the desktop, have the source window open nearby, and just select the text and drag it over to the folder, which would create a text file with the cursor active in the name so I can name it appropriately. Does anything exist like this?

mouser:
a compromise might be a hotkey which prompted for a filename/path dialog and then saved clipboard text there.
(in fact i think i'll add this to my clipboard help and spell program).

Nod5:
Hi, I have no drag drop solution but this hotkey alternative made in AHK is pretty quick:
1. select and copy text to save (ctrl+C)
2. select target folder (select folder icon on desktop or select an explorer window)
3. press hotkey (default: AppsKey a.k.a. "file properties menu opener key")


--- ---AppsKey::
if clipboard =
 return
ifwinactive, ahk_class Progman
{
ControlGet, x, List, Selected, SysListView321, A
x = %A_desktop%\%x%
}
else ifwinactive ahk_class CabinetWClass
 ControlGetText, x, Edit1, A
else
 return

Fileappend, %clipboard%, %x%\%A_Now%.txt
ToolTip,saved: %x%\%A_Now%.txt
sleep 2000
ToolTip
return
edit: though it does not offer a file rename step which you requested. But that shouldn't be hard to add. I'm off in a few secs so can't do it now -- maybe someone else'll pick it up from here.

MilesAhead:
Another approach, if you install EditPad Lite I believe it adds an explorer option to the New menu for Text File.  When created the name before the extension is already highlighted for renaming.  Rename, hit Enter, now editor is open and just paste the text.  (There's probably a way to add Text File type to the New menu without being forced to use EditPad lite but I'm not sure what it is.)

lanux128:
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
--- End quote ---


--- ---; 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.autohotkey.com/forum/viewtopic.php?t=6962

Navigation

[0] Message Index

[#] Next page

Go to full version