Kwayetus Posted April 16, 2010 Share Posted April 16, 2010 Hey, this is my first time using this program. I dunno anything yet. I want to create a script that would auto press my spacebar like say every 2 seconds? Is this possible? If so please help me with the script.. Thanks Link to comment Share on other sites More sharing options...
kaotkbliss Posted April 16, 2010 Share Posted April 16, 2010 While 1 Send("{SPACE}") Sleep(2000) Wend 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Kwayetus Posted April 16, 2010 Author Share Posted April 16, 2010 Wow.. Never knew it was that simple. I understand the last 3 lines but can you explain what the While 1 line means? Link to comment Share on other sites More sharing options...
Kwayetus Posted April 16, 2010 Author Share Posted April 16, 2010 Sorry for double post but I cant find edit post lol.. Anyway, I want to create a code that presses Space 5 times then presses 5 once. I tried it like this : While 1 Send("{SPACE}") Sleep(250) Send("{SPACE}") Sleep(250) Send("{SPACE}") Sleep(250) Send("{SPACE}") Sleep(250) Send("{SPACE}") Sleep(250) Send("{5}") Wend But, dunno why, it presses "5" not every 5 "spaces" but like every second. I dont understand >< Link to comment Share on other sites More sharing options...
kaotkbliss Posted April 16, 2010 Share Posted April 16, 2010 (edited) The 250 you have in sleep is 250 milliseconds It's probably pressing the space so fast that whatever is recieving the space can't catch them all The While 1 simply means "While true" or loop always. Edited April 16, 2010 by kaotkbliss 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Kwayetus Posted April 16, 2010 Author Share Posted April 16, 2010 Yes I know it is 250 milliseconds. Anyway, I understand what went wrong now. But is there like a "simpler" way to do this? Instead of repeating Send("{SPACE}") sooo many times, is there another way? Link to comment Share on other sites More sharing options...
kaotkbliss Posted April 16, 2010 Share Posted April 16, 2010 Send("{SPACE 5}") If you want to slow down the keystrokes you can use Opt("SendKeyDelay", 45) ; typing delay 45 milliseconds 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now