FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

[MSN] --> (possible solution to be able to chat using phone)
Goto page 1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  

Is it workable?
Yes!
20%
 20%  [ 1 ]
No!
40%
 40%  [ 2 ]
Will give it a try!
40%
 40%  [ 2 ]
Total Votes : 5

Author Message
phatez
Junior Member


Joined: 07 Jun 2007
Posts: 49

PostPosted: Thu Jul 19, 2007 9:02 pm    Post subject: [MSN] --> (possible solution to be able to chat using pho Reply with quote

I know that msn live messenger or messenger plus store chat logs. These chat logs are updated as soon as the message is send out.

If there is any way to find out how they wrote to the chat log, or any way to get the information from the chat log(reading from html, txt) in between interval, Salling clicker can then send the chat logs information to the phone and display it there.

Replying to message will be simple, just integrate my typing script into it.

Due to my limited knowledge in javascript, i cannot get this done. So i hope someone can do a script like what i describe and it will really be a big benefit for all of us.
Back to top
View user's profile Send private message
alejoar
Senior Member


Joined: 19 Jun 2007
Posts: 62

PostPosted: Thu Jul 19, 2007 9:30 pm    Post subject: Reply with quote

That would be great!!

And Im sure that if its done and works, it would be one of the most downloaded scripts ever.. I wish I have the skil to do it xD

Ive been wating for something like this for a long time :D
Back to top
View user's profile Send private message
Runarius
Senior Member


Joined: 19 Nov 2006
Posts: 124

PostPosted: Fri Jul 20, 2007 9:24 pm    Post subject: Reply with quote

I'm willing to give this a try... was thinking about writing a script for msn a while back, but I didn't think it would be that many that would like it so I never started. I just gave the .html file which msn plus generates a quick look, and I could easaly get that message to show up on the phone. The only problem I see is that how will I know who is sending me a message? For instance, lets say my friend Bob is sending me a message. I would then have to check everyfile in the messagelog file to see if any of them has been updated the last second.

1. import the last piece of message from every .html file and store in in a variable, then the next time it checks the file, it will will compare the last message in every .html file with the data that was stored in the variable and check if any of them has changed. If they have, send that message to the phone, and store the last message from every html in the variable for the next time.

This is probably the best way to do it, atleast if we are going to use the logs. This way, if messages are recieved from multiple different persons within the same second, the script would know. But if two or more messages are recieved from the same person within the same second, I would have to store more than the last message in the variable for every check, maybe the last five or so.


I am currently working on this.
Back to top
View user's profile Send private message
alejoar
Senior Member


Joined: 19 Jun 2007
Posts: 62

PostPosted: Sat Jul 21, 2007 12:30 am    Post subject: Reply with quote

What about making a script for msn plus? I have 0 knowledge on programing, but I think it could be done some script that puts in a single txt file the latest messages recived so that you dont have to check for every log file, something like this:

<contact email/nick> <time> <message>
<contact email/nick> <time> <message>
<contact email/nick> <time> <message>
.
.
.

Then display in the phone only the lines of the desired contact you want to talk to.

That should solve the problem of displaying the message.

I think the real issue is to send the message to a specific contact, I have no clue on how to solve this.
Back to top
View user's profile Send private message
Runarius
Senior Member


Joined: 19 Nov 2006
Posts: 124

PostPosted: Sat Jul 21, 2007 1:56 am    Post subject: Reply with quote

yeah, that sounds good... At the moment I am just about finished with this my salling script for msn... I can view the last recieved message. Can't send a message though.
Back to top
View user's profile Send private message
Runarius
Senior Member


Joined: 19 Nov 2006
Posts: 124

PostPosted: Sat Jul 21, 2007 2:31 am    Post subject: Reply with quote

Noticed a big problem about using the log. It is reeeeeaalllly slow to update. I think I will wait to finish this script untill somebody writes an msn-plus-script for it, and also, we have no way of talking back to whoever is talking to us, so the point is simply gone.

If anybody is interested in making the msn-plus-script, please make sure the time of when the message was recieved must display the seconds of when it was recieved, not only the hours and minutes.
Back to top
View user's profile Send private message
phatez
Junior Member


Joined: 07 Jun 2007
Posts: 49

PostPosted: Sat Jul 21, 2007 7:18 am    Post subject: Reply with quote

What about checking the last modified time of every html file instead of going in every html file to check?
Back to top
View user's profile Send private message
phatez
Junior Member


Joined: 07 Jun 2007
Posts: 49

PostPosted: Sat Jul 21, 2007 7:20 am    Post subject: Reply with quote

Runarius can you send me the script u have done so far for this? I wanna take a look at how it is done. Cuz i've done some research and try out but cannot make my ideas work. Thanks.
Back to top
View user's profile Send private message
alejoar
Senior Member


Joined: 19 Jun 2007
Posts: 62

PostPosted: Sat Jul 21, 2007 8:53 am    Post subject: Reply with quote

[b]Runarius[/b]:

Ive been working on a script for msn plus that can do what I told in my previous post. It works exactly as I mention except for the time :S. Unfortunately I was not able to add the time to the lines, but I will continue working on this tomorrow. In the meantime take a look at how it works and decide if it helps or if its useless.

You can install it as a normal msn plus live script, just extract the rar and double click the "plsc" file.

Hope it helps.

PS: The txt file is stored in plugins/salling under the Messenger Plus! Live folder, and it is formated everytime you open/close msn messenger.



salling.rar
 Description:

Download
 Filename:  salling.rar
 Filesize:  1.03 KB
 Downloaded:  1107 Time(s)

Back to top
View user's profile Send private message
alejoar
Senior Member


Joined: 19 Jun 2007
Posts: 62

PostPosted: Sat Jul 21, 2007 9:38 am    Post subject: Reply with quote

Ive been researching a bit more and noticed that you can send messages to specific contacts from a msn-plus-script. This could help for the msn script for salling, the question is, how to make them both interact?

How to make a conection between salling and msn-plus to tell it to send the message?

If someone has any ideas please tell!!
Back to top
View user's profile Send private message
alejoar
Senior Member


Joined: 19 Jun 2007
Posts: 62

PostPosted: Sat Jul 21, 2007 9:44 am    Post subject: Reply with quote

I just came up with something!!

What about a comon txt file for both salling clicker and msn plus?


Salling clicker updates the file with something like this:

<destination contact> <message>

Then the msn-plus-script checks the file, lets say every 5 seconds, and when it finds something, sends the message and formats the file.

I think this could really work. Im not sure, but maybe I could take care of the msn-plus script.


Sory for the triple post, I need to write this ideas so I dont forget later :P
Now Im going to sleep, it is very late here xD
Back to top
View user's profile Send private message
phatez
Junior Member


Joined: 07 Jun 2007
Posts: 49

PostPosted: Sat Jul 21, 2007 10:52 am    Post subject: Reply with quote

Hey alejoar i took a look at your script and i help you added the time in. You can take a look at the changes that i made in your script.


salling.js
 Description:

Download
 Filename:  salling.js
 Filesize:  2.13 KB
 Downloaded:  927 Time(s)

Back to top
View user's profile Send private message
phatez
Junior Member


Joined: 07 Jun 2007
Posts: 49

PostPosted: Sat Jul 21, 2007 12:10 pm    Post subject: Reply with quote

This is some modification of the msn plus script. The idea is there. But ...
This line
var a = ReadFile("salling_log.txt");
if (a.substr(0 , 7) == "<Reply>")
ChatWnd.SendMessage(a);
must be put somewhere else to keep checking whether clicker script has edit the salling.txt and put the reply inside then output it to the person.



[code:1]//Global Variables
var fsObj = new ActiveXObject("Scripting.FileSystemObject");

//Functions
function AddLineToFile (file, line) {
if (!fsObj.FileExists(MsgPlus.ScriptFilesPath + '\\' + file))
var fileObj = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, 2, 1);
else
var fileObj = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, 8, 0);
fileObj.WriteLine(line);
fileObj.Close();

}
function ReadFile (file) {
var ForReading = 1, ForWriting = 2;
f = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, ForReading);
r = f.ReadAll();
return(r);
}

