Trying to convert min:sec to milliseconds - why doesn't this work?
I'm trying to convert the contents of a textedit field containing a string like this "minutes:seconds" into milliseconds.
I've gotten as far as using mxj sbuf with a "split :" message, then feeding this to a "zl group" object, then an unpack, but unpack seems to only returns 0s, even thought the zl seems to be spitting out the correct list.
Why is this happening? Why is the list being ignored by unpack? Also, is there an easier way of doing this in general? It seems long-winded.
The problem you're having is that the [zl group] is sending out a list of symbols so the arguments in [unpack] need to be symbols too. Try changing it to [unpack s s] and then it should work. There is an easier way of doing this with [regexp], here's an example.
lh
You could do the whole thing like this, and avoid regexp (it confuses me).
Thanks everyone, the combine and translate objects were new to me, and do the trick.