Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 08, 2016, 10:09:19 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Select text then drag to instant txt file  (Read 4405 times)

trw

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
IDEA: Select text then drag to instant txt file
« on: April 07, 2009, 10:12:55 AM »
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

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Select text then drag to instant txt file
« Reply #1 on: April 07, 2009, 10:37:49 AM »
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

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: IDEA: Select text then drag to instant txt file
« Reply #2 on: April 07, 2009, 02:16:34 PM »
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.
« Last Edit: April 07, 2009, 02:21:25 PM by Nod5 »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: IDEA: Select text then drag to instant txt file
« Reply #3 on: April 07, 2009, 02:42:26 PM »
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.)

« Last Edit: April 07, 2009, 02:44:17 PM by MilesAhead »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: IDEA: Select text then drag to instant txt file
« Reply #4 on: April 07, 2009, 10:26:32 PM »
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.

Quote from: website
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

; 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

mateek

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 72
    • View Profile
    • GetAnd.com
    • Donate to Member
Re: IDEA: Select text then drag to instant txt file
« Reply #5 on: June 30, 2009, 10:08:08 PM »
Better late than never?  I found this app called 'Send To Notepad' about a year ago I think.  Just sits in your tray, and if you click it's icon a new notepad window opens and your clipboard goes in.

The link is http://www.utkarshonline.com

It can be quircky, needing a 'rt-click copy' here, an Edit>Copy from the menu bar there, a Ctrl-C, every where a Ctrl-C...oh McDonald had a....oh sorry...

I use it enough to justify keeping it in startup.  Can't for the life of me remember where I found it, maybe a direct web search.  I lost something a paragraph long I'd typed in a form online, and I was looking for clipboard monitors.  I finally settled on Clipp found at www.geocities.com/urifrid which I just wrote the author of to see if he'll put it back on his website.  Otherwise, I have a copy of the executable somewhere if someone wants to tell me where to host it.  My websites don't seem to like off-subject things like downloads.

Hope it helps.
Stop war: GetAnd.   Mobile edition: AndAnd.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: IDEA: Select text then drag to instant txt file
« Reply #6 on: June 30, 2009, 10:20:29 PM »
Recently I wrote a small hotkey app for the purpose of snapping up pieces of source code from web forums.  But it can easily be used with text.  It's called SourceSnap and you can download from this page:

http://www.favessoft.com/hotkeys.html

When running in the tray, highlight some text, hit the hotkey.  A file save dialog pops up and you name the file.  Another hotkey edits the last saved file in the default editor for the file type.  Alternatively, there's an additional hotkey to save paragraphs to a "snap file."

Should work on Windows XP and later.

The hotkeys are adjustable from drop down dialogs and you can change the name of the snap file(a file for collecting fragments or paragraphs that don't rate saving to a distinct file.)