Thread

How do you code advanced whispers? (Sdk)

How do you code advanced whispers? // Sdk

1  |  

barbarossa

May 18, 2001, 6:16pm
:All Avid Users of AW,
I have A simple AFK bot up ready for the web upload stage, ut I'd like to
add another feature to it. The following scenario is what I need to occur:
User selects name of afk person from the list of AFK people, in the UI. That
name is stored under List1.Text. Then, the user enters their whisper message
in the approatly named text box, & clicks the command button captioned
"whisper". The text of the text box is then stored in a vairable, & the text
from that vairable is whispered to the person , who's name is stored in the
list1.text vairable. I have tried using the following code, but all I get is
a type mismatch error. I assume that this is because the whisper command
needs to send an avatar session (integer/long vairable) to ustilize as a
target for the whisper. Can anyone PLEASE help me out here?

Sincerly A Distressed Programmer,
Barbarossa (315942) Feel Free To Telegram me!

Private Sub Command2_Click()
Dim recieve As String
Dim message As String
message = Text1.Text
recieve = List1.Text
sdk.AwWhisper recieve, message
End Sub

(Simple?, yeah, I know that it is but, hey simple can be better!)

kah

May 18, 2001, 7:08pm
List1.text?? and if you store names only, you can't do it (whispers are sent
to session numbers). Brant released some code for making session tables a
few days ago, check that out. and you have to use something like this if you
want to retrieve a session # from a list:
receive = List1.ListItem(List1.ListIndex)

KAH
PS. code NOT checked for correctness

[View Quote]

grimble

May 18, 2001, 7:15pm
AwWhisper takes the SESSION number of the avatar and not its name. Its there
in black and purple-ish (sorry, I'm color blind when it comes to those
colours) in the Activeworlds SDK documentation! ...
http://www.activeworlds.com/sdk/aw_whisper.htm.

The session number is a Long, and the avatar name is a String, hence the
type mismatch. That error means there's something very simple wrong with
your code ... you're assigning a value to a variable or passing to a
function a value of the WRONG TYPE. What it doesn't mean is for you to wimp
out and post in the newsgroup.

I believe brant's classes allow you to do what you want ... it appears to
say so on his web-site ... passing the name instead of the session number
through the Avatar class.

Grims.

[View Quote]

grimble

May 18, 2001, 7:17pm
Only if he stored the session number in the list entry's item data in the
first place.

Grims

[View Quote]

xelag

May 18, 2001, 7:57pm
hey grimble,

this is exactly what I was talking about in 'Re:What a chance...': you
don't need to abuse people for asking questions, even if you think you are
an expert! Barbarossa's question is quite legitimate and, even if it is in
the AW SDK help files, unless you are very used to the style there, it can
be quite confusing: he has all the right to post his question here :)

XelaG

[View Quote]

grimble

May 18, 2001, 9:18pm
Here.... take this. Here's what you want ... a basic application to
add/remove avatars from a list box when they arrive/leave. Note the use of
the ItemData property (a Long where we put the session number) and not the
List property (a String containing the avatar's name).

Double click the avatar's name to whisper a message to him/her. Read the
code and adapt it to whatever you are trying to do. The code isn't the best
in the world, but it was knocked up in 15 minutes!

Giving people the answer .... geesh! No-one will ever learn for themselves
and fully understand this way!

Grims.



[View Quote]
begin 666 Basic Avatars ListBox Example.zip
M4$L#!!0````(`'T!LRI>MQE4W 8``,P8```I````0F%S:6, at 079A=&%R<R!,
M:7-T0F]X($5X86UP;&4O9G)M36%I;BYF<FV]6&UO(C<0_AXI_\':DQ(B)8C7
MY*(J'Q;8ZZ$0H$!"<E6%##AAFV6]W36!J.I_[]C>%WO97=*[MI:2 at .?%\\R,
M9\9YL$;C[J"/FN5*Y?AH,/^=+!BZ0<:?U_6K]J59JU]\^=QL7E2KG<;%=:55
MNZA4FI66V6 at TKNK67Y^JY<JGBO$3,LSIN',[:#_6R_#+.#YJD1?;10^M\A?J
MK]&SO[[#\/WX""'4QAZSJ8NB=0,_AOF&&?8#U+,#UJ([9.WPVG.((24<F[CL
M*[%?5BR2J-=J3878(\\L47=944 at 3ZBDGU1NJV-1>LE5,:S2O)+%GNZ\ at 9B]4
M$SF2JC1HO, .2>S1#1+$1+&N>0PHV;TWI($MG" D$3J=VNZ2; at /4(<]XXS#!
M&_MP8J^)C_!6_A4T;F0,.3FG=A5"AY7 at SJ!;[E(_HTW7:^PN6QO&P"QOWG9H
M0.*SVMA=$$?7=5$%NR?^AB1,&8$5>HR(1?%9S%(/78.R(=4;GQ-(>-YUEV2G
MT3^$%Y82DIA^'9Y]T!TB;BW*4"%8SG7"$/#]".)JK1!P[7\"3+T/X*4GWK\`
MMQ!O]3_!&Q4:9QZ5GB((M>;UCX2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G[$>V7V]/
MF2R3&NRYK',KV:RG?B<YQ9)P9DR2_!$*Z;W<.M?!E6\[L^AFN9PM%J$[NT4K
M6W58HI7ONNZULWZU%KK#IZE_S,*O2?#=F:O#F,0%9[T"<Y1 at &I-,8B&[YE\H
MX)1B5CJV9ZILAREXIG_&ZN*&M%)!7Z!N`LXD7&0<>B8::AHU:5[#EI<P8%O\
MR,4!A+=0,6%#C+1E9](J46.J5<:L$$"!R1'+0)Q!9%W3<"$C4D.K447JNKX7
M>QX&.W)1EUQ=GFX()1+*<1A2]\;M]>I4:=)(1?_Z#XOPF8M4-24=305_)^E[
M#0=*P(' 4PAY=Q^SBFMPQ_V:X):P>YVM>,?*-GB XF?_<=6^JOG3&Q#5*2=,
M_LW#^/"6?&-"ET,9I;U4O8#>M)[#4H(F!Z.DVL at 0[Q\$X#(%,?X(2/M[V74T
M5U UL*UV^C=02P,$% ```` at ` at at &S*BF,MN<P````-0```"P```!"87-I8R!!
M=F%T87)S($QI<W1";W at at 17AA;7!L92]!=F%T87),:7-T+G9B=TLKRO5-S,Q3
ML%4P-#324;"TT%&P,#;343 Q-=11<-91,#*"8',3H*"QN2E0D)<+`%!+`P0*
M``````!CO[(J````````````````' at ```$)A<VEC($%V871A<G, at 3&ES=$)O
M>"!%>&%M<&QE+U!+`0(4`!0````(`'T!LRI>MQE4W 8``,P8```I````````
M``$`( "V at 0````!"87-I8R!!=F%T87)S($QI<W1";W at at 17AA;7!L92]F<FU-
M86EN+F9R;5!+`0(4`!0````(`'T!LRI3`*X!OP$``*T"```L``````````$`
M( "V at 2,'``!"87-I8R!!=F%T87)S($QI<W1";W at at 17AA;7!L92]!=F%T87),
M:7-T+G9B<%!+`0(4`!0````(`((!LRHIC+;G, ```#4````L``````````$`
M( "V at 2P)``!"87-I8R!!=F%T87)S($QI<W1";W at at 17AA;7!L92]!=F%T87),
M:7-T+G9B=U!+`0(4``H``````&._LBH````````````````>````````````
M$ #_0:8)``!"87-I8R!!=F%T87)S($QI<W1";W at at 17AA;7!L92]02P4&````
/``0`! !7`0``X at D`````
`
end

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn