Unc3nZureD Posted April 13, 2010 Share Posted April 13, 2010 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. Link to comment Share on other sites More sharing options...
JohnOne Posted April 13, 2010 Share Posted April 13, 2010 Show the code you have tried, and you will get help faster. Is it a spammer you want ? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Unc3nZureD Posted April 13, 2010 Author Share Posted April 13, 2010 what spammer? it send once a button in every x (inputbox) sec. Link to comment Share on other sites More sharing options...
JohnOne Posted April 13, 2010 Share Posted April 13, 2010 It was a question, not an accusation. I see you still cannot be bothered to provided the code. Best of luck anyway. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Unc3nZureD Posted April 13, 2010 Author Share Posted April 13, 2010 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) Link to comment Share on other sites More sharing options...
Spiider11 Posted April 13, 2010 Share Posted April 13, 2010 (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 April 13, 2010 by Spiider11 Link to comment Share on other sites More sharing options...
JohnOne Posted April 13, 2010 Share Posted April 13, 2010 Sleep(& $text &) Is incorrect it should just be Sleep($text) Also you dont want the variabl $text to actually be a string, it needs to be a number eg, $iNum = 2000 Sleep($iNum) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Spiider11 Posted April 13, 2010 Share Posted April 13, 2010 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 Link to comment Share on other sites More sharing options...
Unc3nZureD Posted April 13, 2010 Author Share Posted April 13, 2010 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. 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