Hi boys...
Excuse me for my english but I am italian and so I don't speak very well...
I have a problem with the AddTimer function...I realized a script that send all my emoticons to a contact when i write "invia_emoticons"...I send the emoticons one at a time because the limit for a message is 5 emoticons...
when i send the emoticons,only some emoticons was send..In my opinion this problem is caused by the different of the speed between the processing of the data and processing of the send of data..
OK...so i think to add the AddTimer between a send and other...
But i see that this function isn't execute...
the code of the function is:
code:
function send_emoticon(wnd)
{
var smile="";
var Emoticons = Messenger.CustomEmoticons;
var e = new Enumerator(Emoticons);
var Emoticon;
if(wnd.EditChangeAllowed==true)
{
for(; !e.atEnd(); e.moveNext())
{
MsgPlus.AddTimer("timer",5000);
Emoticon = e.item();
smile=" "+Emoticon.Shortcut;
Debug.Trace(smile);
wnd.SendMessage(smile);
}
}
}
function onEvent_Timer(timer)
{
}
the output of the debug is:
code:
)
Funzione chiamata: OnEvent_ChatWndSendMessage
-_-1
Funzione chiamata: OnEvent_ChatWndSendMessage
-_^
Funzione chiamata: OnEvent_ChatWndSendMessage
.muha.
Funzione chiamata: OnEvent_ChatWndSendMessage
2CRY
Funzione chiamata: OnEvent_ChatWndSendMessage
2MALE
Funzione chiamata: OnEvent_ChatWndSendMessage
2O_O
Funzione chiamata: OnEvent_ChatWndSendMessage
2SBAVAA
Funzione chiamata: OnEvent_ChatWndSendMessage
3@:
Funzione chiamata: OnEvent_ChatWndSendMessage
3O_O
Funzione chiamata: OnEvent_ChatWndSendMessage
:L
Funzione chiamata: OnEvent_ChatWndSendMessage
;D
Funzione chiamata: OnEvent_ChatWndSendMessage
@:
Funzione chiamata: OnEvent_ChatWndSendMessage
ADDIO
Funzione chiamata: OnEvent_ChatWndSendMessage
ADORE
Funzione chiamata: OnEvent_ChatWndSendMessage
AFFRANT
Funzione chiamata: OnEvent_ChatWndSendMessage
AMMONIT
ANNOIO
ARGHARG
you can see that only the first emoticons are print...Why there isn't in the output of the debug Funzione chiamata: OnEvent_Timer...why don't the timer stop for 5 second the excute of the program?