Jump to content
Sign in to follow this  
Matthy

let your program do 2 tasks @ once ?

Recommended Posts

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

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? :P

thx

Matthy

Share this post


Link to post
Share on other sites

$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 = 10

You 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.

Share this post


Link to post
Share on other sites

ok to bad :P but thx for the help meaby something for in a new version then....

Edited by Matthy

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×
×
  • Create New...