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
  • September 03, 2015, 02:15:49 PM
  • 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: DONE: Skinny Paste  (Read 9923 times)

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 15
    • View Profile
    • Donate to Member
DONE: Skinny Paste
« on: August 14, 2010, 10:14:39 AM »
I've tried many of the clip 'n paste apps but find they either do too much or don't easily do what I want done.

Here's what I'm looking for:

A hotkey-enabled pop-up with a plain text list of 10 short phrases (could be URLs, could be single words, could be sentences). Click the phrase and it pastes as plain text into the active application. That's it! Nothing fancy. As lightweight as possible, too.

I realize that lots of software, e.g., AceText, can do this for me. But I don't need additional functionality and would like to keep it clean and simple.

Thanks!

-- Bob

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 35,007
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: Skinny Paste
« Reply #1 on: August 14, 2010, 01:48:18 PM »
sounds like a good idea for a coding snack to me.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #2 on: August 15, 2010, 08:06:14 AM »
A hotkey-enabled pop-up with a plain text list of 10 short phrases (could be URLs, could be single words, could be sentences). Click the phrase and it pastes as plain text into the active application. That's it! Nothing fancy. As lightweight as possible, too.

Can each of your ten entries be contained on one line or do you envision multiline entries i.e. an entry with a carriage return?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 35,007
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: Skinny Paste
« Reply #3 on: August 15, 2010, 08:25:55 AM »
quick tip, for FARR users, it's really easy to make an alias with a list of items you can quickly paste into running application, and which you can search through and choose by typing.
just make an alias and in the results put a list of items like so:

Screenshot - 8_15_2010 , 8_24_06 AM.png

though i still think this is a perfect case for a simple coding snack.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 2,856
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #4 on: August 15, 2010, 10:08:30 AM »
Maybe Solway's CLIPTEXT ?  It's lightweight all right; only 140K download.  You'd need to check it works on late-model Windows, though.

Solway's own screenshot:
« Last Edit: August 15, 2010, 10:10:49 AM by rjbull »

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 15
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #5 on: August 15, 2010, 11:29:55 AM »
Can each of your ten entries be contained on one line or do you envision multiline entries i.e. an entry with a carriage return?

One line - though multi-line entries would be nice in case a need for them arises down the road.

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 15
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #6 on: August 15, 2010, 11:50:45 AM »
Maybe Solway's CLIPTEXT ?  It's lightweight all right; only 140K download.  You'd need to check it works on late-model Windows, though.

Thanks! I downloaded the software and gave it a spin.

It works as advertised but it's not right for me because clicking a clip only loads it into the clipboard. I need the clip pasted in the active app. I wasn't able to set a hotkey, either.

Also - and maybe this is an example of ClipText not working well with later versions of Windows - clicking a clip shuts down the program.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #7 on: August 15, 2010, 12:32:12 PM »
@pulphero: Any particular hotkey you would like to use?

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 15
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #8 on: August 15, 2010, 01:04:11 PM »
@pulphero: Any particular hotkey you would like to use?

Yes - the one I have mapped to my middle mouse button: CONTROL SHIFT Q

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #9 on: August 15, 2010, 01:36:40 PM »
Here you go (source/binary included):  SkinnyPaste

Create a clips.txt file in the same folder as the SkinnyPaste executable and then run SkinnyPaste.exe.  Put one clip per line in this format: <menu caption>|<clip text>

Code: [Select]
My email|pulphero@pulphero.com
Homepage|http://www.pulphero.com

If you make changes to the clips.txt file, simply right-click the tray icon and choose reload.  Currently, you can only have single line clips but you can have as many as you would like i.e. more than ten.  At this point, I just wanted to see if this is what you had in mind.

Here's the code for the folks that don't want to download the zip.

