ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Coding Snacks

A "redirector" to send clipboard or selected text to various external apps


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..

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.

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. :)

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.

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.


[0] Message Index

Go to full version