Shoutbox

Plugin - Help Needed, Plugins Load But Not MsgPlus? - 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: Plugin - Help Needed, Plugins Load But Not MsgPlus? (/showthread.php?tid=28656)

Plugin - Help Needed, Plugins Load But Not MsgPlus? by mopflash on 07-14-2004 at 01:10 PM

Okz i got it to work and i found out why it wasnt working before, it was because i was trying to call the MyFriendlyName API when messenger wsant signed in.
Now that ive fixed that does anyone know a better way to change your name than to make a convo window type /nick and change it? Because that method is much to slow and invonvienent for what im trying to do.
Thanks, when im done i will submit as much opensource as i think could help anyone starting out.
Ive already made some nice stuff, but does anyone know how u send multiple variables to a function eg:

code:
Public Function Thingy(1stvar As String, 2ndvar As String)
blah blah
End Function
------
Thingy(blahblah,blehbleh)

I can only get this to work if i only send one variable.

And also does anyone know how u can add a html link into a label?
RE: Devlopment of Song2Name plugin (Visual Basic) by Dempsey on 07-14-2004 at 03:18 PM

functions should work fine with multiple variables :s

and use shellexecute to open a webpage


RE: Devlopment of Song2Name plugin (Visual Basic) by mopflash on 07-14-2004 at 03:42 PM

Thanx dude, btw i just need 2 know 1 more thing ;)
How do u detect when messengers signed in?
i tried that Event OnSignin thing but i dont know how to use it.
This is my 2nd day in vb ;) And thats all i need to submit my first version of my plugin!


RE: Devlopment of Song2Name plugin (Visual Basic) by Stigmata on 07-14-2004 at 03:49 PM

they is already a song to name plugin...it was made by leamond..
(first plugin i ever tested)

then in version 2. it was helped along by dj mystic


RE: Devlopment of Song2Name plugin (Visual Basic) by mopflash on 07-14-2004 at 03:52 PM

Yer i saw that, but all the ones ive seen dont do i want them to do, and i think its a pretty cool way to pick up my skills.
So do u know how to detect when u signon?


RE: Devlopment of Song2Name plugin (Visual Basic) by Stigmata on 07-14-2004 at 03:57 PM

yes

i do

code:
private msn as messengerapi

private sub msn_OnMyStatusChange(hr As Long, mMyStatus As MISTATUS)
if mMyStatus = MISTATUS_ONLINE then
msgbox " jwb rox0rs :P "
end if
end sub


something like that :P

edit: forgot end if :p such a noob :P
RE: Devlopment of Song2Name plugin (Visual Basic) by Dempsey on 07-14-2004 at 04:00 PM

or u could use initalize, as plugins are loaded after signin


RE: Devlopment of Song2Name plugin (Visual Basic) by mopflash on 07-14-2004 at 04:10 PM

hmm thats still not detecting it i changed it to:

code:
Private Sub messengerapi_OnMyStatusChange(hr As Long, mMyStatus As MISTATUS)
If mMyStatus = MISTATUS_ONLINE Then
Check1.Enabled = True
Else
Check1.Enabled = False
End If
End Sub

And Check1 remains disabled.
And also all the contacts in my contactlist are duplicated so theres 2 of them, do u know y this happens or is it my code?
RE: Devlopment of Song2Name plugin (Visual Basic) by mopflash on 07-14-2004 at 04:12 PM

[qoute]
or u could use initalize, as plugins are loaded after signin


Thats actually what im doing, but my plugin loads b4 messenger even starts to sign in.
RE: Devlopment of Song2Name plugin (Visual Basic) by Phrive on 07-14-2004 at 04:25 PM

totally off topic i know but what vb software do you use? and wats the best? willing to pay for one so i dnt mind


RE: Devlopment of Song2Name plugin (Visual Basic) by mopflash on 07-14-2004 at 04:29 PM

At the moment im usin Visual Basic from 'Visual Studio 6 2003 Enterprise'


RE: Devlopment of Song2Name plugin (Visual Basic) by Phrive on 07-14-2004 at 04:40 PM

any other links cant find many on the internet i had one b4 but i cnt member wat its called


RE: Devlopment of Song2Name plugin (Visual Basic) by mopflash on 07-14-2004 at 04:42 PM

I dont think you would be allowed to ask for pirated material here, and im really trying to get an answer to how u detect when u login!


RE: Devlopment of Song2Name plugin (Visual Basic) by Stigmata on 07-14-2004 at 05:02 PM

u can get vb 2005 :)

http://shoutbox.menthix.net/showthread.php?tid=27887


best of all its freee :)


RE: HELP NEEDED! Detect when u sign in by Millenium_edition on 07-14-2004 at 07:42 PM

quote:
Originally posted by mopflash
This is my 2nd day in vb
Why don't you start over with some easier stuff than a plugin. For a start: hello world...
quote:
Originally posted by mopflash
And also all the contacts in my contactlist are duplicated so theres 2 of them, do u know y this happens or is it my code?
That's a server-side bug.
quote:
Originally posted by mopflash
im really trying to get an answer to how u detect when u login!
start with something easier, messengerapi_OnMyStatusChanged can never be raised and you don't even know why. Learn vb and OOP and then learn developing plugins
RE: HELP NEEDED! Detect when u sign in by RaceProUK on 07-14-2004 at 09:47 PM

