topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Saturday December 14, 2024, 3:45 am
  • Proudly celebrating 15+ 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: Drag any text or right click and save as a file  (Read 5833 times)

nampara17

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Drag any text or right click and save as a file
« on: May 18, 2012, 03:01 AM »
Hi All,

I'm looking for a simple application (lightweight) that will allow me to:

  • Select ANY text (browser, txt file, etc.)
  • Right Click and then save the text to a file
  • IF the content is HTML formatted give me the option to save as formatted HTML or pure TXT[

I realise there should be 100's of these apps out there but cannot find anything.

My editors will allow me to copy text into the editor and then obviously save, but this is more for clips or sections of content that I just want to save in either formatted text or plain text. I don't need clipboard controllers and utils, just plain right click, save as... functionality.

Any help much appreciated

Jonathan

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Drag any text or right click and save as a file
« Reply #1 on: May 18, 2012, 11:02 AM »
Welcome to the site, nampara17.   :D

I realise there should be 100's of these apps out there but cannot find anything.

Unfortunately, your requirements are what make this not trivial at all and is the reason why there are no apps out there that try to do this.  Let me explain.  First of all, right-clicking in an application is handled directly by said application.  Without some sort of API or plugin system for a given app, you simply can't hook into all the right-click menus of each and every app.  The problem is that the vast majority of apps do not offer APIs or plugin mechanisms and, even if they did, you'd have to write a separate handler for each application you want to support.  This is one of those coding problems that seems easy enough to humans but is terribly difficult to code for.  Follow me?

I don't need clipboard controllers and utils, just plain right click, save as... functionality.

It's ironic, but you're almost certainly going to have to use the clipboard for such functionality since it's the only common facility between different applications (when attempting to copy text).  You could still accomplish much of what you want by using, say, Ctrl+RightClick to popup a custom menu with a "Save as..." entry.  The app would then copy the selected text to clipboard and save it out as a your specified filename.  Something like this would actually be trivial to write with a bit of AutoHotkey script.  Are you open to this type of workflow?

shmuel1

  • Supporting Member
  • Joined in 2012
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: Drag any text or right click and save as a file
« Reply #2 on: May 21, 2012, 05:18 AM »
Hi Jonathan,

I could do that pretty easily with plain text using a keyboard shortcut such as CTRL+SHIFT+c to copy the selected text. Do you want the title of the window it was copied from and the date? 
« Last Edit: July 04, 2012, 11:30 AM by shmuel1 »

joiwind

  • Participant
  • Joined in 2009
  • *
  • Posts: 486
  • carpe momentum
    • View Profile
    • Donate to Member
Re: Drag any text or right click and save as a file
« Reply #3 on: May 21, 2012, 06:05 AM »
Jonathan : have a look at this, you may be able to tweak it to do what you want... or check its big brother.
« Last Edit: May 21, 2012, 06:19 AM by joiwind »

shmuel1

  • Supporting Member
  • Joined in 2012
  • **
  • default avatar
  • Posts: 48
    • View Profile
    • Donate to Member
Re: Drag any text or right click and save as a file
« Reply #4 on: July 04, 2012, 12:19 PM »
Hi Jonathan,

Here's a very small program for copying text to a file. When you run the program, select any text, then press Ctrl+WindowsKey+c to copy the text to a file. It saves the text to a file called Clips.txt on your desktop. If the file does not exist, the program creates it.

Let me know if you want any changes. I also included the source code. It's a tiny program. If you install AutoIt (free) you can edit the code yourself. The code is very easy to read.

Shmuel