06-25-2017 10:53 AM
How can I get the MU with the highest time value attached to it, to get out of the buffer first?
I need a script that can be put into a method, so no sorter can be used.
06-25-2017 03:20 PM
you can use the method maxAttr of the contents list of the buffer e.g. (not tested!!)
var t:table t.create --read content of the buffer buffer.contentsList(t) if t.yDim=0 then debug --buffer is empty else --search the highest value t.setCursor(1,1) t.maxAttr([1,1}..{1,*},"YourAttribute") --move the MU from the selected row t[1,t.cursorY].move(yourDestination) end
Steffen Bangsow freelance simulation specialist web: www.bangsow.eu mail: steffen@bangsow.net | ![]() |