Shoutbox

Another StuffPlug NG question... - 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: Another StuffPlug NG question... (/showthread.php?tid=36328)

Another StuffPlug NG question... by Mike on 01-02-2005 at 06:00 PM

Hello.
I made a StuffPlug NG talker.
It makes the first letter of your message capital.
Here's the code:

code:
Private Function talker(ByVal strinput As String) As String

    talker = UCase$(Left$(strinput, 1)) & Mid$(strinput, 2)

End Function
When I try to set it as an autotalker StuffPlug NG says : "Not a valid talker. Do you want to turn off the autotalker?"
However, when I use /xtalk <name of talker> it works.

Does anyone have any ideas why this happens?

By the way I also tried coding the talker like this:
code:
Function talker(input)
     talker = UCase(Left(strinput, 1)) & Mid(strinput, 2)

End Function
and its the same thing happens... :(

Other information:
Windows Version: Windows XP, 5.01.2600
Messenger Client Version: 7.0.0425
Messenger Plus! Version: 3.40.0112

I named the talker "talker.ucase.vbs" (no quotes) and I put the talker on "C:\Program Files\Messenger Plus! 3\StuffPlug-NG" (I also put it in the Plugins folder)

Thank you!
RE: Another StuffPlug NG question... by TheBlasphemer on 01-02-2005 at 06:11 PM

Hmmm, little problem with SPNG1,
If the returned value is not a string, it gives an error...
checking if a talker is a valid one happens by sending it an empty input...
try forcing the output to be a string by doing "" & UCase(.....


RE: Another StuffPlug NG question... by matty on 01-02-2005 at 06:21 PM

code:
Function talker(strInput)
   If strInput <> "" Then
     talker = UCase(Left(strinput, 1)) & Mid(strinput, 2)
   Else: talker = ""
   End If
End Function

That will work, you should check if the input is Null, if it is then set it to a Null String
RE: Another StuffPlug NG question... by Mike on 01-02-2005 at 06:21 PM

Nope.
Doesnt work... :(
This is what I currently have:

code:
Function talker(strinput)


    talker = "" & UCase(Left(strinput, 1)) & Mid(strinput, 2)
End Function

Edit: Matty, your code doesnt work too... :(
RE: Another StuffPlug NG question... by matty on 01-02-2005 at 06:23 PM

Try this:

code:
Function talker(strInput)
   If strInput <> "" Then
     talker = UCase(Left(strInput, 1)) & Right(strInput, Len(strInput) - 1)
   Else
      talker = ""
   End If
End Function

RE: Another StuffPlug NG question... by Mike on 01-02-2005 at 06:25 PM

None of your code works Matty... :(