Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm frequently retyping the same URLs in gmail email messages. Is it possible to set up a list of words that are auto replaced with replacement text once typed?

For example, whenever I type the word "forumsX ", I want gmail to immediately replace the text "forumsX" with a hyperlink wrapped around the word "forums" and link to my forum address.

Is this possible? Or something similar?

share|improve this question
1  
Do you want it only done in Gmail? –  soandos Aug 29 '11 at 20:23
    
Yes, but as long as I can add it to gmail, I'm ok if it works other places to (like in my WordPress editor for example) –  Scott B Aug 29 '11 at 20:46
    
A bookmarklet could do this... –  vemv Aug 29 '11 at 20:47
    
@vemv this text may be part of the web page source. a bookmarklet could break the page. –  soandos Aug 29 '11 at 20:48
    
Assuming that the chosen words are unique enough and constraining the bookmarklet action to a particular <div> for example, I'd give it a go. –  vemv Aug 29 '11 at 20:51
add comment

2 Answers 2

There is a program called autohotkeys that can do this. Warning: wherever you type this, it will be replaced.

EDIT: There is a way to make it so it only changes the text if it detects the right window title, so you should be able to limit it to chrome or whatever. See here for more info.

share|improve this answer
    
GuiID? that is usually internal to the program itself, say if you were referencing a specific Gui within the code, not one external to the code. For external Gui control you would need the HWND, though that would not differentiate between tabs (say if you had gmail open versus superuser, it would do the same thing in both tabs). HWND and GuiIDs are also unique to instance, so they would constantly change, meaning no hard coding, which also means more work in scripting. You would get better results by filtering by window title. –  MaQleod Aug 29 '11 at 20:58
    
Editing, thank you. –  soandos Aug 29 '11 at 20:58
add comment

Generic text replacement utilities like Texter and PhraseExpress would work, but I prefer using AutoHotkey with Hotstrings.

Here's an example Hotstring that does what you asked for:

::forumsX::<a href="http://forum.example.com">forum</a>

To use it, run the AHK script above, then type forumsX followed by a space, tab, or another of the default end characters.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.