Sign in to follow this  
Followers 0
Unc3nZureD

Help Needed

9 posts in this topic

Hi, i've tried to do a script but i get stucked.

How can i do this:

Press a Button (num3) in every x sec.

x sec is an inputbox.

so, 1st an Inputbox will PopUp. Here I write a number like 10000 (ms)

then it's automatically press the {Num3} button in every 10000 (ms)

(extra):

If u can please put an msgbox which say: The script thime has been set to [x/1000 sec (the outocome number)] in my example i'll be 10 sec.

thanks.

Share this post


Link to post
Share on other sites



what spammer?

it send once a button in every x (inputbox) sec.

Share this post


Link to post
Share on other sites

i've started with this code:

$text = InputBox("Title", "The Note")

While 1

Send("{3}")

Sleep(& $text &)

Send("{3}")

Sleep(& $text &)

WEnd

But in this line there's an error: Sleep("& $text &") because its = 0 (sleep 0ms)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

here is the code that works

$delay = InputBox("Delay","Enter delay time in ms :")
While 1
    Sleep($delay)
    Send("{NUMPAD3}")
WEnd
Exit

i don't know what you mean by

Sleep(& $text &)

explain what did you mean with that piece of code!

see the help file ... Sleep can have only int parameter

Parameters

delay Amount of time to pause (in milliseconds).

Edited by Spiider11

Share this post


Link to post
Share on other sites

yes but in this case it doesnt matter if it's a number , because it comes from the input and when you use it with sleep its treated as a number , the thing is he should be careful when typing the delay :(

Share this post


Link to post
Share on other sites

ohh, $delay, damn not $text :). I read it in a notepad example. yes i'm starter in scripting :( . but Thanks for helping. I'm now trying the code.

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