Caleb09 Posted December 20, 2007 Posted December 20, 2007 (edited) Hi, I was wanting to know if there's a way to run more then 1 function at the same time. Ex. Code Example() Timer() Func Example() ;I want the code in this function to run over and over while func timer is going. EndFunc Func Timer() $begin = TimerInit() sleep(3000) If $begin > 3000 Then Exit EndIf EndFunc Even if theres a way to combine the time and the function together, I still want to run another function along with those functions at the same time. Any help is appreciated. Thanks, Caleb Edited December 20, 2007 by Caleb09
Developers Jos Posted December 20, 2007 Developers Posted December 20, 2007 Use AdlibEnable() for the func you want to run over and over again... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Caleb09 Posted December 20, 2007 Author Posted December 20, 2007 When I use AdlibEnable, it just closes and does that make you able to run more then 1 function at same time? Heres a Ex. code where I want it to say 1 and press enter over and over. What did I do wrong? Run("notepad.exe") Sleep(2000) AdlibEnable("test1") Func test1() Send( "1{ENTER}") EndFunc
Developers Jos Posted December 20, 2007 Developers Posted December 20, 2007 First of all: it will always process only one thing at a time. Now if you want the Test1() to be polled during running of notepad you will have to make sure the script keeps on running ... it currently just ends after adlibenable() SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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