function OnEvent_Initialize(MessengerStart) {
fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + "salling_log.txt", 2, 1);
}

///////Take note this part. Most impt.//////////////////////////
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind) {
if(Origin != Messenger.MyName)
{
var d = new Date();
hour = d.getHours();
min = d.getMinutes();
sec = d.getSeconds();
time = hour+":"+min+":"+sec;
var RecMessage = "<"+time+">"+"<" + Origin + ">" + " " + Message ;
AddLineToFile("salling_log.txt", RecMessage);
var a = ReadFile("salling_log.txt");
if (a.substr(0 , 7) == "<Reply>")
ChatWnd.SendMessage(a);

}
}
///////////////////////////////////////////////////////////////////////



function OnEvent_Uninitialize(MessengerExit) {
fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + "salling_log.txt", 2, 1);
}[/code:1]
Back to top
View user's profile Send private message
Runarius
Senior Member


Joined: 19 Nov 2006
Posts: 124

PostPosted: Sat Jul 21, 2007 2:34 pm    Post subject: Reply with quote

heh, now, I really got annoyed... actually finished my salling script. well, finished it is not the right word. for now it works with the log. it is really slow though, mostly, getting a message to show up on the phone takes about 30 seconds, since the log isn't updated as often as one would like. I'll just post my script here. From it, you get a notification on your phone when the message is recieved, which includes the e-mailadress of the person you recieved the message from, the nickname of that person, and the message he or she wrote. Also, if they send you only a smiley, it will just say that they sent you a smiley, just becouse people tend to do that and the formating in html is changing if a person sends a smiley, so I would have to change it. The last piece of message you will se on the phone is actually just the code that was extracted from the log, that I just use for testing purposes. I hope my little script helps you develop your script. I only have some sparetime today and tumorrow, after that, I won't get some sparetime in two weeks, so I won't be able to script in the meantime. Maybe today and tumorrow, but I hope somebody else will take this on.

These are the features I want in the msn-plus-script:
[list]A single textfile which holds the last messages recieved, who it is from(nickname and e-mailadress), and the time in seconds I also would like the another textfile which holds the exact same, but only the messages that has been sent instead.
Another textfile which shows who is online(nickname, e-mail and status)
And one textfile which should be used to send messages to others, in which salling clicker just stores who the message is going to, and the message itself. MSN plus will then check this file every five second or so(or we could have it check it every second IF salling clicker is active or something like that). After MSN plus has checked the file and found a message inside that should be sent, it sends the message, and then it deletes all contents of that file, so that it doesn't send the message twice. Also, that way, salling clicker could know that the message was actually sent.[/list:u]



MSN Messenger.zip
 Description:

Download
 Filename:  MSN Messenger.zip
 Filesize:  1.91 KB
 Downloaded:  1037 Time(s)

Back to top
View user's profile Send private message
alejoar
Senior Member


Joined: 19 Jun 2007
Posts: 62

PostPosted: Sat Jul 21, 2007 9:00 pm    Post subject: Reply with quote

Runarius, your script doesnt seem to be working with me. The only thing I noticed was that the var browsePath was set to your exact needs.

Anyways, I dont have time today, but Ill try to work on your msn-plus-script request asap.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Goto page 1, 2, 3, 4, 5, 6, 7  Next
Page 1 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group