Matthy Posted December 17, 2006 Share Posted December 17, 2006 i am triing to let autoit run 2 tasks at once and I dont want to make a mess of it sow i am keeping my tasks. seperated like this example this doesnt work $i = 2 Do Run ("notepad.exe") Sleep(1000) WinClose("Naamloos - Kladblok", "") Until $i = 10 Do Run ("wordpad.exe") Sleep(1000) WinClose("Document - WordPad", "") Until $i = 10oÝ÷ ÚØb±Ú³ +«¢+ØÀÌØí¤ôÈ)¼(%IÕ¸ ÅÕ½Ðí¹½ÑÁ¹áÅÕ½Ðì¤(%IÕ¸ ÅÕ½ÐíÝɥѹáÅÕ½Ðì¤(%M±À ÄÀÀÀ¤(%]¥¹ ±½Í ÅÕ½Ðí9µ±½½Ì´-±±½¬ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(%]¥¹ ±½Í ÅÕ½Ðí½Õµ¹Ð´]½ÉAÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤($)U¹Ñ¥°ÀÌØí¤ôÄÀ but when you do this with a big bunch of code its getting really messy the only way i can think of is build both of them and run them both with an other program is there an other way? thx Matthy Link to comment Share on other sites More sharing options...
Kickassjoe Posted December 17, 2006 Share Posted December 17, 2006 $i = 2Do Run ("notepad.exe") Sleep(1000) WinClose("Naamloos - Kladblok", "") Until $i = 10Do Run ("wordpad.exe") Sleep(1000) WinClose("Document - WordPad", "") Until $i = 10You are currently using 2 Do-Until loops, one after the other (in that example you gave), so, it wouldn't be the scripts fault that it wasn't doing the 2 things at the same time. There is no way to multi-thread in autoit (you can't do 2 different functions at exactly the same time) without running 2 different programs. What goes around comes around... Payback's a bitch. Link to comment Share on other sites More sharing options...
Matthy Posted December 17, 2006 Author Share Posted December 17, 2006 (edited) ok to bad but thx for the help meaby something for in a new version then.... Edited December 17, 2006 by Matthy Link to comment Share on other sites More sharing options...
dabus Posted December 17, 2006 Share Posted December 17, 2006 Have a look at AdlibEnable()/AdlibDisable() ... This should be the way to go. Link to comment Share on other sites More sharing options...
Snarg Posted December 18, 2006 Share Posted December 18, 2006 The functions found here will allow you to run more then one task at a time. A little reading goes a long way. Post count means nothing. 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