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 04, 2016, 08:26:48 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: Pasty 1.5  (Read 6235 times)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,277
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Pasty 1.5
« on: June 14, 2009, 10:32:34 PM »
Simply sits in the Tray.  Highlight some text and hit the hotkey to paste the selected text instantly into a search engine that opens with a hotkey.  Out of the box the search hotkey is set to Control Esc for Windows search.  But you can change the hotkeys to use other utilities such as FARR, ReOpen, Everything etc..

2 key hotkey combinations are supported and may be set via dialogs with combo boxes. If your search engine has to have a 3 key combo hotkey then you may be able to find a hotkey "adapter" or make one yourself with AutoHotKey.  I guess I hate holding down 3 keys so I'm not that psyched to have 3 combo boxes in the dialogs.  :)  Makes for simpler less buggy programming with 2 key hotkeys too.

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

Note: Paste into Windows Search requires Vista or later due to changes in the start menu. If running on XP on first use it will prompt for search hotkey for external search engine, so use FARR or Everything or another that pops up with the caret in the input control.


Just scroll down a bit for Pasty

If you find any bugs you can contact me via the Contact button on my site or do a followup here if you prefer.
« Last Edit: September 04, 2009, 12:20:19 PM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,277
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Pasty 1.2 now if the OS is earlier than Vista and the search hotkey is Control Esc, it tries to paste into the Run line in the(presumably) XP Start Menu. For any other situation it assumes the window that pops up in response to the search hotkey has the caret in the input line waiting for text.

Since so many XP systems are still out there it seems silly not to try to use the Run line "search" thingy by default on that OS. :)

Edit: latest version(1.2) now up on Softpedia:
http://www.softpedia...lipboard/Pasty.shtml


« Last Edit: June 17, 2009, 10:44:33 AM by MilesAhead »

Hirudin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 543
    • View Profile
    • Donate to Member
MilesAhead, I hope you don't mind if I post this. If you do just send me a PM or something and I'll delete it ASAP.

I wrote one of these for myself also. It's extremely useful!

Mine uses Winkey+c to copy the text then waits for you to hit another key for what type of search you want to do...
A - ask.com (I thought about trying out this search engine)
D - Dictionary (dictionary.reference.com)
E - eBay
F - acronym finder
G - Google
P - Pricegrabber
T - Thesaurus (thesaurus.reference.com)
U - UPS (for tracking numbers, I've been planning to make this also "figure out" what kind of tracking number is highlighted and take you to FedEx, UPS, or USPS as necessary)
W - Wikipedia

It sometimes didn't work right in Vista, I think there was some kind of issue with it watching the clipboard, but in the Windows 7 RC it has worked perfectly so far.

I bet if you look at the script you'll see that it's very easy to customize...
AHK script
;I'm calling this version 1.0 - sorry, I don't think I'll ever include a changelog
           #c::
         CB = %Clipboard%
         Send ^c
         Phrase = %Clipboard%
         Clipboard = %CB%
         Input, SingleKey, L1 T3
;   ////////Replace Tabs and Line Breaks with Spaces
         StringReplace, Phrase, Phrase, `r, %A_Space%, All
         StringReplace, Phrase, Phrase, `n, %A_Space%, All
         StringReplace, Phrase, Phrase, %A_TAB%, %A_Space%, All
;   ////////Get rid of multiple spaces
         Loop
       {
       StringReplace, Phrase, Phrase, %A_SPACE%%A_SPACE%, %A_SPACE%, All
       StringGetPos, SpaceDouble, Phrase, %A_SPACE%%A_SPACE%, L1
       If SpaceDouble < 0
     {
     Break
     }
       }
;   ////////Ask
         If SingleKey = a
       {
       StringReplace, Phrase, Phrase, %A_SPACE%, +, All
       Run http://www.ask.com/web?q=`%22%Phrase%`%22
       }
;   ////////Dictionary
         Else If SingleKey = d
       {
       StringReplace, Phrase, Phrase, %A_SPACE%, `%20, All
       Run http://dictionary.re....com/browse/%Phrase%
       }
;   ////////eBay
         Else If SingleKey = e
       {
       StringReplace, Phrase, Phrase, %A_SPACE%, -, All
       Run http://search.ebay.com/%Phrase%
       }
;   ////////Acronym Finder
         Else If SingleKey = f
       {
       StringReplace, Phrase, Phrase, %A_SPACE%, +, All
       Run http://www.acronymfi...asp?Acronym=%Phrase%
       }
;   ////////Google
         Else If SingleKey = g
       {
       StringReplace, Phrase, Phrase, %A_SPACE%, +, All
       Run http://www.google.com/search?q=`%22%Phrase%`%22
       }
;   ////////PriceGrabber
         Else If SingleKey = p
       {
       StringReplace, Phrase, Phrase, %A_SPACE%, +, All
       Run http://www.pricegrab...orm_keyword=%Phrase%
       }
;   ////////Thesaurus
         Else If SingleKey = t
       {
       StringReplace, Phrase, Phrase, %A_SPACE%, `%20, All
       Run http://thesaurus.ref....com/browse/%Phrase%
       }
;   ////////UPS
         Else If SingleKey = u
       {
       StringReplace, Phrase, Phrase, %A_SPACE%, `%20, All
       Run http://wwwapps.ups.c...st?tracknum=%Phrase%
       }
;   ////////Wikipedia
         Else If SingleKey = w
       {
       StringReplace, Phrase, Phrase, %A_SPACE%, +, All
       Run http://en.wikipedia....ecial:Search?search=`%22%Phrase%`%22
       }
         Else
       {
       MsgBox Ended
       Exit
       }
         Reload
           return

« Last Edit: June 17, 2009, 07:21:08 PM by Hirudin »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,277
    • View Profile
    • Miles Ahead Software
    • Donate to Member
More than one way to skin the cat.  I took the approach that I don't really want to know what the external app is.  The only exception is XP Run input because XP is still the gorilla share of the PCs out there and it would seem lame if the program did nothing out of the box.

As another example, I just did a few lines of AHK that pops up an InputBox to get a url.  You set which browser to launch via .ini file.  Say I'm running Firefox and want to launch the current url in Opera.  I highlight the address and hit the Pasty hotkey.  All Pasty knows about my AHK script is the hotkey.

I did it mainly in response to a Coding Snack but it doesn't have to be a search input.  You could do a couple of lines of AHK or AutoIt3 that just activates a window in response to a hotkey.  Select all in a page of source code and hit the hotkey.  Editor is brought to front and pasted.  I think clipboard is one of the largest categories on shareware boards.  The idea is to make it the way you want. :)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,277
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Pasty 1.3 available:

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

I reworked the hotkey selection dialog to support some dual key modifiers like ControlAlt ControlShift, ShiftWinkey etc.. and added some entries to the main key, such as c,e,r,v,x  allowing hotkeys such as Win+R to paste stuff in the Run line etc..

Please let me know if you find any bugs.  Once used in Pasty for awhile I'll recompile ReOpen and Folder Cache to use the new dialogs.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,277
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Pasty 1.4 Improved background color/text color combinations for Glass enabled systems.  Basically I try to detect if the background color is bright, and use black text instead of white in that case.  But I also added background colors to the drop down box.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,277
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Pasty 1.4.0.1 adds Space and Arrow keys to available hotkeys.

The latest version is available on Softpedia:

http://www.softpedia...lipboard/Pasty.shtml

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,277
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Pasty 1.5
« Reply #7 on: September 04, 2009, 12:21:25 PM »
Pasty 1.5 Hotkey disabled while About Dlg showing to avoid possible hang.