Jump to content

Recommended Posts

Posted

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.

Posted

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)

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
Posted

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 :(

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...