AppleScript MineCraft AutoTyper Keystroke Needs Slowed Down.

Joined
Jul 25, 2012
Messages
2
Reaction score
0
Points
1
Hey, I Wrote An AutoTyper Earlier, And Now I Am Trying To Make It Compatible With Minecraft, But I'm Running Into An Issue Where The Keystroke Is Typing Too Fast And The Game Cannot Keep Up With It. Is There A Way To Slow Down The Keystrokes And Continue To Let It Repeat A Set Number Of Times?
Code:
tell application "System Events"
	local boss
	display dialog "How Many Phrases Do You Want To Spam?" buttons {"1", "3", "5"}
	set the button_pressed to the button returned of the result
	if the button_pressed is "1" then
		set one to text returned of (display dialog "What Would You Like To Spam?" default answer "")
		set delayone to text returned of (display dialog "How Fast Do You Want To Spam?" default answer "1")
		set boss to text returned of (display dialog "How Many Times Do You Want To Say It?" default answer "")
		delay 3
		repeat boss times
			keystroke "t"
			delay 1
			keystroke one
			keystroke return
			delay delayone
		end repeat
	else if the button_pressed is "3" then
		set one to text returned of (display dialog "What Would You Like To Spam?" default answer "")
		set two to text returned of (display dialog "What Would You Like To Set Your Second Spam Phrase As?" default answer "")
		set three to text returned of (display dialog "What Would You Like To Set Your Third Spam Phrase As?" default answer "")
		set delayone to text returned of (display dialog "How Fast Do You Want To Spam?" default answer "1")
		set boss to text returned of (display dialog "How Many Times Do You Want To Say It?" default answer "")
		delay 3
		repeat boss times
			keystroke "t"
			delay 1
			keystroke one
			keystroke return
			delay delayone
			keystroke "t"
			delay 1
			keystroke two
			keystroke return
			delay delayone
			keystroke "t"
			delay 1
			keystroke three
			keystroke return
			delay delayone
		end repeat
	else if the button_pressed is "5" then
		set one to text returned of (display dialog "What Would You Like To Spam?" default answer "")
		set two to text returned of (display dialog "What Would You Like To Set Your Second Spam Phrase As?" default answer "")
		set three to text returned of (display dialog "What Would You Like To Set Your Third Spam Phrase As?" default answer "")
		set four to text returned of (display dialog "What Would You Like To Set Your Fourth Spam Phrase As?" default answer "")
		set five to text returned of (display dialog "What Would You Like To Set Your Fifth Spam Phrase As?" default answer "")
		set delayone to text returned of (display dialog "How Fast Do You Want To Spam?" default answer "1")
		set boss to text returned of (display dialog "How Many Times Do You Want To Say It?" default answer "")
		delay 3
		repeat boss times
			keystroke "t"
			delay 1
			keystroke one
			keystroke return
			delay delayone
			keystroke "t"
			delay 1
			keystroke two
			keystroke return
			delay delayone
			keystroke "t"
			delay 1
			keystroke three
			keystroke return
			delay delayone
			keystroke "t"
			delay 1
			keystroke four
			keystroke return
			delay delayone
			keystroke "t"
			delay 1
			keystroke five
			keystroke return
			delay delayone
		end repeat
	end if
end tell

And If My Code Seems Really Sloppy It Is Because I'm A Total Noob And This Was My First Project.
Any Help Is Appreciated.
~_LilWolfie_
 
Joined
Feb 25, 2009
Messages
2,112
Reaction score
71
Points
48
Your Mac's Specs
Late 2013 rMBP, i7, 750m gpu, OSX versions 10.9.3, 10.10
Hi, welcome to the forums!

Congrats on your new script - you may want to ask an admin to shift this post to the development topic below, this one is for ios which is not the right topic for your code (since iOS is only for iPhone/iPod/iPad).
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Also, just a heads-up: It is not necessary to Start Each Word With A Cap. Not complaining but getting in before the grammar Nazis :)
 
OP
L
Joined
Jul 25, 2012
Messages
2
Reaction score
0
Points
1
Sorry about the caps. It's just something I have always done:p And, sorry about posting in the wrong thread. Is it possible to get this moved down? Im not the brightest..
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top