4

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?

1 Answer 1

7

try

Clipboard = <div align="center"></div>
Send ^v
1
  • 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, 2011 at 16:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .