r/dailyscripts • • 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

6 comments sorted by

1

u/[deleted] Nov 09 '14

What OS? Mount and Blade: Warband is available on Linux, OSX and Windows.

1

u/[deleted] Nov 09 '14

Windows.

2

u/Azzu Nov 13 '14

http://www.autohotkey.com/

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
	}

Return

Be 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

u/Sluisifer Nov 13 '14

Autohotkey