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?

link|improve this question

feedback

1 Answer

up vote 5 down vote accepted

try

Clipboard = <div align="center"></div>
Send ^v
link|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
feedback

Your Answer

 
or
required, but never shown

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