Code: Autohotkey
  1.  
  2. ; Read clips.txt file into a variable.
  3. FileRead, myClips, % A_ScriptDir . "\clips.txt"
  4.  
  5. Loop, Parse, myClips, `n, `r
  6. {
  7.     If ( A_LoopField != "" )
  8.     {
  9.         ; Extract menu entry text before the first pipe character.
  10.         MenuEntry := SubStr( A_LoopField, 1, InStr( A_LoopField, "|" ) - 1 )
  11.        
  12.         ; Build the menu using the extracted text.
  13.         Menu, ClipMenu, Add, % MenuEntry, OnClipMenu
  14.     }
  15. }
  16. Return ; End of auto-execute section.
  17.  
  18.  
  19. OnClipMenu:
  20. {
  21.     Loop, Parse, myClips, `n, `r
  22.     {
  23.         If ( A_LoopField != "" )
  24.         {
  25.             If ( A_Index = A_ThisMenuItemPos )
  26.             {
  27.                 ; Extract all text from the first pipe character to the end of the string.
  28.                 Clip := SubStr( A_LoopField, -( StrLen( A_LoopField ) - InStr( A_LoopField, "|" ) - 1 ) )
  29.                
  30.                 ; Activate the window that active when the clip menu was instantiated.
  31.                 WinActivate, % "ahk_id " . activeID
  32.                 WinWaitActive, % "ahk_id " . activeID
  33.                
  34.                 ; Saved previous clipboard contents.        
  35.                 SavedClip := ClipboardAll
  36.                
  37.                 ; Put extracted clip contents on the clipboard and give it a second.
  38.                 Clipboard := Clip
  39.                 ClipWait, 1
  40.                
  41.                 ; Paste clip contents.
  42.                 SendInput, ^v
  43.                
  44.                 ; Restore saved clipboard contents.
  45.                 Clipboard := SavedClip
  46.             }
  47.         }
  48.     }
  49. }
  50. Return
  51.  
  52.  
  53. ^+q:: ; Change hotkey to suit.
  54. {
  55.     ; Get the ID of the active window.
  56.     WinGet, activeID, ID, A
  57.    
  58.     ; Show the clip menu.
  59.     Menu, ClipMenu, Show
  60. }
  61. Return
  62.  
« Last Edit: August 24, 2010, 11:52:18 PM by skwire »

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 15
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #10 on: August 15, 2010, 01:41:17 PM »
How cool - thanks very much! I'll try it out tonight.

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 15
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #11 on: August 15, 2010, 09:20:41 PM »
The script does exactly what I want. It works perfectly, and it's going to save me a lot of time.

Thanks again for giving me in a day what I've spent weeks searching for.

-- Bob

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #12 on: August 15, 2010, 09:32:10 PM »
Thanks again for giving me in a day what I've spent weeks searching for.

You're very welcome.  I'm glad I could help.

nogojoe

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 137
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #13 on: August 16, 2010, 05:12:08 AM »
Thanks again for giving me in a day what I've spent weeks searching for.

You're very welcome.  I'm glad I could help.


Another great coding snack Skwire  thanks.love it

btw how do you get seperator eg <menu caption>|<clip text> for the text file from off the keyboard .excuse my ignorance on this one .Just been copy pasting it for my purposes

