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.

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

1 Answer 1

up vote 5 down vote accepted

try

Clipboard = <div align="center"></div>
Send ^v
share|improve this answer
1  
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

 
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.