Shoutbox

Creating Plugin [Help Req. Please] - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Creating Plugin [Help Req. Please] (/showthread.php?tid=46296)

Creating Plugin [Help Req. Please] by XM4ST3RX on 06-14-2005 at 07:08 PM

Hi,

I'm currently creating a plug-in named "Apptify" that will notify users of which app's users running Apptify are currently running (selected app's with custom away msg).

Now because of the way im doing it, im trying to open a conversation with a random contact which is on the allow list and send a msg.

But the code im using doesnt seem to be working fully and was wondering if someone could help me please.


code:
Dim iCont As IMessengerContact
                    For Each iCont In modAppList.MSGR.MyContacts
                        If iCont.Blocked = False Then
                            'modAppList.MSGR.InstantMessage iCont.SigninName
                            MsgBox "ok"
                            MsgBox iCont.SigninName
                        Exit For
                        End If
                    Next


What happens is the plugin scans the list of running process's to find out if the users selected app's are running or not, if it is then it will procede to the code above. (every X seconds)

What happens with the code above is i recieve 1 msgbox with the value "ok", but then when it should scan again and find it again, it doesnt.. messenger freezes. Also im wondering why iCont.SigninName isnt retrieving the contacts email address.

I hope this is understandable and thanks in advance for anyones help.


Kind Regards,
XM4ST3RX
RE: Creating Plugin [Help Req. Please] by Stigmata on 06-14-2005 at 07:28 PM

that wont show a random contact btw...

i had a little play around and came up with this..

code:
Dim nRandom As Long
Dim num, count  As Integer

Dim MSNC As IMessengerContact
Dim MSNCs As IMessengerContacts
Set MSNCs = MessengerAPI.Messenger.MyContacts

num = MessengerAPI.Messenger.MyContacts.Count
nRandom = Int(Rnd * num)
count = 1
For Each MSNC In MSNCs
If count = nRandom Then
If MSNC.Blocked = False Then
'MessengerAPI.Messenger.InstantMessage(MSNC.Siginname)
Msgbox "Ok" & vbnewline & MSNC.Signinname
End If
Else
count = count + 1
End If
Next


RE: Creating Plugin [Help Req. Please] by Dempsey on 06-14-2005 at 08:42 PM

quote:
Originally posted by Stigmata
that wont show a random contact btw...
yea it doesnt have to actually be random, the code just finds the first person who's in the contact list who isn't blocked.
RE: Creating Plugin [Help Req. Please] by XM4ST3RX on 06-14-2005 at 08:46 PM

Hi,

MSN Messenger still causes an error and has to quit.
Someone pleaaase helpp!!! :(


Kind Regards,
XM4ST3RX


RE: Creating Plugin [Help Req. Please] by Yousef on 06-14-2005 at 09:16 PM

Add me to msn (see profile), I might be able to help you :)