Just found it my keyboard has it as 2 vertical dashes not a full vertical dash .Fluked finding it by changing the  hotkey to crtl shift \  and I hit shift | by mistake lol  :-[

nogojoe
Often the most convincing people are those who have lost the plot so much they don't recognize the difference between fact and fantasy
« Last Edit: August 16, 2010, 05:42:21 AM by nogojoe »

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 674
    • View Profile
    • Niche Review Blogs
    • Donate to Member
Re: Skinny Paste
« Reply #14 on: August 18, 2010, 03:03:24 AM »
To the OP: You just described ClipX!
<a href="http://www.sridharkatakam.com">My blog</a>

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: Skinny Paste
« Reply #15 on: August 18, 2010, 03:49:11 AM »
To the OP: You just described ClipX!

Not really.  IMHO, the OP didn't want a clipboard manager; he wanted a quick-paste menu for some pre-determined pieces of text.  Not quite the same.
« Last Edit: August 18, 2010, 03:52:23 AM by skwire »

222fbj

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 53
    • View Profile
    • Donate to Member
Re: DONE: Skinny Paste
« Reply #16 on: September 17, 2010, 10:05:27 AM »
You might try Notetab - a free/light text editor, which includes a clipboard.

To use the clipboard go to (menu) Document>Use as Pasteboard

http://notetab.com/

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 15
    • View Profile
    • Donate to Member
Re: DONE: Skinny Paste
« Reply #17 on: September 17, 2010, 10:50:59 AM »
You might try Notetab - a free/light text editor, which includes a clipboard.

I've used (and still use, every day) NoteTab Pro for years - but it doesn't do what I asked for and which skwire helpfully created for me.

msteph

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 24
    • View Profile
    • Donate to Member
Re: DONE: Skinny Paste
« Reply #18 on: September 19, 2010, 04:43:45 PM »
skwire, this looks like a very handy little app but I must be doing something wrong (wouldn't be the first time) because it doesn't work for me as it does for pulphero.

I created the clips.txt file. ran SkinnyPaste.exe, pressed CONTROL SHIFT Q to bring up the list but when I click on one of the items, that text is not pasted into metapad (my active application) but rather whatever is already on the clipboard is pasted.

IOW, for some reason SkinnyPaste is not reading the chosen item to the clipboard for it to then be pasted.

Also you say "If you make changes to the clips.txt file, simply right-click the tray icon and choose reload."

If I right-click the tray icon, the only choices I see are "Suspend Hotkeys", "Pause Script" and "Exit", no 'reload' option.

What am I doing wrong?



pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 15
    • View Profile
    • Donate to Member
Re: DONE: Skinny Paste
« Reply #19 on: September 19, 2010, 05:13:56 PM »
It sounds like you're running the executable. If you run the script itself and then right-click its icon in the task bar, you'll see the Reload option.

When I run the executable I don't see that option, either.


« Last Edit: September 19, 2010, 05:16:20 PM by pulphero »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: DONE: Skinny Paste
« Reply #20 on: September 19, 2010, 06:01:04 PM »
It sounds like you're running the executable. If you run the script itself and then right-click its icon in the task bar, you'll see the Reload option.

When I run the executable I don't see that option, either.

Yep, it has to do with running the executable.  I'm fixing it so give me just a minute.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,393
    • View Profile
    • Donate to Member
Re: DONE: Skinny Paste
« Reply #21 on: September 19, 2010, 06:10:31 PM »
Here's an updated version that includes a modified tray menu that should work with either the .ahk or the .exe file.

SkinnyPaste

@msteph: I'm not sure what the issue could be on your system.  I downloaded Metapad and it seems to work fine here.  That being said, I did increase the clipboard wait period in this latest build.  Could you please clear your cache, redownload, and try again?  You'll know you have the newer version if the tray menu only shows two entries now.  Please let me know how it goes.  Thanks.

msteph

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 24
    • View Profile
    • Donate to Member
Re: DONE: Skinny Paste
« Reply #22 on: September 19, 2010, 11:56:30 PM »
>When I run the executable I don't see that option, either.


pulphero, when you run the executable, either the old one or the brand new one, does the app actually work?

msteph

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 24
    • View Profile
    • Donate to Member
Re: DONE: Skinny Paste
« Reply #23 on: September 20, 2010, 12:04:35 AM »
@msteph: I'm not sure what the issue could be on your system.  I downloaded Metapad and it seems to work fine here.  That being said, I did increase the clipboard wait period in this latest build.  Could you please clear your cache, redownload, and try again?  You'll know you have the newer version if the tray menu only shows two entries now.  Please let me know how it goes.  Thanks.

skwire, downloaded the new .exe, cleared the cache and ran it.  It now does show the two entries in the tray as you mention ("Reload clips" and "Exit") but it still doesn't pick up the item I click on, just whatever's on the clipboard.  If the clipboard is blank/empty (via CCleaner) then nothing is pasted.

Hmmmm....

In any case, thank you very much (and pulphero) for responding so quickly to my post!

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 15
    • View Profile
    • Donate to Member
Re: DONE: Skinny Paste
« Reply #24 on: September 20, 2010, 06:35:01 AM »
>When I run the executable I don't see that option, either.


pulphero, when you run the executable, either the old one or the brand new one, does the app actually work?


Like a charm.