I created a script to highlight all [F11] and then, when I hit Enter, to delete it all. When I do this, the Enter key causes the curser to go to the next line and I have to hit the backspace key. So I added backspace to the script; the problem now is that when I hit F11 it highlights all and deletes all immediately. I dont want this in case I "highlight all" the wrong stuff by mistake. How can I get the script to backspace after I hit the Enter key. Thanks.
F11::Send ^a!{delete}{backspace}
Hightlight all then delete all
- Delta Pythagorean
- Posts: 627
- Joined: 13 Feb 2017, 13:44
- Location: Somewhere in the US
- Contact:
Re: Hightlight all then delete all
Try this:
KeyWait is quite useful for situations like this.
Code: Select all
F12::
SendInput, ^a
KeyWait, Enter, D
SendInput, {BackSpace}
Return
[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat
Re: Hightlight all then delete all
Delta Pythagorean wrote:Try this:KeyWait is quite useful for situations like this.Code: Select all
F12:: SendInput, ^a KeyWait, Enter, D SendInput, {BackSpace} Return
Yes!! That is just what I wanted. Thanks.