Sign in to follow this  
Followers 0
Kwayetus

Help with a script

7 posts in this topic

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



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

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

#5 ·  Posted (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 by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

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

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 game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0