I'm not 100% sure why you'd need this but it was the first proper script I've ever made so here it is:
Code:
Gui, Add, Text, x52 y52 w220 h50 +Center, Enter the button you wish the script to press and how many times`, then press 1`, if it is a click`, enter a hash in the first box
Gui, Font, S10 CDefault, Verdana
Gui, Add, Hotkey, x12 y122 w130 h70 vHotkey,
Gui, Add, Button, x76 y292 w180 h40 +s +a, 1
Gui, Add, Edit, x182 y122 w130 h70 vNOT, Number of Times
Gui, Add, Edit, x102 y202 w120 h70 vSpeed, Speed - 1000 is a gap of 1 second
Gui, Add, Text, x258 y12 w100 h30 +Center +d, EITHER:
Gui, Add, Text, x372 y52 w210 h50 +Center, Enter the text you wish it to type for you then press 2.
Gui, Add, Edit, x332 y122 w270 h160 vText, Note that '!' is alt`, '#' is windows`, '^' is control and '+' is shift. This means that ^!d is control-alt-d and Hello{Enter}How are you would have an enter pressed at the location.
Gui, Add, Button, x372 y292 w190 h40 , 2
Hello:
Gui, Show, x313 y153 h356 w625, ButtonPresser V1.5
Return
Button1:
Gui, Submit
GuiControlGet, a,, Hotkey
If ErrorLevel
{
MsgBox, 0, ERROR, Could not get information from Hotkey Box - possible coding error?
}
GuiControlGet, b,, NOT
If ErrorLevel
{
MsgBox, 0, ERROR, Could not get information from Number Box - possible coding error?
}
GuiControlGet, c,, Speed
If ErrorLevel
{
MsgBox, 0, ERROR, Could not get information from Speed Box - possible coding error?
}
if Hotkey = #
{
MsgBox, 4, Your Choice, You want it to click for %b% times with a speed of %c% - correct?
IfMsgBox Yes
{
MsgBox, 0, Ready, Press Control-x when you wish to start it
^x::
Loop %b%
{
MouseClick, left
Sleep %c%
}
a =
b =
c = ;resets a,b and c
Goto, Hello
}
}
MsgBox, 4, Your Choice, You want it to press %a% for %b% times at a speed of %c% - correct?
IfMsgBox Yes
{
MsgBox, 0, Ready, Press Control-z when you wish to start it
^z::
Loop %b%
{
Send {%a%}
Sleep %c%
}
a =
b =
c = ;resets a,b and c
Goto, Hello
}
IfMsgBox No
ExitApp
Button2:
Gui, Submit
GuiControlGet, d,, Text
If ErrorLevel
{
MsgBox, 0, ERROR, Could not get information from Text Box
}
MsgBox, 0, Ready, Press Windows-z to type it and press Windows-q when you are finished
Back:
return
#z::
Send %d%
Goto, Back
#q::
a =
b =
c =
d =
Goto, Hello
^q::
ExitApp
It presses buttons repeatedly really fast, or can repeatedly enter blocks of text. If you ever loose the GUI (want it to appear again) press windows-q