Posted 16 March 2012 - 02:14 AM
how do i make it so while one part of a program is runing it carrys on running another
for example
run
monitorapi.marqueeLeft("top", "testing……….", 3, 0.1)
and
monitorapi.marqueeLeft("top", "testing……….", 2, 0.1)
at the same time
another example would be to have a monitier that displays counters kept up to date from multiple sides
in the past i have just added the stuff i want into the code for the anti ctrl+t but im sure thats not what im ment to do and well it doesnt always work
so in short 2 questions
1) how do i make it not wait for a command to finish before it moves to the next command?
2) how do i make a loop that runs in the background?
hmmm Parrallel seems to be a possible key,
so i tried
program just sets there doing nothing :D/>/>
if i – the first line it works (not as i want it to but 1 line at a time)
also tried parallel.waitForAll
for example
run
monitorapi.marqueeLeft("top", "testing……….", 3, 0.1)
and
monitorapi.marqueeLeft("top", "testing……….", 2, 0.1)
at the same time
another example would be to have a monitier that displays counters kept up to date from multiple sides
in the past i have just added the stuff i want into the code for the anti ctrl+t but im sure thats not what im ment to do and well it doesnt always work
so in short 2 questions
1) how do i make it not wait for a command to finish before it moves to the next command?
2) how do i make a loop that runs in the background?
hmmm Parrallel seems to be a possible key,
so i tried
parallel.waitForAny( one, two, three, four, five)
function one()
monitorapi.marqueeLeft("top", "testing5..........", 5, 0.1)
end
function two()
monitorapi.marqueeLeft("top", "testing4..........", 4, 0.1)
end
function three()
monitorapi.marqueeLeft("top", "testing3..........", 3, 0.1)
end
function four()
monitorapi.marqueeLeft("top", "testing2..........", 2, 0.1)
end
function five()
monitorapi.marqueeLeft("top", "testing1..........", 1, 0.1)
end
one()
two()
three()
four()
five()
program just sets there doing nothing :D/>/>
if i – the first line it works (not as i want it to but 1 line at a time)
also tried parallel.waitForAll
Edited on 16 March 2012 - 01:49 AM