[vbs/html] MSN messenger list in Active desktop.

Pagina: 1
Acties:

  • Vampier
  • Registratie: Februari 2001
  • Laatst online: 20-04-2015

Vampier

poke-1,170

Topicstarter
ik heb de volgende code geschreven voor MSN messenger
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script language="vbscript">

function Online()

Set objMSNMsgr=createobject("Messenger.MsgrObject")
Set Users =objMSNMsgr.List(MLIST_ALLOW)
document.write "<table  border=""0"" align=""right""><tr><td colspan=""2"">"
document.write "<p class=""big"">"

if objMSNMsgr.LocalState=1 then document.write"You are offline"
if objMSNMsgr.LocalState=2 then document.write"You are online"
if objMSNMsgr.LocalState=6 then document.write"You appear offline"
if objMSNMsgr.LocalState=10 then document.write"You are busy"
if objMSNMsgr.LocalState=14 then document.write"You are brb"
if objMSNMsgr.LocalState=50 then document.write"You are on the phone"
if objMSNMsgr.LocalState=66 then document.write"You are out to lunch"

document.write "</td></tr></p>"

For i = 0 To Users.Count - 1
If Users.Item(i).State <> 1 then 
document.write"<tr><td>"
if Users.Item(i).State=2 then document.write "[img]""images/online1.gif""[/img]"
if Users.Item(i).State=34 then document.write "[img]""images/idle1.gif""[/img]"
if Users.Item(i).State=18 then document.write "[img]""images/idle1.gif""[/img]"
if Users.Item(i).State=66 then document.write "[img]""images/idle1.gif""[/img]"

'document.write Users.Item(i).State

document.write "</td><td class=""small"">" & Users.Item(i).FriendlyName 
document.write"</td></tr>"
end if
next

'Users.Item(i).State
'Users.Item(i).FriendlyName
'Users.Item(i).LogonName

document.write "<tr><td colspan=""2""><p class=""smallwhite""><b>" & objMSNMsgr.UnreadEmail(0) & " new e-mails</b></p></td></tr>"


'msgbox (objMSNMsgr.UnreadEmail(0))
document.write "</table>"
end function
</script>

Nu wil ik als ik op een naam duw een chat window openen. Iemand enig idee hoe ik dat het beste kan doen?

Weet ook iemand hoe je een VB script zichzelf om de 15 seconden laat aanroepen? (ik gebruik nu een meta refresh van 30 seconden)

alvast bedankt.

  • Vampier
  • Registratie: Februari 2001
  • Laatst online: 20-04-2015

Vampier

poke-1,170

Topicstarter
okay ik zal de vraag specificieren.

Welke VBs functie kan ik gebruiken om een MSN messenger chat window te openen?

  • Dark Blue
  • Registratie: Februari 2001
  • Laatst online: 23-08 22:18

Dark Blue

Compositionista!

Alpenmeisje

probeer eerst maar es met javascript een popup...dan kun je daar toch weer elementen in gaan zetten... kun je niet gewoon vanuit vb een nieuw boxje laten komen?

ik ken geen vbs, (das toch iets met vb?) maar wel html, maar wat je nu wilt... dát kan ik niet...

betere tip: probeer het bij de buren hier in P&W! meer succes denk ik...

heidiulrich.nl | adventura.nl : rugzakavonturen | pathwise.nl : prepping geeks to get jobs


  • WOmBaT
  • Registratie: September 2000
  • Laatst online: 30-11-2025

WOmBaT

Nyaaa!!!

[topic=391553/1/25]

Hier kun je een mooi pakket downloaden, waar ook een html bestandje inzit met een MSN list... Daar kun je volgens mij ook mee wat jij wilt hebben, dus kijk even in die code :)

Verwijderd

Netscape e.d. gaat dat dus niet waarderen he.

  • WOmBaT
  • Registratie: September 2000
  • Laatst online: 30-11-2025

WOmBaT

Nyaaa!!!

