Jump to content

let your program do 2 tasks @ once ?


Matthy
 Share

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

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...