topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday December 13, 2024, 2:59 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: A "redirector" to send clipboard or selected text to various external apps  (Read 7779 times)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
I came up with a utility called Pasty that copies selected text to the clipboard, then invokes a hotkey to an external app, and types in the text macro style.

Since there are hotkey aficionados more skilled with GUI I'm wondering if any would like to tackle the idea of a similar utility but more versatile.  Maybe handle either a selected object, clipboard contents, or text and allow it to be redirected to maybe 1/2 dozen external apps that the user could configure.  Maybe have a pop up window with buttons labeled with the name of the external app, or add them to Tray Icon Menu, or just some easy means.

Typical usage:

scenario 1)

I'm in EditPad and I type a URL.  If I double click it, EditPad will launch the default browser, but this time I want Opera to launch instead.  So I select the URL and do a hotkey or some other trigger, and I get my preconfigured apps in some kind of window or menu.

scenario 2)

I select a bunch of files in Explorer details view and I want to send them some external app.  I invoke the hotkey and my list of preconfigured apps pops up.. etc..

scenario 3)

I'm in a browser and I copy a link to clipboard.  Then I invoke this utility and if other browsers are in my configured list, I can just push a button to open with one without depending on the source browser for an AddOn or extension.


The invocation should be just a couple of actions.  Like, hotkey gets window, click button of app.. type of idea.

edit: come to think of it the list should probably be big enough for 12 or more entries since 3 or 4 are likely to be used up just by browsers, 2 or 3 by editors, several by graphics programs etc..


« Last Edit: August 24, 2009, 04:09 PM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Hmmm, I can do some of this with FARR hotkeys, like the Open with Opera thingy.  Still it might be useful for frequently used apps... or not. :)

edit: granted I can set up FARR hotkeys to accomplish some of this, but the downside is, every utility I set up I have to remember another hotkey..  instead of just remembering the hotkey for the redirector.

« Last Edit: August 24, 2009, 06:36 PM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
I'm working on this now. Eventually what I hope to have is a small list with the short names of programs.  There will be an option for each afa selected text, clipboard text or no clipboard, param switches, and I think I'll have it so you can do a file open dialog to add new programs or drag & drop.  I'll see how it goes.  Maybe in a week I'll have it debugged enough upload. :)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
It's still a bit rough.  I decided to call it Selector since usually you will select text and hit the hotkey(default is Shift-NumPadDiv) then select an app from the list.

If you would rather use the text that is in the clipboard already, select the appropriate radio button before hitting the Go button.  I might break out the bottom radio button into a mechanism for command line switches in the future.  This is just a rough working prototype.

Right now you have to use the pop up window to add programs with a File Open dlg.  It's a bit cumbersome but I don't know if the apps you run with selected text will be more than 1/2 dozen anyway.  If it's a problem then I'll have to work on it. A file with program short names and paths is written on program exit and read of program load.  I haven't figured out drag & drop on ListBox yet to see about reordering entries.

Radio Button Groups aren't that cooperative for colors in AutoIt3 so the look is not as smooth as I'd like.  But it seems to work.

http://www.favessoft.com/Selector.zip

btw it requires that Scripting.Dictionary is available on the machine.  It uses it for Associative Arrays.

edit: I found the trick on AutoIt forum.  Instead of figuring out how to set the Radio Button text color, you make a Radio Button with no text and stick a label adjacent to it.  Then it's trivial to adjust the label text color for contrast with the background.  Looks a lot better now.  Plus I set the ListBox to autosort when entries are added, so no real need to rearrange entries.
« Last Edit: August 30, 2009, 12:18 AM by MilesAhead »