Answer the question
In order to leave comments, you need to log in
How to download messages from the end?
I sit for the 3rd hour and think: how to download messages from the end.
Here wrote execut'ku
var count = API.messages.get ({"count" : 0 , "out" : parseInt (Args.out)}).count;
var offset = count - parseInt (Args.ofset) - parseInt (Args.count);
var counts;
if (offset<0) {
counts = offset * -1;
offset = 0;
} else {
counts = parseInt (Args.count);
}
//return [counts,count, parseInt (Args.ofset)];
if (counts>count- parseInt (Args.ofset))
counts = count-parseInt (Args.ofset);
return [counts , offset , API.messages.get ({"count" : counts , "out" : parseInt (Args.out) , "offset" : offset})];
//return API.messages.get ({"count" : counts , "out" : parseInt (Args.out) , "offset" : offset});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question