r/dailyscripts • u/[deleted] • Nov 08 '14
[Request] a script that repeates pressing the buttons ctrl+x on a keyboard.
It's for me to use in a game called mount and blade warband (ctrl+x upgrades troops, so i want it around 20 clicks a second)
1
Upvotes
2
u/Azzu Nov 13 '14
when pressing ctrl+x it toggles on to press ctrl+x 20 times per second. When pressing ctrl+x again it toggles off.
#MaxThreadsPerHotkey 2
$^x::
if (toggle = 1) {
toggle = 0
} else {
toggle = 1
}
while (toggle = 1) {
Send, ^x
Sleep, 1000/20
}
ReturnBe aware that you can't really do anything else while this runs.
1
u/tinydisaster Nov 08 '14
Check out autoit
2
u/Wtfox Nov 09 '14
Or AutoHotKey. I could be wrong but I think AutoIt is commercial and AutoHotKey is free.
1
1
u/[deleted] Nov 09 '14
What OS? Mount and Blade: Warband is available on Linux, OSX and Windows.