Shoutbox

VB-sTagArg - 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: VB-sTagArg (/showthread.php?tid=15490)

VB-sTagArg by zigomar10 on 09-12-2003 at 05:29 PM

how could i make an sCommandArg but for tags in VB? I've noticed that feature in stuffplug: (!XTALK<language> <text>). I've tried to make it like this:

code:
If (StrComp(sTag, "(!XTAG)", vbTextCompare) = 0) Then
        sResult = Mid$(sTag, 7, 1)
        ParseTag = True
        Exit Function
End If

(it should get the next 2 characters after (!XTAG. If the user types (!XTAG23) then sResult = 23)
Is it even possible in VB? :huh: :S
RE: VB-sTagArg by Choli on 09-12-2003 at 08:12 PM

code:
If (StrComp(Left$(sTag, 6), "(!XTAG", vbTextCompare) = 0) Then
    sResult = Mid$(sTag, 7, Len(sTag) - 7) '<----edited
    ParseTag = True
    Exit Function
End If

You can also check at the if if Right$(sTag, 1) = ")" but i don't think you'll need that
RE: VB-sTagArg by zigomar10 on 09-13-2003 at 02:25 PM

doesnt work for me :( :'( :S


RE: VB-sTagArg by Choli on 09-13-2003 at 02:48 PM

quote:
Originally posted by zigomar10
doesnt work for me :( :'( :S
What's the problem?
RE: VB-sTagArg by zigomar10 on 09-13-2003 at 02:51 PM

when i type (!XTAG23) it sends (!XTAG23) :S. have u tested it?


RE: VB-sTagArg by Choli on 09-13-2003 at 03:06 PM

quote:
Originally posted by zigomar10
when i type (!XTAG23) it sends (!XTAG23) :S. have u tested it?
No, I haven't. But it should work. Try this (it's the same, but other way of doing it):
code:
Public Function ParseTag(ByVal sTag As String, ByVal oConversationWnd As Object, ByRef sResult As String) As Boolean
If LCase$(Left$(sTag, 6)) = "(!xtag" Then
    sResult =  Mid$(sTag, 7, Len(sTag) - 7)
    ParseTag = True
    Exit Function
End If
End Function

And make sure you haven't got any other pluging trying to capture the "(!XTAG)" tag. Also, be careful if your tag is something like "(!Xlongertag)", because then the code changes.
RE: VB-sTagArg by zigomar10 on 09-13-2003 at 05:18 PM

it still doesnt work :undecided:


RE: VB-sTagArg by Choli on 09-13-2003 at 05:26 PM

Which tag are you trying to use? (!Xwhat?)


RE: VB-sTagArg by zigomar10 on 09-13-2003 at 05:33 PM

(!xtag23)


RE: VB-sTagArg by Annon201 on 09-20-2003 at 03:52 PM

i did my grabbing using

code:
    If Tag Like "(!XSSHVOL?)" = True Then 'volume name of drive ?
        DriveLetter = LCase(Mid(Tag, 10, 1))
        'rest of code here
    End If

the only limitation(tho major) is that you need to make sure the user types an exact number of digets else it wont pick it up
RE: VB-sTagArg by zigomar10 on 09-20-2003 at 08:18 PM

it doesnt work for me :(:S. can u plz post the plugin that u used that in.


RE: VB-sTagArg by Xerxis on 09-20-2003 at 09:25 PM

are u sure you registered the dll you made? otherwise the tags will not be recognized


RE: VB-sTagArg by zigomar10 on 09-20-2003 at 09:27 PM

yeah, i did :S