Kwayetus 0 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 Share this post Link to post Share on other sites
kaotkbliss 146 Posted April 16, 2010 While 1 Send("{SPACE}") Sleep(2000) Wend 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
Kwayetus 0 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? Share this post Link to post Share on other sites
Kwayetus 0 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 >< Share this post Link to post Share on other sites
kaotkbliss 146 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 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
Kwayetus 0 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? Share this post Link to post Share on other sites
kaotkbliss 146 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 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites