|
grimble // User Search
grimble // User Search
Feb 7, 2003, 8:52am
Blocked sender more like.
[View Quote]"neocube a" <majmatrixx at excite.com> wrote in message
news:3e43248e$1 at server1.Activeworlds.com...
> Blocked topic :)
>
> Bye!
>
> john wrote:
DYING
STUFF.
WILLING/ABLE
>
|
Apr 2, 2001, 8:59am
Oops ... I guess you meant something like
If UCase(Message) = "HELLO" Then
.... or ...
If LCase(Message) = "hello" Then
Grims
[View Quote]"m a k a v e l i" <tupacisdabest at aol.com> wrote in message
news:3ac7f80b$1 at server1.Activeworlds.com...
> That would make it case sensitive.. better to do
>
> Message = sdk.awchatmessage
> If Message = "hello" then
> sdk.awsay "HI!"
> end if
>
> "hal9000" <wampa1 at qwest.net> wrote in message
> news:3ac7cb07$1 at server1.Activeworlds.com...
> | set up an event for the chat
> | sdk.AwEventSet AW_EVENT_CHAT
> | then in your SDK_event_chat() function
> | if SDK.awchatmessage = "hello bot" then
> | SDK.awsay "Hello " & SDK.awavatarname
> | end if
> |
> | --
> | -=Hal9000=- world:Discover
> | --==~~out~~==--
> | --== http://hal9000.xoasis.com
> |
> |
> | "trekkerx" <troop2 at empirenet.com> wrote in message
> | news:3AC7A7D3.CAE785E6 at empirenet.com...
> | | Dose anyone know how to make a bot respond to someting a person says
in
> | | VB? Cuz i just made one and it just sits there doing nothing... Cuz i
> | | want to add like, when u say the bots name to make it say version, Oh
> | | yea, can someone make a example of aa bot that u can fill out info on
> | | where it is and stuff? and make it into a script and post it?
> | |
> | |
> |
> |
>
>
|
Apr 2, 2001, 4:19pm
Ummm .... actually no. "Hello" is not equal to "hello" ... therefore without
converting the message to a single case, you cannot guarantee a match.
Grims
[View Quote]"jeiden" <tgrenier1 at mediaone.net> wrote in message
news:3ac8a194$1 at server1.Activeworlds.com...
> Actually it doesn't matter the case so long as the letters spell the key
> word
> "grimble" <grimble2000 at btinternet.com> wrote in message
> news:3ac85b99$1 at server1.Activeworlds.com...
says
Cuz
> i
> Oh
> on
>
|
Apr 3, 2001, 2:39pm
LOL... this isn't a dig KAH, but "the state thingie"?? LOLOL
Grims
[View Quote]"kah" <hiorth at sensewave.com> wrote in message
news:3ac9f1f0$1 at server1.Activeworlds.com...
> Well, as MrGrimm sayd, you have to call AW_WAIT! And you should also do
the
> state thingy when you log in your bot.
>
> KAH
> PS. If you don't call AW_WAIT all the time, your bot will be thrown away
by
> the AW server.
>
> trekkerx <troop2 at empirenet.com> skrev i
> meldingsnyheter:3AC91F5B.F5FB7B2C at empirenet.com...
> all...
Sdk.AwAvatarName
> & _
key
person
> says
nothing...
> Cuz
> version,
> info
>
>
|
May 21, 2003, 9:12am
That's the point matey ... the EXE is unusable without the runtimes, so why
not do a thorough job and have some pride is what you release? Without the
runtimes the EXE just a download of garbage. The people that want a bingo
bot generally aren't developers and they want a .... ummm ... bingo bot ...
that works.
Quit being so defensive and listen to people!
Grims
[View Quote]"john" <john at 3d-reality.com> wrote in message
news:3ecb5b0d at server1.Activeworlds.com...
> ... I just happened to include an EXE afterwards.
|
Jun 25, 2003, 11:15am
Mark, you get ruder by the day. What sort of perfectly structured and easily
maintainable code were you writing four years ago? Only brant knows how the
code is formed and the areas affected by the SDK interface, where as you
don't know shit about it. You're turning into a right little self-proclaimed
know-it-all.
[View Quote]"strike rapier" <strike at rapiercom.freeserve.co.uk> wrote in message
news:3ef60e9e at server1.Activeworlds.com...
> Not really... if you count yourself as a decent programmer and think you
> make decent programs *cough* ie: !=Thors authentication system *cough*
then
> shouldent take you longer than 20 minutes to convert a project, took me
> about 30 to convert Echelons 15,000 or so lines of VB code.
>
> - Mark
>
> "brant" <awteen at shoemakervillage.org> wrote in message
> news:3ef5f2ae$1 at server1.Activeworlds.com...
becuase
> far
format
so
bot,
>
>
|
Apr 6, 2001, 9:38pm
LOL ... Well done makaveli ... have a coffee now mate.
[View Quote]"m a k a v e l i" <tupacisdabest at aol.com> wrote in message
news:3acd1404 at server1.Activeworlds.com...
> No Problem.
>
>
|
Jun 30, 2003, 8:59pm
You know, it wouldn't take much for someone with a small amount of C/C++
experience to write their own DLL for the SDK that's callable from VB if
their so desperate for it.
At least this should mark the end of the incessent whinging about there not
being a VB interface to AW.
Grims
[View Quote]"john" <john at 3d-reality.com> wrote in message
news:3f00768e$1 at server1.Activeworlds.com...
> Thank god!
>
> ~john
>
> "mayor taz" <webmaster at awtaz.net> wrote in message
> news:3efe43a9$1 at server1.Activeworlds.com...
>
>
|
Jul 1, 2003, 12:52pm
Errrr ....
[View Quote]"r i c h a r d" <richard.lazenby1 at ntlworld.com> wrote in message
news:3f0131d9$1 at server1.Activeworlds.com...
> Sdk.aw_string(AW_STRING_NAME),"Something"
> Sdk.aw_int(AW_INT_NAME),123
> Sdk.aw_bool(AW_BOOL_NAME),True
|
.... ahem???
> Ocx is 4 loosers... or ppl who have very long source code and are too lazy
> to convert but new bots should use this
.... no, the unnecessary sharing of purile opinions is "4 loosers".
Jul 1, 2003, 9:51pm
I would be very surprised as aw_int and aw_int_set have different prototypes
and polymorphism isn't supported by COM/ActiveX interfaces. Unless I'm
missing something ...
Unless .NET has really screwed with the language syntax and broken away from
common function calling protocol as well as the change to use the .NET
framework then
Sdk.aw_string(AW_STRING_NAME),"Something"
doesn't strike me as even remotely valid.
Grims
[View Quote]"r i c h a r d" <richard.lazenby1 at ntlworld.com> wrote in message
news:3f02179b at server1.Activeworlds.com...
> Same thing works fnie
>
>
|
Jul 2, 2003, 7:41pm
Hmmm ... are you perhaps missing the (I'm sure deliberate) mistake in your
original post that I queried?
Sdk.aw_int(AW_INT_NAME) is valid
Sdk.aw_int(AW_INT_NAME),123 isn't valid.
Apart from the obviously incorrect method name, the form "call fn(x),n" is,
lets say, somewhat dubious.
Call Sdk.aw_int_set(AW_INT_NAME,123) is valid
rc = Sdk.aw_int_set(AW_INT_NAME,123) is valid
Sdk.aw_int_set AW_INT_NAME,123 is valid
I know my way around VB and the SDK well enough to get annoyed when people
post "information" in these newsgroups that either isn't complete or is
simply wrong.
Grims
[View Quote]"r i c h a r d" <richard.lazenby1 at ntlworld.com> wrote in message
news:3f02d7c6$1 at server1.Activeworlds.com...
> Yeah maybe you could try replacing AW_STRING_NAME with something like
> AW_AVATAR_NAME which is a string
>
> http://www.activeworlds.com/sdk/aw_attribute.htm
>
> In .Net when using sdk.aw_string() just type AW_AVATAR_NAME or start to
type
> it. It will bring up a list and put all the
> Sdk.aw_string(AWSDKLib2.AW_ATTRIBUTE.AW_AVATAR_NAME) stuff in for you
>
>
|
Jul 2, 2003, 8:05pm
NO! I give up!
[View Quote]"r i c h a r d" <richard.lazenby1 at ntlworld.com> wrote in message
news:3f0353b2$1 at server1.Activeworlds.com...
> Oh yeah! sorry was half asleep before i ment to put
>
> So I only have to say this once not twice the 2 posts are to show people
how
> to use the COM VB Sdk. Since its only avaliable in Com wrapper for 3.4 ive
> made examples cause still even now i get ppl almsot everyday bugging me
how
> to use it im sure other ppl get the same. So select your language remember
>
> Sdk.aw_string(AW_STRING_NAME)
> Sdk.aw_int(AW_INT_NAME)
> Sdk.aw_bool(AW_BOOL_NAME)
>
> and
>
> Sdk.aw_string_set(AW_STRING_NAME),"Something"
> Sdk.aw_int_set(AW_INT_NAME),123
> Sdk.aw_bool_set(AW_BOOL_NAME),True
> Forgot to put the _set in ;)
>
>
|
Jul 2, 2003, 8:15pm
Both unnatural and wrong.
[View Quote]"bowen" <Bowen at andras.net> wrote in message
news:3f0357a3$3 at server1.Activeworlds.com...
> grimble wrote:
>
> I'm confused, what's he doing? it's like he's setting the whole thing to
> 123 here "Sdk.aw_int_set(AW_INT_NAME),123" instead of what it should
> probably be "Sdk.aw_int_set(AW_INT_NAME,123)" Doing it the first way
> seems unnatural.
>
> I don't get it though.
>
> --
> --Bowen--
>
|
Jul 2, 2003, 8:29pm
Am I on a different planet tonight?
"Doing it the first way seems unnatural."
[View Quote]"bowen" <Bowen at andras.net> wrote in message
news:3f0359ff$1 at server1.Activeworlds.com...
> grimble wrote:
>
> The second one was the exact replica of the one you said in the last
> post excluding the setting to the variable rc. Excuse moi if I forgot
> to include that.
>
> --
> --Bowen--
>
|
Jul 2, 2003, 8:53pm
Ummm ... no I didn't ...
"[It is] both unnatural and wrong", not "[They are] both unnatural and
wrong".
[View Quote]"bowen" <Bowen at andras.net> wrote in message
news:3f035f50$1 at server1.Activeworlds.com...
> grimble wrote:
>
> rc = Sdk.aw_int_set(AW_INT_NAME,123) is valid
>
> Sdk.aw_int_set(AW_INT_NAME,123) is what I Said. You claimed both were
> unnatural and wrong.
>
> --
> --Bowen--
>
|
Jul 3, 2003, 8:16pm
You're really starting to piss me off now! One more time, with feeling ...
Sdk.aw_int(AW_INT_NAME),123 isn't valid
Sdk.aw_int_set(AW_INT_NAME),123 isn't valid
As for call and rc= ... its the programmer's choice and its all common
knowledge. If I were you, I'd concentrate on what's important (i.e. not
talking crap) and stop trying to look clever in other people's exchanges.
[View Quote]"r i c h a r d" <richard.lazenby1 at ntlworld.com> wrote in message
news:3f041421$1 at server1.Activeworlds.com...
> with you need to use call or an rc sdk.aw_string_set
(AW_CHAT_MESSAGE,"123")
> i use as a time saver i use it cause then i dont have to put call or
> anything else sdk.aw_string (AW_CHAT_MESSAGE), "123" but then again i
could
> just use sdk.aw_string AW_CHAT_MESSAGE, "123"
>
>
|
Jul 4, 2003, 7:03am
*chuckle* ... bless 'im.
[View Quote]"bowen" <Bowen at andras.net> wrote in message
news:3f051714$1 at server1.Activeworlds.com...
> r i c h a r d wrote:
the
you
get
work
you
alone.
>
> Wow, I thought I was pissy.
>
> --
> --Bowen--
>
|
Jul 5, 2003, 12:10am
It is (sadly) valid code as far as the compiler is concerned, because VB
lets you get away with bad form. The reason its "valid" is because
(AW_INT_NAME) resolves to the value of AW_INT_NAME and it becomes a
non-returning call to a function (i.e. any return code is discarded).
However, IMO if people are going to post example code, they should take on a
little more responsibility to those they believe they are "teaching" in a
technical newsgroup.
Too much "Ooooh... this'll make me look clever" and not enough care. Its one
of the most misleading snippets of code I've seen. I was due a rant so
that's it.
Grims.
[View Quote]"agent1" <agent1 at shatteredplatters.com.nospam> wrote in message
news:3f05ee3e$1 at server1.Activeworlds.com...
> r i c h a r d wrote:
was
>
> I think the point they're trying to make is that
> Sdk.aw_int_set(AW_INT_NAME), 123
> is not valid code.
>
> What I think you mean is:
> Sdk.aw_int_set(AW_INT_NAME, 123)
>
> --
> -Agent1
>
|
Jul 2, 2003, 7:53pm
I believe AW_AVATAR_CITIZEN is only populated by querying the citizen
calling the aw_citizen_attributes_by_name or _number methods so the cit
would need to be queried first anyway in order to use this attribute.
[View Quote]"r i c h a r d" <richard.lazenby1 at ntlworld.com> wrote in message
news:3f02d735 at server1.Activeworlds.com...
> To get someones cit num with out querying use
>
> Dim AvatarCitizen as long
> AvatarCitizen = sdk.aw_int(AW_AVATAR_CITIZEN)
|
Jul 2, 2003, 8:03pm
If you're querying ejections, then AW_CITIZEN_NUMBER and AW_AVATAR_ADDRESS
aren't used (see http://activeworlds.com/sdk/aw_world_ejection_next.htm for
the attributes populated by the world ejection query). Also, from the
aw_world_ejection_add method documentation ...
----------
The attribute AW_EJECTION_TYPE specifies the type of the ejection and the
format of AW_EJECTION_ADDRESS:
AW_EJECT_BY_ADDRESS Ejection is by IP address
AW_EJECT_BY_COMPUTER Ejection is by computer ID
AW_EJECT_BY_CITIZEN Ejection is by citizen number
If AW_EJECTION_TYPE is AW_EJECT_BY_ADDRESS, AW_EJECTION_ADDRESS specifies
the IP address to be blocked (in network byte order.) If the least
significant byte of the address is zero, the entire class C IP address is
blocked.
If AW_EJECTION_TYPE is AW_EJECT_BY_COMPUTER, AW_EJECTION_ADDRESS specifies
the 32-bit ID of the computer to be blocked. However, there is currently no
mechanism for directly querying the ID of a user's computer from the SDK.
Ejections by computer ID are added automatically by the world server
whenever a user is ejected via aw_world_eject and their computer has an ID
available. Once the ejection is in place, the computer ID can be determined
by scanning the ejection database using either aw_world_ejection_next or
aw_world_ejection_previous.
If AW_EJECTION_TYPE is AW_EJECT_BY_CITIZEN, AW_EJECTION_ADDRESS specifies
the citizen number of the user to block. Ejections of this type will only
block the user as long as they continue to use the account that has been
blocked.
----------
There's no help specifically for AW_CITIZEN_NUMBER because there's nothing
"special" about it. At the risk of being patronising (sorry if this is old
ground), the aw_int, aw_string, etc. methods are used to query attribute
values that have been set by a functional method (such as aw_object_add) or
the most recent event/callback raised ... whichever of these two occurred
last.
The AW documentation for each method, event and callback states the
attributes that are updated by and each particular item.
Grims
[View Quote]"zeofatex" <gzanone at optonline.net> wrote in message
news:3f02cad3$1 at server1.Activeworlds.com...
> I'm having a problem querying IP addresses and citizen numbers using the
COM
> Wrapper. I also realised that neither of these are asking for a session
> number?. I looked in the C++ sdk help (http://activeworlds.com/sdk) there
is
> no help for AW_CITIZEN_NUMBER) and I don't understand what they're trying
to
> say (the example) as I don't program in C++. I've programmed all the rest
of
> the bot except for these two things which I'm having trouble figuring out.
> Any help would be appreciated.
>
> Both attributes are integers, and AW_AVATAR_ADDRESS is read only.
>
> Private Sub sdk_EventChat()
>
> Dim CitNum As String
> CitNum = sdk.aw_int(AW_CITIZEN_NUMBER)
>
> Dim Address As String
> Address = sdk.aw_int(AW_AVATAR_ADDRESS)
>
> End Sub
>
> (The sub is there so you know what I'm using it for. And I have tried
using
> long's instead of strings. The world I'm trying to query the IP address I
do
> have eject and ED rights.)
>
> Thanks in advance,
>
> ZeoFateX
> (347592)
>
>
|
Jul 2, 2003, 8:07pm
Bum ... wrong attribute.
AW_AVATAR_CITIZEN is only supplied by an AW_EVENT_AVATAR_* event ... not
much good in a chat function. AW_CITIZEN_NUMBER is the one only available
from the cit query.
Session tables ....
[View Quote]"grimble" <grimble2000 at btinternet.com> wrote in message
news:3f03546d at server1.Activeworlds.com...
> I believe AW_AVATAR_CITIZEN is only populated by querying the citizen
> calling the aw_citizen_attributes_by_name or _number methods so the cit
> would need to be queried first anyway in order to use this attribute.
>
>
> "r i c h a r d" <richard.lazenby1 at ntlworld.com> wrote in message
> news:3f02d735 at server1.Activeworlds.com...
>
>
|
Apr 6, 2001, 9:35pm
If you read the ORIGINAL post from Who, he/she is looking for more than just
a file listing ... he mentions that he would like descriptions, textures
that the objects use, tagging info, etc. THAT is a useful thing and is an
enormous cataloging task even with a process to produce the raw information
from the object path.
Once they have the information... it needs to go into a usable format ...
(i.e. the web-pages Facter spoke about).
Be fair will ya! Geesh!
Grims
I am looking for a database type file listing the objects available in
in
[View Quote]"insanity" <txfilmkr at heartfall.com> wrote in message
news:3ACE0E23.28B80415 at heartfall.com...
> I do not understand why AW would need months to accomplish this data text
file.
> It is a simple task in DOS of just writing a txt file from the
appropriate
> folder the objects, textures, etc., are stored in
put
>
|
Apr 6, 2001, 9:18pm
What the heck sort of comment is that RD??
Let him play and learn like we all did. If he want to attack a "Slot Bot" of
his own, then let him do it for Heaven's sake !!
[View Quote]"rough diamond" <joshua_trask at capecod.com> wrote in message
news:3ace4084 at server1.Activeworlds.com...
> Mak, no offense, because we all love new, promising bot programmers, but
> bots can, for the most part, only be released once and be big, so let
> someone else come out with a Slot Bot first that can do a lot, please :-)
> -RD
> m a k a v e l i wrote in message <3acd34f3$1 at server1.Activeworlds.com>...
>
>
|
Apr 8, 2001, 12:34am
LOL Mine just told me to shut up when I talked crap !
[View Quote]"xelag" <xelag at 3dee.nl> wrote in message
news:3acfcd45$1 at server1.Activeworlds.com...
> Oh mine were simpler: If you don't have anytihing to say, then don't say
it
> :))
>
>
|
Apr 8, 2001, 10:15am
LOL ... not me that anyone should be apoligising to. I just said my piece in
my first post.
[View Quote]"rough diamond" <joshua_trask at capecod.com> wrote in message
news:3ad05196 at server1.Activeworlds.com...
> Yeah, same here... Oh, and on my previous post, sorry. I'm not going to
say
> I didn't mean it, because there was something that I meant to say in
there,
> but that was definatelly not how I meant to say it (School's been
> frustrating lately) so I'm sorry, and I hope you'll accept my apology.
> -RD
> grimble wrote in message <3acfce1c at server1.Activeworlds.com>...
say
>
>
|
Apr 9, 2001, 10:08pm
makaveli,
There are a number of key problems with this code. The two major ones are
listed below:
Firstly, its bizarre! What's with the timer?? Ever heard of a loop? That
timer is running asynchronously along side the retrieval of the AW events,
so its going to be totally arbitrary which messages are going to be checked.
The code is basically going to check for the next word in the list (after
the current one), in the last chat message received, every second. Chat
messages will often be missed completely and ONLY be scanned for all the
words if no-one says anything else while it goes through the loop.
Secondly, (apart from the fact that it's not an answer to what TrekkerX
wants because of the previous point), ListIndex is only used to position the
selection. Its a UI thing and not something for setting the current record
so that you can use the Text property.
This isn't a difficult task ... The code you really want goes something like
this ... which isn't how I would actually do it - see point later in post -
but its comparative to your example (again, in VB with your control names
for continuity):
Private Sub sdk_EventChat()
Dim messageChat As String
Dim indexEjectWord As Long
messageChat = LCase(sdk.AwChatMessage)
For indexEjectWord = 0 To lstWord.ListCount - 1
If InStr(messageChat, LCase(lstWord.List(indexEjectWord))) Then
'<do eject handling code here>
End If
Next indexEjectWord
End Sub
This is still going to fall foul of words within words (there's a place in
the UK called Scunthorpe!!) so additional logic needs to go in there to
check for whole words including handling the start/end of the chat message
and punctuation - so you can't just check for " " &
lstWord.List(indexBadWord) & " " either.
Personally, I am a believer in user interface components being JUST for user
interface purposes ... displaying/entering information and interactivity. My
view is that the prime copy of the data belongs in the guts of the
application, not in a visual control. So actually, I would have a ReDim'd
array of Strings or a Collection holding the words, and that store is then
used to populate the listbox on startup. Just my upbringing I guess ...
different people do things in different ways.
BTW, a small piece of advice. See the Dim statements? Use them ... Variants
suck! You should never find code like this ANYWHERE in an application ...
large or small ... it just doesn't make any sense.
If X = "" Then X = 0
If you MUST use variants (which is extremely lazy and unnecessarily adds to
the underlying processing), use the IsEmpty(varName) to do this check.
Grims.
[View Quote]"m a k a v e l i" <tupacisdabest at aol.com> wrote in message
news:3ad236c8$1 at server1.Activeworlds.com...
> Add a Timer to the form and label it "timCheck" then:
>
> Private Sub sdk_EventChat()
>
> timCheck.Interval = 1000
>
> timCheck.Enabled = True
>
> End Sub
>
> Private Sub timCheck_Timer()
>
> Message = LCase(sdk.AwChatMessage)
>
> If lstWord.ListCount = 0 Or lstWord.ListIndex = lstWord.ListCount - 1
> Then
> timCheck.Enabled = False
> Exit Sub
> End If
>
> If X = "" Then
> X = 0
> lstWord.ListIndex = X
> Else
> X = (X + 1)
> lstWord.ListIndex = X
> End If
>
> Word = lstWord.Text
>
> If InStr(Message, Word) <> 0 Then
>
> sdk.AwEjectDuration = (5 * 60)
>
> sdk.AwEjectSession = sdk.AwChatSession
>
> If sdk.AwWorldEject Then
> MsgBox "Unable to ejection session " & sdk.AwChatSession
> Else
> MsgBox "Session " & sdk.AwChatSession & " ejected"
> End If
>
> End If
> End Sub
>
> Add a Module named anything and add this to the Module:
>
> Global X as Integer
> Global Message
>
>
|
Apr 9, 2001, 10:12pm
Ack!!!
'<do eject handling code here>
should read
'<do eject handling code here>
Exit For
Sorry ....
Grims
[View Quote]"grimble" <grimble2000 at btinternet.com> wrote in message
news:3ad24f12 at server1.Activeworlds.com...
> makaveli,
>
> There are a number of key problems with this code. The two major ones are
> listed below:
>
> Firstly, its bizarre! What's with the timer?? Ever heard of a loop? That
> timer is running asynchronously along side the retrieval of the AW events,
> so its going to be totally arbitrary which messages are going to be
checked.
> The code is basically going to check for the next word in the list (after
> the current one), in the last chat message received, every second. Chat
> messages will often be missed completely and ONLY be scanned for all the
> words if no-one says anything else while it goes through the loop.
>
> Secondly, (apart from the fact that it's not an answer to what TrekkerX
> wants because of the previous point), ListIndex is only used to position
the
> selection. Its a UI thing and not something for setting the current record
> so that you can use the Text property.
>
> This isn't a difficult task ... The code you really want goes something
like
> this ... which isn't how I would actually do it - see point later in
post -
> but its comparative to your example (again, in VB with your control names
> for continuity):
>
> Private Sub sdk_EventChat()
>
> Dim messageChat As String
> Dim indexEjectWord As Long
>
> messageChat = LCase(sdk.AwChatMessage)
>
> For indexEjectWord = 0 To lstWord.ListCount - 1
> If InStr(messageChat, LCase(lstWord.List(indexEjectWord))) Then
>
> '<do eject handling code here>
>
> End If
> Next indexEjectWord
>
> End Sub
>
> This is still going to fall foul of words within words (there's a place in
> the UK called Scunthorpe!!) so additional logic needs to go in there to
> check for whole words including handling the start/end of the chat message
> and punctuation - so you can't just check for " " &
> lstWord.List(indexBadWord) & " " either.
>
> Personally, I am a believer in user interface components being JUST for
user
> interface purposes ... displaying/entering information and interactivity.
My
> view is that the prime copy of the data belongs in the guts of the
> application, not in a visual control. So actually, I would have a ReDim'd
> array of Strings or a Collection holding the words, and that store is then
> used to populate the listbox on startup. Just my upbringing I guess ...
> different people do things in different ways.
>
> BTW, a small piece of advice. See the Dim statements? Use them ...
Variants
> suck! You should never find code like this ANYWHERE in an application ...
> large or small ... it just doesn't make any sense.
>
> If X = "" Then X = 0
>
> If you MUST use variants (which is extremely lazy and unnecessarily adds
to
> the underlying processing), use the IsEmpty(varName) to do this check.
>
> Grims.
>
>
>
> "m a k a v e l i" <tupacisdabest at aol.com> wrote in message
> news:3ad236c8$1 at server1.Activeworlds.com...
1
>
>
|
Apr 9, 2001, 10:16pm
GRRRR .... it took me so long to type my post that you beat me to it !!
Just for the reader ... (accidental omissions I'm sure - MrGrimm is better
that this)
For i = 0 To lstBox.ListCount -1
and
If ContainsWord(lstWords, LCase(AwSdkOcx.AwChatMessage)) <> "" Then
Grims :o)
[View Quote]"mrgrimm" <will at neoskopos.com> wrote in message
news:3ad24bae$1 at server1.Activeworlds.com...
> This method wont work. It allows for other events to be processed while
> checking the words in the ListBox.
>
> Instead, try something like this:
>
> lstWords = ListBox containing words/phrases to check for
>
> Public Function ContainsWord(ByRef lstBox As ListBox, ByVal strMessage As
> String) As String
>
> Dim i As Integer
>
> ' Loop thru the list items
> For i = 0 To lstBox.ListCount
> ' Check if the message contains the value in the list item
> If InStr(1, strMessage, LCase(lstBox.List(i)), vbTextCompare) > 0
> Then
> ' Return the found value
> ContainsWord = lstBox.List(i)
> Exit Function
> End If
> Next i
>
> ContainsWord = ""
>
> End Function
>
> Private Sub AwSdkOcx_EventChat()
>
> ' Check the message
> If ContainsWord(lstWords, AwSdkOcx.AwChatMessage) <> "" Then
> ' The message contained one of the words
>
> ' Eject the session
> AwSdkOcx.AwEjectDuration = 5 * 60
> If AwSdkOcx.AwWorldEject Then
> MsgBox "Unable to ejection session " & AwSdkOcx.AwChatSession
> Else
> MsgBox "Session " & AwSdkOcx.AwChatSession & " ejected"
> End If
>
> End If
>
> End Sub
>
> "m a k a v e l i" <tupacisdabest at aol.com> wrote in message
> news:3ad236c8$1 at server1.Activeworlds.com...
1
>
>
|
Apr 11, 2001, 7:32pm
Me too lol.
I don't think you guys need to get personal about this though. Where's the
namecalling come from?
Grims
[View Quote]"moria" <moria at colony.co.uk> wrote in message
news:3ad47334$1 at server1.Activeworlds.com...
> If you wern't around before, how could you possibly know who was or wasn't
> here before you started posting??
>
> Moria
>
>
> m a k a v e l i <tupacisdabest at aol.com> wrote in message
> news:3ad3c956$1 at server1.Activeworlds.com...
place
> 5
am
>
>
|
Apr 11, 2001, 7:34pm
Who the hell cares?? Go to some other NG for this crap will ya!!
Grims
[View Quote]"s p a r k" <crazyglue3 at hotmail.com> wrote in message
news:3ad49319 at server1.Activeworlds.com...
> Still, I went to the worse school then, and learn the meaning of prep....
>
> m a k a v e l i <tupacisdabest at aol.com> wrote in message
> news:3ad48b8b at server1.Activeworlds.com...
> could
of
>
>
|
|