Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In AutoHotkey, I have the following script:

:o:divc::<div align="center"></div>

When I use it in my IDE, the IDE will auto-close the div while it's being written by AutoHotkey, resulting in something like this:

<div align="center"></div></div>

The result is an extra div which I don't need. Is there a way to modify the AutoHotkey script so that it just pastes the expanded text without "typing" it on screen?

share|improve this question
up vote 6 down vote accepted


Clipboard = <div align="center"></div>
Send ^v
share|improve this answer
If you want the clipboard contents to persist, you can bracket this with ClipSaved := ClipboardAll ... (do stuff) ... Clipboard := ClipSaved. See here. – yhw42 Apr 13 '11 at 16:46

Your Answer


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.