[b]Op zaterdag 13 april 2002 21:10 schreef Vampier Weet ook iemand hoe je een VB script zichzelf om de 15 seconden laat aanroepen? (ik gebruik nu een meta refresh van 30 seconden)
Zoek eens bij google
http://www.google.com/search?sourceid=navclient&querytime=fE8k0B&q=settimeout
Met een settimeoutfunctie kun je een andere functie om de zoveel milliseconden aanroepen:
So, you want to set things to happen after a certain amount of time? Well, the setTimeout function can help you create some nice scripts that will use time delays to make things happen. Let's take a look at how to call the setTimeout function:

setTimeout("yourfunction()",1000);

The first parameter is a string, which is going to be the function you want to use. This function was named "myfunction()". The second parameter is a number. This number is going to be the number of milliseconds the browser should wait before executing your function. Above, we have 1000 milliseconds, which will be 1 second.

Now, what can you do with it? Let me start with an example that shows you the setTimeout function in action. Click the button to the right of the text box below and watch what happens!
:)

Verwijderd

Op zondag 14 april 2002 11:39 schreef Tizzwat het volgende:
Netscape e.d. gaat dat dus niet waarderen he.
Ik heb ook nog nooit een active-desktop gezien in Windows die gebruik maakte van Netscape...

Verwijderd

Op zondag 14 april 2002 12:49 schreef WOmBaT het volgende:

[..]

Zoek eens bij google
http://www.google.com/search?sourceid=navclient&querytime=fE8k0B&q=settimeout
Met een settimeoutfunctie kun je een andere functie om de zoveel milliseconden aanroepen:
[..]

:)
Ik kan me vergissen, maar volgens mij is dat JavaScript-only. VB-script is toch echt wat anders ;). Volgens mij zit er in VB-script ook geen 'timer' functie :?...

  • Thijsmans
  • Registratie: Juli 2001
  • Laatst online: 12:40

Thijsmans

⭐⭐⭐⭐⭐ (5/5)

Privacy-adepten vinden op AVGtekst.nl de Nederlandse AVG-tekst voorzien van uitspraken en besluiten.


  • Vampier
  • Registratie: Februari 2001
  • Laatst online: 20-04-2015

Vampier

poke-1,170

Topicstarter
Ik heb nu jscript en vbscript door elkaar gebruikt. Met innerHTML vervang ik de inhoud van een DIV om de 15 seconden. Werkt nu goed... alleen nog de pop-up voor messenger chat windows... thanx voor jullie hulp tot nu toe :)

Ik blijf dus met het probleem zitten van het openen van de chat windows. Die code van active desktop is 'gejat' van MSN fanatics... die had ik al doorgeploegd maar kwam er niet uit.

