Welcome Guest.   Make a donation to an author on the site December 21, 2014, 04:43:35 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Check out and download the GOE 2007 Freeware Challenge productivity tools.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: Skinny Paste  (Read 8658 times)
pulphero
Supporting Member
**
Posts: 15

View Profile Give some DonationCredits to this forum member
« 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
Logged
mouser
First Author
Administrator
*****
Posts: 33,791



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: August 14, 2010, 01:48:18 PM »

sounds like a good idea for a coding snack to me.
Logged
skwire
Global Moderator
*****
Posts: 4,182



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« 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?
Logged

mouser
First Author
Administrator
*****
Posts: 33,791



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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:



though i still think this is a perfect case for a simple coding snack.
Logged
rjbull
Charter Member
***
Posts: 2,792

View Profile Give some DonationCredits to this forum member
« 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:


* cliptext.gif (9.34 KB, 492x429 - viewed 272 times.)
« Last Edit: August 15, 2010, 10:10:49 AM by rjbull » Logged
pulphero
Supporting Member
**
Posts: 15

View Profile Give some DonationCredits to this forum member
« 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.
Logged
pulphero
Supporting Member
**
Posts: 15

View Profile Give some DonationCredits to this forum member
« 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.
Logged
skwire
Global Moderator
*****
Posts: 4,182



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: August 15, 2010, 12:32:12 PM »

@pulphero: Any particular hotkey you would like to use?
Logged

pulphero
Supporting Member
**
Posts: 15

View Profile Give some DonationCredits to this forum member
« 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
Logged
skwire
Global Moderator
*****
Posts: 4,182



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« 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>

[copy or print]
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.

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  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.  
  51.  
  52. ^+q:: ; Change hotkey to suit.
  53. {
  54.    ; Get the ID of the active window.
  55.    WinGet, activeID, ID, A
  56.  
  57.    ; Show the clip menu.
  58.    Menu, ClipMenu, Show
  59. }
« Last Edit: August 24, 2010, 11:52:18 PM by skwire » Logged

pulphero
Supporting Member
**
Posts: 15

View Profile Give some DonationCredits to this forum member
« Reply #10 on: August 15, 2010, 01:41:17 PM »

How cool - thanks very much! I'll try it out tonight.
Logged
pulphero
Supporting Member
**
Posts: 15

View Profile Give some DonationCredits to this forum member
« 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
Logged
skwire
Global Moderator
*****
Posts: 4,182



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« 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.
Logged

nogojoe
Charter Member
***
Posts: 136


see users location on a map View Profile Give some DonationCredits to this forum member
« 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  embarassed

nogojoe
« Last Edit: August 16, 2010, 05:42:21 AM by nogojoe » Logged

Often the most convincing people are those who have lost the plot so much they don't recognize the difference between fact and fantasy
sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #14 on: August 18, 2010, 03:03:24 AM »

To the OP: You just described ClipX!
Logged

skwire
Global Moderator
*****
Posts: 4,182



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« 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 » Logged

222fbj
Supporting Member
**
Posts: 53


View Profile Give some DonationCredits to this forum member
« 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/
Logged
pulphero
Supporting Member
**
Posts: 15

View Profile Give some DonationCredits to this forum member
« 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.
Logged
msteph
Supporting Member
**
Posts: 19

View Profile Give some DonationCredits to this forum member
« 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?


Logged
pulphero
Supporting Member
**
Posts: 15

View Profile Give some DonationCredits to this forum member
« 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 » Logged
skwire
Global Moderator
*****
Posts: 4,182



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« 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.
Logged

skwire
Global Moderator
*****
Posts: 4,182



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« 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.
Logged

msteph
Supporting Member
**
Posts: 19

View Profile Give some DonationCredits to this forum member
« 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?
Logged
msteph
Supporting Member
**
Posts: 19

View Profile Give some DonationCredits to this forum member
« 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!
Logged
pulphero
Supporting Member
**
Posts: 15

View Profile Give some DonationCredits to this forum member
« 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.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.081s | Server load: 0.07 ]