Varsity Posted July 10, 2011 Share Posted July 10, 2011 Hey guys! I'm new here and I was wondering if I can get some help with a script. ----- So basically, what I'm trying to do, is have a script that can run multiple scripts at one time; but I only know how using the Sleep functions. What I'm trying to get at, is that if I have one script running, with a sleep command, no other script can run, until the first script's sleep has subsided. Here's what I have so far.. While 1 RunMe() Sleep(250) EnterText() WEnd Whereas 'RunMe()' consists of : Start($dir) Sleep(250000) What I'm trying to do, is have Func 'EnterText()' run, even while 'RunMe's Sleep function is still active. That or if there is a more efficient form of delay that would support multiple running scripts; further guidance would be appreciated. Thanks for your time! Sorry if my description was low quality; and I've searched the forums for like an hour, and still not found anything! Cheers. Link to comment Share on other sites More sharing options...
smartee Posted July 11, 2011 Share Posted July 11, 2011 Hi Varsity, Welcome to the forums!! We'll be delighted to help you Look at the Timer functions & AdlibRegister(); search for them in the help-file, if you're still stuck post back with your modified attempts Good luck -smartee Link to comment Share on other sites More sharing options...
Varsity Posted July 11, 2011 Author Share Posted July 11, 2011 Hi Varsity,Welcome to the forums!! We'll be delighted to help you Look at the Timer functions & AdlibRegister(); search for them in the help-file, if you're still stuck post back with your modified attempts Good luck -smarteeThanks smartee!And I'm not THAT great with AutoIt, currently. Are those functions easy to use at all?And I'll look em up now. Link to comment Share on other sites More sharing options...
smartee Posted July 11, 2011 Share Posted July 11, 2011 Don't worry, we all start somewhere but learning AutoIt is a breeze as I'm sure you noticed by now, I the help-file, its rich with helpful examples and structurally consistent. They are quite simple, take a shot at them for yourself I'll happily help you debug and whip up a few examples if you run into difficulty Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 11, 2011 Share Posted July 11, 2011 In the Helpfile there is example code for all the native AutoIt functions. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
smartee Posted July 11, 2011 Share Posted July 11, 2011 @somdcomputerguy: I guess I'm not the only one who hearts the help-file Link to comment Share on other sites More sharing options...
Varsity Posted July 11, 2011 Author Share Posted July 11, 2011 I'm still not finding anything :\ .. Does anyone have an example script I can base my code off of? <3 Link to comment Share on other sites More sharing options...
smartee Posted July 11, 2011 Share Posted July 11, 2011 What about this example from the help-file? AdlibRegister("MyAdlib") ;... Exit Func MyAdlib() ;... execution must be non blocking, avoid ...Wait(), MsgBox(), InputBox() functions If WinActive("Error") Then ;... EndIf EndFunc Maybe I can hatch up a more specific example if you explain a bit more what you're trying to do Link to comment Share on other sites More sharing options...
Varsity Posted July 11, 2011 Author Share Posted July 11, 2011 Thanks! Sorry, again; it's rather difficult to explain :S I'm trying to have multiple scripts running with timers, however, I don't want the timers to interfere with eachother. For example, let's say in terms of Send(), you could have Send(A) Sleep(1250) Send(B) Sleep(2500) Except, I'm trying to figure out how to have it send A every 1.25 seconds, while B is sending ever 2.5 seconds; and A's Sleep function does not offset B's. That's the best example I can whip up for ya, haha. Sorry. Link to comment Share on other sites More sharing options...
smartee Posted July 11, 2011 Share Posted July 11, 2011 No worries see if you follow this example: AdlibRegister("FnA", 2000) AdlibRegister("FnB", 1000) While 1 Sleep(250) WEnd Func FnA() ConsoleWrite("Hello from FnA" & @CRLF) EndFunc ;==>FnA Func FnB() ConsoleWrite("Hello from FnB" & @CRLF) EndFunc ;==>FnB Link to comment Share on other sites More sharing options...
Varsity Posted July 11, 2011 Author Share Posted July 11, 2011 Great, I'll try it out in a few! Thanks for your help! Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 11, 2011 Share Posted July 11, 2011 @somdcomputerguy: I guess I'm not the only one who hearts the help-file I''ve been using AutoIt for 5 years or so now, and the Helpfile is my best friend! I wish my girl had such good documentation! That certainly would've made the last 13 years alot easier.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Varsity Posted July 11, 2011 Author Share Posted July 11, 2011 Excellent! It works flawlessly! Thanks a lot smartee for all of your support! 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