Hier is de code voor de nieuwsgierige mensen.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<html>
<head>
<title></title>
<style type="text/css">
  .small { margin-left:0; margin-right: 0; font-family: Verdana, sans-serif; font-size: 10; color:#ffff00;}
  .big { margin-left:0; margin-right: 0; font-family: Verdana, sans-serif; font-size: 20; color:#ffffff;}
  .smallwhite { margin-left:0; margin-right: 0; font-family: Verdana, sans-serif; font-size: 10; color:#ffffff;}
</style>
<script language="JavaScript">
function tijd() {
var time = new Date ();
var uur = time.getHours();
var min = time.getMinutes();
var sec = time.getSeconds();
  if (uur<10) {uur='0'+uur}
  if (sec<10) {sec='0'+sec}
  if (min<10) {min='0'+min}

var clock= uur+":"+min+":"+sec;
document.getElementById("block").innerHTML='<font face="verdana" color="#ffffff" size="1"><b>'+clock+'</b></font>';
setTimeout('tijd()',900);
}

function runmsn(){
Online()
tijd()

msnOnline.style.left = (screen.width-400);
msnOnline.style.top = 100;

setTimeout('runmsn()',15000);
}


</script>

<script language="vbscript">
function Online()

Dim strMsnOnline

Set objMSNMsgr=createobject("Messenger.MsgrObject")
Set Users =objMSNMsgr.List(MLIST_ALLOW)

strMsnOnline= "<SPAN style=""FILTER: progid:DXImageTransform.Microsoft.BasicImage(Opacity=0.65); HEIGHT: 64px;"">"
strMsnOnline=strMsnOnline & "<table  border=""0"" background=""images/msn_back.jpg"" width=""300""><tr><td colspan=""2"">"
strMsnOnline=strMsnOnline & "<p class=""big"">"

'msgbox objMSNMsgr.LocalState

if objMSNMsgr.LocalState=1 then strMsnOnline=strMsnOnline & "Your messenger is offline"
if objMSNMsgr.LocalState=2 then strMsnOnline=strMsnOnline & "You are online"
if objMSNMsgr.LocalState=6 then strMsnOnline=strMsnOnline & "You appear offline"
if objMSNMsgr.LocalState=10 then strMsnOnline=strMsnOnline & "You are busy"
if objMSNMsgr.LocalState=14 then strMsnOnline=strMsnOnline & "You are away"
if objMSNMsgr.LocalState=34 then strMsnOnline=strMsnOnline & "You are away"
if objMSNMsgr.LocalState=50 then strMsnOnline=strMsnOnline & "You are on the phone"
if objMSNMsgr.LocalState=66 then strMsnOnline=strMsnOnline & "You are out to lunch"

strMsnOnline=strMsnOnline & "</td></tr></p>"

For i = 0 To Users.Count - 1
If Users.Item(i).State <> 1 then 
strMsnOnline=strMsnOnline & "<tr><td>"
if Users.Item(i).State=2 then strMsnOnline=strMsnOnline & "[img]""images/online1.gif""[/img]"
if Users.Item(i).State=10 then strMsnOnline=strMsnOnline & "[img]""images/busy1.gif""[/img]"
if Users.Item(i).State=14 then strMsnOnline=strMsnOnline & "[img]""images/idle1.gif""[/img]"
if Users.Item(i).State=34 then strMsnOnline=strMsnOnline & "[img]""images/idle1.gif""[/img]"
if Users.Item(i).State=18 then strMsnOnline=strMsnOnline & "[img]""images/idle1.gif""[/img]"
if Users.Item(i).State=66 then strMsnOnline=strMsnOnline & "[img]""images/idle1.gif""[/img]"

strMsnOnline=strMsnOnline & "</td><td class=""small"">" & Users.Item(i).FriendlyName 
strMsnOnline=strMsnOnline &"</td></tr>"

end if
next

'Users.Item(i).State
'Users.Item(i).FriendlyName
'Users.Item(i).LogonName

on error resume next

if objMSNMsgr.UnreadEmail(0)<>-1 then 
  strMsnOnline=strMsnOnline & "<tr><td colspan=""2""><p class=""smallwhite""><b>" & objMSNMsgr.UnreadEmail(0) & " new e-mail(s)</b></p></td></tr>"
end if

strMsnOnline=strMsnOnline & "<tr><td /></td><td align=""right""><div id=""block""></div></td></tr>"
strMsnOnline=strMsnOnline & "</table></span>"


if (strMsnOnline)<>(document.getElementById("msnOnline").innerHTML) then
  document.getElementById("msnOnline").innerHTML = strMsnOnline
end if

end function

</script>

<head>
<body background="scripting.jpg" bgcolor="#000000" onLoad="runmsn()" >
<div id="msnOnline" style="position:absolute;top:100px;left:900px;z-index:1;"></div>
</body>
</html>

  • Vampier
  • Registratie: Februari 2001
  • Laatst online: 20-04-2015

Vampier

poke-1,170

Topicstarter
Weet niemand hoe je met een activeX object de chat-windows van MSN laat verschijnen?

  • Vampier
  • Registratie: Februari 2001
  • Laatst online: 20-04-2015

Vampier

poke-1,170

Topicstarter
code:
1
2
3
4
5
6
7
8
9
<OBJECT classid="clsid:FB7199AB-79BF-11d2-8D94-0000F875C541" codeType=application/x-oleobject id=MsgrApp width=0 height=0></OBJECT>

</OBJECT>

<script language="vbscript">

MsgrApp.LaunchAddContactUI("add@e-mail.here")
MsgrApp.LaunchIMUI("msn@msn.com")
</script>

Bedankt voor het antwoord :(
Pagina: 1