Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MSN Plugin
#1
The long requested MSN plugin.

1. Description:

Use this plugin to extract data from MSN (or Windows Live) Messenger.
Tested with Windows Live Messenger 8.1.

2. Commands:

All the commands are accessible in Plugins section of LCDHype.

Note that the plugin collects from the time you start it until the script change. If you don't call %Param.AvoidPluginCleanUp(), everytime a script changes to another one, all the events will reset. So, consider %Param.AvoidPluginCleanUp() as OBLIGATORY!

3. Examples:

This will give you your MSN name
%UsePlugin('msn\msn.dll',MyInfo, Name)

This will give you your contact count in MSN
%UsePlugin('msn\msn.dll',ClientCount)

for extended example see "ExampleScript.txt". It's best viewed on 640x480 screen (for test only).


4. Installation:

Place the files in LCDHypeFolder\plugins\MSN\ ,
restart LCDHype and you should see the plugin in the plugins section of LCDHype
(by the name of MSN).


5. Credits:
- Special thanks to TheSteve from http://forums.fanatic.net.nz/
- thanks to adolfotregosa and NotebookReview.com

6. Version History
- 0.9.3: [19 May 08 20:50]Fixed crashing of LCDHype when MSN trying to connect
- 0.9.2: fixed plugin cleaning section
- 0.9.1: fixed chat history bug
- 0.9.0: first version

Here's an example code for 128x32 screen (Asus G-series OLED)
CODE

#Header
%CleanUp.ClearVRAM()
%Common.SetPriority(18)
%LCD.Gfx_SetTextArea(0,0,127,31)
%Param.RenderMode(Full)
%CleanUp.ClearInputBuffer(All)
%Param.AvoidPluginCleanUp()
%Graph.SetInvertArea(1,1,127,11)

%UsePlugin('GLED\GLED.dll',LED, 0, 1)
%Graph.Font('Arial',7,1)


%DefVar(stime=%System.Uptime())
%DefVar(firstlineset=0)
%DefVar(firstline='')
%DefVar(firstlinecontact='')
%DefVar(bAnswered=0)
%DefVar(lastchatcount=0)
%DefVar(chatevent=0)
%DefVar(i=0)
#EndHeader

#GfxMode


/MSN/
%Common.CreateNewLine(,3,1)
'MSN: '
%Common.CreateNewLine(,28,1)
%Param.EnableScrolling(Horizontal,Ticker,0.6,100,1,0)
/%Format.AlignCenter()/
%UsePlugin('MSN\MSN.dll',MyInfo, Name)
'     '
/ ' ['
%UsePlugin('msn\msn.dll',MyInfo, Status)']   '/


%Common.CreateNewLine(,1,11)
%Format.AlignLeft()
%Graph.Font('Small Fonts',6,1)
'Status:' %UsePlugin('MSN\MSN.dll',MyInfo, Status)

%Common.CreateNewLine(,92,2)
%Format.AlignLeft()
%Graph.Font('Small Fonts',6,1)
'Chats: ' %UsePlugin('MSN\MSN.dll',ChatCount)

%Common.CreateNewLine(,92,11)
%Format.AlignLeft()
%Graph.Font('Small Fonts',6,1)
'Inbox: ' %UsePlugin('MSN\MSN.dll',UnreadEmails)

%If((%UsePlugin('msn\msn.dll',ChatCount) ! %lastchatcount()))
Then{
    %Assign(chatevent, 1)
    %Assign(lastchatcount, %UsePlugin('msn\msn.dll',ChatCount))
    %Assign(firstlineset, 0) / clear Run Once /
    }
%If( %lastchatcount() = 0)
Then{
 %Assign(firstchatline, '')
}

%If( %UsePlugin('msn\msn.dll',ChatCount) ! 0)


Then {
%If(%chatevent() ! 0)
Then{
    / this will set i with the last chat number /
   %Assign(i, %Dec(%UsePlugin('msn\msn.dll',ChatCount),1))
   
   %Assign(firstline,
   %firstline() ' ** '
   %UsePlugin('msn\msn.dll',ChatInfo, Name, %i()) /here we get the last chat contact /
    ' says: '
    %UsePlugin('msn\msn.dll',ChatLine, %i(), %Dec(%UsePlugin('msn\msn.dll',ChatTextLines, %i()),1) )  ) / here the message /
    %Assign(chatevent, 0)
   %UsePlugin('GLED\GLED.dll',LED, 1, %chatevent())
   %Assign(firstlineset, 1)
   }  
}
         
Else{%If(%UsePlugin('msn\msn.dll',ChatCount) = 0 )
     Then{%Assign(firstline, '')
          %Assign(firstlineset, 0)
          }}
         

/ test if "I" write in any of the chats detected /
%Loop.For(i, 0, %Dec(%UsePlugin('msn\msn.dll',ChatCount),1), 1)
{                      
%Assign(bAnswered,%Inc(%bAnswered(),%String.Pos(%UsePlugin('msn\msn.dll',MyInfo, Name),
          %UsePlugin('msn\msn.dll',ChatLine, %i(), %Dec(%UsePlugin('msn\msn.dll',ChatTextLines, %i()),2)))))
}

/ if "I" did answer to someone, clear anything from the screen /
%If(%bAnswered() > 0)
Then{%Assign(firstlineset, 1)
    %Assign(firstline, '')
    %Assign(bAnswered, 0)
    %UsePlugin('GLED\GLED.dll',LED, 1, 0)
    }
   

%Common.CreateNewLine(,2,18)
%Graph.Font('Arial',8,1)
%Param.EnableScrolling(Horizontal,Ticker,1,125,1,0)%firstline()'          '

#EndGfxMode


The example script shows on the screen the first posted message from any window that opens up (also if you have GLED plugin it will light up the blue mail led). If more than one contact writes to you it will scroll all the (first) messages posted to you. The line that shows the messages will be cleared as soon as you answer to any of the contacts.

Please rename the file to .rar after downloading it


Attached Files Thumbnail(s)
   

.rar__   MSNPlugin_0.9.3.rar__ (Size: 73,49 KB / Downloads: 2.049)


Forum Jump:


Users browsing this thread: 1 Guest(s)