Shoutbox

plug in help required - nick name from a text file. - 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: plug in help required - nick name from a text file. (/showthread.php?tid=54498)

plug in help required - nick name from a text file. by andrewbob on 01-02-2006 at 10:55 AM

Afternoon all.
I want to make a basic plugin using Visual Basic 6 or VB.net that will allow me to:
1. Load a nick name from a file by using a reference number. eg 12.
2. Have a text file (or it could be within the plugin) that has a reference number then a quote/sentence. eg.
       12, Some nickname thing
3. Allow me to add extra to the name.
4. a / command thing eg. /quote

So all up in the end i'll be able to say
/quote 12 + any other name stuff i want

Can anyone help me and/or give me some code to start off with.
Thanks
--
Andrew Bob


RE: plug in help required - nick name from a text file. by Dempsey on 01-02-2006 at 10:58 AM

Well as you want to reference them by a number, it would probably be easiest to use an INI file to store the quotes/names.

Then to change the nickname you can use the built in Plus! function ChangeNick  SetNewName.


RE: plug in help required - nick name from a text file. by CookieRevised on 01-02-2006 at 11:14 AM

quote:
Originally posted by andrewbob
Can anyone help me and/or give me some code to start off with.
Thanks
How much experience do you have?

I ask this because although what Dempsey suggested is an extremely good way to approach this, it also requires you to use API's, which aren't so 'basic' if you are a beginning programmer....

Another solution (very basic solution, but will work nontheless) is to read x amount of lines from a certain file. So if you would like to use nick number 12, read the 12th line from the file by reading all lines one by one and counting up to 12 and stop reading then.
RE: plug in help required - nick name from a text file. by RaceProUK on 01-02-2006 at 07:01 PM

quote:
Originally posted by Dempsey
built in Plus! function ChangeNick.
SetNewName :P
RE: plug in help required - nick name from a text file. by Dempsey on 01-02-2006 at 08:48 PM

quote:
Originally posted by raceprouk
quote:
Originally posted by Dempsey
built in Plus! function ChangeNick.
SetNewName :P
Meh I couldn't remember, so I guessed it :P
RE: plug in help required - nick name from a text file. by andrewbob on 01-02-2006 at 11:37 PM

i have used APIs and things before i'm sure that i could make a form that could allow a user to enter in a reference  number and have it return the sentence attached to it. I just don't know how to get it 2 talk Messenger Plus.
I don't really like the idea of counting down the lines, just because i'm thinking about the fact i might want to use key words insted of just remembering numbers down the track.
Thanks
--
Andrew Bob


RE: plug in help required - nick name from a text file. by RaceProUK on 01-03-2006 at 09:26 AM

The Plugin API Documentation contains all you need to know about the Plus! API. The bits you'll need to look at are Initialize(), PublishInfo*(), ParseCommand(), and SetNewName().


RE: plug in help required - nick name from a text file. by andrewbob on 01-09-2006 at 06:49 AM

In the Public Function ParseCommand area how do i find out what a user has typed in after the command.
Eg. /xsetnameto 2 or /xsetnameto Silly 1?
Thanks
--
Andrew Bob


RE: plug in help required - nick name from a text file. by Dempsey on 01-09-2006 at 08:47 AM

quote:
Originally posted by andrewbob
In the Public Function ParseCommand area how do i find out what a user has typed in after the command.
Eg. /xsetnameto 2 or /xsetnameto Silly 1?
Thanks
--
Andrew Bob
ParseCommand passes in two variables, sCommand and sCommandArg, where sCommand is the command used, such as xsetnameto and sCommandArg is 2 or Silly 1

RE: plug in help required - nick name from a text file. by CookieRevised on 01-09-2006 at 09:14 PM

...which is all explained in detail and with examples in the Plugin API Documentation.