Shoutbox

Online interface - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Skype & Live Messenger (/forumdisplay.php?fid=10)
+----- Thread: Online interface (/showthread.php?tid=63324)

Online interface by Rojay on 07-15-2006 at 07:25 PM

im working on an online interface for WLM but the first problem im facing is when i try to write contacts info into a file using 'WriteLine' it gives me an error, after 15 mins of tracing i found out that its because some of my contacts have asian characters in thier names ... is theres another way to write to files or a way to remove invalid characters from a string ?


RE: Online interface by BstrdSmkr on 07-15-2006 at 10:03 PM

try using escape() on the string before writing it.  just remember to use unescape() after reading it back.  hope that helps :)


RE: Online interface by Rojay on 07-15-2006 at 10:12 PM

thanks alot dude :)


another question, how can i get the text(messages sent) in an open window
i do konw how to iterate thru the opened chats and retrive thier handles but i want to retrive the messages that has been sent to me while im away
RE: Online interface by BstrdSmkr on 07-16-2006 at 03:33 PM

quote:
Originally posted by Rojay
another question, how can i get the text(messages sent) in an open window
i do konw how to iterate thru the opened chats and retrive thier handles but i want to retrive the messages that has been sent to me while im away

do you mean a Msg Plus chat window? or your web interface window?   for a Plus window, i'd probably use OnEvent_ChatWndReceiveMessage() and dump it to a text file.  it provides for checking of the sender, and type of message (wink, text, etc).  check the docs for usage
RE: Online interface by Rojay on 07-16-2006 at 04:28 PM

that was an option
but i want to create the file on window creation (first message sent) and delete the file on window destruction (when i close the window)
so i thought of using 'OnEvent_ChatWndCreated' but i dont know how to get the window information like the 'Contact.Email' from 'Contacts' because i dont have the window handle
to sum everything up, i dont konw how 'OnEvent_ChatWndCreated' works and its not explained or given an example in the documentation


RE: Online interface by BstrdSmkr on 07-16-2006 at 05:16 PM

code:

function OnEvent_ChatWndRecieveMessage(ChatWnd, Origin, Message, MessageKind);
{
   var ChatWnd;  //a reference to the window that recieved the msg is stored here
   if (Origin != Messenger.MyName)//check if the message came from you
   {
      if (LogFileExists(ChatWnd);)//Check if the window already has a log file
      {
         addToLogFile(ChatWnd, Message);//add the recieved msg to existing log file
      }
      else if (!LogFileExists(ChatWnd);)//if window doesn't have a log...
      {
         createLogFile(ChatWnd);//create one
      }
   }
}


obviously, make functions using file system objects for log creation, adding to, etc. and use similar technique to delete the file after OnEvent_ChatWndDestroyed();

hope that gets ya going again! :)