O.P. [Help] My Problem...
Hi,
i will try to be as through as i can with this so you can understand it easier.
im not very advanced in programming and thus i am having this problem.
Here is a function that i have. the variables inside this function hold a Cache of data. A string cache at which every time the timer of 100ms is called empties 1000 charactesr of that cache.
now i can use debug trace and everything works well.
now i want to send this string to the chat window.
//////////////////////////////////////////////////////////////////////////
var count_length = 0;
var chk_end = new Boolean(0);
function OnEvent_Timer(TimerId)
{
var send_string = "";
if (TimerId == "send_timer_folder" && chk_end == 0)
{
send_string = final_final_folder.substr(count_length, 1000);
count_length += 1000;
if (send_string.length < 1)
{
chk_end = 1;
count_length = 0;
ChatWnd.SendMessage("no other folders."); <<<< Error here ( chatwnd object undefined)
}
else
{
ChatWnd.SendMessage(send_string); <<<< And here here ( chatwnd object undefined)
Debug.Trace(send_string);
send_string = "";
MsgPlus.AddTimer("send_timer_folder",100);
}
}
}
///////////////////////////////////////////////////////////////////
my question is, how can i write a function, that is called everytime the timer is up, and still have the ChatWnd object inside so i can use the SendMessage(string) command inside that function?
Thanks
This post was edited on 06-29-2006 at 12:07 PM by b0rna.
|