You've got to remember to include a reference to 'Messenger API Type Library', and then declare a variable:
    Dim MSN As Messenger
Then, in Initialize:
    Set messenger = oMessenger
Then you can use the event.


RE: HELP NEEDED! Detect when u sign in by mopflash on 07-15-2004 at 06:58 AM

Yes i have got reference to the Messenger API
and  this is the code im using to load it.

code:
Option Explicit
Private WithEvents objMessenger As MessengerAPI.Messenger

Then inside my forms load:
code:
Set objMessenger = New MessengerAPI.Messenger


And with this code check1.enabled always equals false even on login (this is using modifiend code of jackass_wanabee's on page 1:
code:
Private Sub messengerapi_OnMyStatusChange(hr As Long, mMyStatus As MISTATUS)
If mMyStatus = MISTATUS_ONLINE Then
Check1.Enabled = True
Else
Check1.Enabled = False
End If
End Sub


RE: HELP NEEDED! Detect when u sign in by mopflash on 07-15-2004 at 07:00 AM

And 'Millenium_edition' instead of quoting stuff ive said and then saying how stupid i am, y dont u help me become smarter, by giving me some code examples and help me fix my problem!


RE: HELP NEEDED! Detect when u sign in by mopflash on 07-15-2004 at 07:56 AM

Okz ive fixed everything up now it works fine, except that all the MsgPlus plugins load but not MsgPlus, and in the messenger window all the contacts are duplicated and if you try to do something the messenger window goes black and freezes. What did i do? i have my plugin loading from a if in the initialize function by 'Config.Show VbModal'


RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by RaceProUK on 07-15-2004 at 09:28 AM

quote:
Originally posted by mopflash

Then inside my forms load:
code:
Set objMessenger = New MessengerAPI.Messenger


Don't do it this way; in Initialize, use
code:
Set objMessenger = oMessenger

This way, you should hopefully avoid some of the problems you're describing, and also stop Windows Messenger starting on XP machines.
RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by mopflash on 07-15-2004 at 10:03 AM

Oh sorry i forgot to say that i fixed that i used this:

code:
OnlineSTAT = MISTATUS_ONLINE
CurrentSTAT = objMessenger.MyStatus
If CurrentSTAT = OnlineSTAT Then
'i am online
Else
'i am offline
End If

I used that with my previous code.

All i need now is to find out a way to boot up my form on msgplus load. And a easy/quick way to change your nickname.
RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by Millenium_edition on 07-15-2004 at 10:11 AM

quote:
Originally posted by mopflash
And 'Millenium_edition' instead of quoting stuff ive said and then saying how stupid i am, y dont u help me become smarter, by giving me some code examples and help me fix my problem!
Because then you'll just copy-paste it and take the risk to not even credit these forums. See, the point is, you don't even know what you're doing when using
code:
Set objMessenger = New MessengerAPI.Messenger

Btw, join programming forums, they'll all tell you it's better to start off with some easy stuff;
RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by RaceProUK on 07-15-2004 at 10:56 AM

quote:
Originally posted by mopflash
All i need now is to find out a way to boot up my form on msgplus load. And a easy/quick way to change your nickname.
When you say 'on msgplus load', do you mean the Initialize function, or when the program itself starts? If you mean in Initialize, just use
code:
Form.Show
NB; Don't use vbModal, as this will prevent Plus from loading properly until your form is closed.
As for an easy way to change nicknames, the easiest is to get a handle to a conversation window, or open a new one, and type '/nick <name>' there using SendKeys or a similar method.
RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by Stigmata on 07-15-2004 at 10:59 AM

quote:
Originally posted by mopflash
And 'Millenium_edition' instead of quoting stuff ive said and then saying how stupid i am, y dont u help me become smarter, by giving me some code examples and help me fix my problem!


rofl :lol:


well do u have any problems :S

RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by mopflash on 07-15-2004 at 11:44 AM

Just usin Config.Show doesnt work for me, same with Config.Visible = True.
And that method you mentioned for changing the nickname is sort of what im using now.
Ill try making my config form always on top and see if it will work then.


RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by RaceProUK on 07-15-2004 at 01:14 PM

What about Config.Enabled = True? You never know.

If you want, you can PM me the offending code, and I'll have a look at it.


RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by Millenium_edition on 07-15-2004 at 01:19 PM

you have to set it to vbModal I believe...


RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by mopflash on 07-15-2004 at 01:19 PM

Yer no matter what i seem to do, whenever i tell my form to load in the initialize function it always crashes msn.


RE: Plugin - Help Needed, Plugins Load But Not MsgPlus? by RaceProUK on 07-15-2004 at 01:20 PM

quote:
Originally posted by raceprouk
If you want, you can PM me the offending code, and I'll have a look at it.
You never know what I may find...