mrgrimm // User Search

mrgrimm // User Search

1  2  |  

Aw SDK for VB..Its almost here!

Nov 30, 1998, 1:41am
I was bored last night so I decided I would spend the night trying to
get the SDK to work with VB. After about 5 hours of working on a dll, I
finally got it to work, events/callbacks/everything. All thats left to
do is fix a bug in the aw_int method, it's returing incorrect values.
I'm not sure when I will release the VB AW SDK yet but for now I will be
hanging around in AWTech messing around with it to make sure there arent
any other wierd bugs (it's quite nice :o).

Help with callbacks in VB

Dec 8, 1999, 2:15am
I didn't correctly implement the callbacks. I forgot to pass the RC value to
them. I have a new version of the ocx which I will release soon which fixes,
and adds, many features. Im also working on some documentation explaining
how to use the Ocx and how to use some of the functions that don't even
closely resemble the original sdk (like AwQuery). For now, if you would like
the current build of the Ocx tgram me in AW (Name: MrGrimm).
-MG

Some other fixes: Click events should work, instances (each instance is now
a separate bot instance), added enums, fixing some IP Address functions (so
it returns a string "x.x.x.x" , not a number).

[View Quote] > Does anyone have a working example of using callback with Mr.Grim's ocx?
>
> WorldList would be especially appreciated.
>
> Thanks
> Norm Lane

VB

Dec 18, 1999, 12:32am
I have updated the ocx, the website is at
http://members.home.com/grimmcna/

SDK 3.0 and Borland C++Builder 5

Apr 7, 2000, 1:48am
You can try using LoadLibrary and GetProcAddress. Basically you are just
loading the functions on the fly from the dll instead of using the lib
file ... here's a sample of how it can be done:
///////////////////////////////////
typedef int(*AW_INIT)(int);
typedef void(*AW_TERM)(void);

AW_INIT aw_init;
AW_TERM aw_term;

HINSTANCE hlib;

hlib=LoadLibrary("aw.dll");
aw_init=(AW_INIT)GetProcAddress(hlib,"aw_init");
aw_term=(AW_TERM)GetProcAddress(hlib, "aw_term");

//Do the following while closing the app:

FreeLibrary(hlib);
///////////////////////////////////

[View Quote]

MrGrimm's MSVB SDK Wrapper

Apr 9, 2000, 7:31am
You enter the other universe while calling AwCreate:

AwSdkOcx1.AwCreate "universe.domain.com", lngPort

[View Quote]

help

Apr 16, 2000, 3:02am
You cant use QuickStart to enter another universe.


[View Quote]

help

Apr 17, 2000, 7:44am
Do something like this..This is a vb version of the QuickStart
with the domain support..I havent tested this but this should
give you an idea:

Public Function QuickStart2(Owner as string, Password as string, _
BotName as string, Application as string, _
World as string, X as long, Y as long, _
Z as long, Yaw as long, Type as long, _
strDomain as string, lngPort as long) as Long

With sdk
rc=.AwCreate(strDomain,lngPort)
If rc <> 0 Then
.AwDestroy
QuickStart2 = rc
Exit Sub
End If

.EnableAllEvents
.EnableAllCallbacks

.AwLoginOwner = Owner
.AwLoginPrivilegePassword = Password
.AwLoginName = BotName
.AwLoginApplication = Application

rc=.AwLogin
if rc <> 0 Then
.AwDestroy
QuickStart2 = rc
Exit Sub
End If

rc=.AwEnter(World, 0)
If rc <> 0 Then
.AwDestroy
QuickStart2 = rc
Exit Sub
End If

.AwMyX = X
.AwMyY = Y
.AwMyZ = Z
.AwMyYaw = Yaw
.AwMyType = Type

rc=.AwStateChange
If rc <> 0 Then
.AwDestroy
QuickStart2 = rc
Exit Sub
End If

End With
QuickStart2 = rc

End Sub

[View Quote]

vbsdk problem

Jan 5, 2001, 5:12am
I read these newgroups all the time, I just don't bother replying.

I haven't had any problems with querying, it's most likely something in your
code.

-MrGrimm

[View Quote]

Problems with SDK and VB5

Jan 27, 2001, 5:11am
Error -1 means aw.dll was not found.

-MrGrimm

[View Quote]

what the hell is with the new sdk?

Feb 11, 2001, 9:41am
The QuickStart function is equivalent to:

Public Function QuickStart(Owner As Long, Password As String, Botname As
String, _
Application As String, World As String, _
X As Long, Y As Long, Z As Long, Yaw As Long, lType As Long)
As Long

Dim rc As Long

rc = awSDK.AwCreate("", 0)
If rc Then
awSDK.AwDestroy
QuickStart = rc
Exit Function
End If

awSDK.EnableDefaultEvents
awSDK.EnableDefaultCallbacks

awSDK.AwLoginOwner = Owner
awSDK.AwLoginPrivilegePassword = Password
awSDK.AwLoginName = Botname
awSDK.AwLoginApplication = Application

rc = awSDK.AwLogin
If rc Then
awSDK.AwDestroy
QuickStart = rc
Exit Function
End If

rc = awSDK.AwEnter(World, 0)
If rc Then
awSDK.AwDestroy
QuickStart = rc
Exit Function
End If

awSDK.AwMyX = X
awSDK.AwMyY = Y
awSDK.AwMyZ = Z
awSDK.AwMyYaw = Yaw
awSDK.AwMyType = lType

rc = awSDK.AwStateChange
If rc Then
awSDK.AwDestroy
QuickStart = rc
Exit Function
End If

QuickStart = 0
End Function

'///////////////////////////////////////////////////////////
QuickStop is equivalent to:

Public Sub QuickStop()
awSDK.AwDestroy
End Sub

-MrGrimm

[View Quote]

Re: Anyone know how to make a bot respond in VB?

Apr 2, 2001, 11:45pm
1 - Call sdk.AwEventSet AW_EVENT_AVATAR_ADD
2 - Make sure you are calling sdk.AwWait 0 periodically (I usually have a
Timer fire every second for this).

[View Quote]

Seprating words in a ListBox

Apr 9, 2001, 9:54pm
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

[View Quote]

AW_CALLBACK_ADDRESS/Getting the last visible line in a text/richtext box

May 21, 2001, 9:19am
I checked AwSdkOcx3 and it appears that I forgot to implement
AW_CALLBACK_ADDRESS ... I'll fix this sometime soon.

-MG

[View Quote]

okay this has to be me being stupid I guess:)

May 25, 2001, 8:42am
Make sure you aren't calling AwTerm when unloading a bot. That would cause
all instances to terminate.

-MG

[View Quote]

PHP SDK

Nov 24, 2001, 9:54pm
http://www.grimmsoft.com/aw/php/

-MrGrimm

[View Quote]

[C++ SDK] awsdk1.cpp(171) : error C2065: 'aw_console_messsage' : undeclared identifier

Aug 9, 2002, 5:33am
It's aw_console_message, not aw_console_messsage (extra s).

-Will

[View Quote]

Visual C++

Mar 10, 2001, 6:07am
If the price of these products is really an issue you could goto a place
like http://www.gradware.com/ ... You have to have a College ID for this
though. If you don't have one you can goto a local community college, sign
up for around $15, get the ID, then use it to buy full version software at
academic prices.

Visual C++ Standard goes for $50, Pro for $100, Enterprise for $190.

-Grimm

[View Quote]

Event Subscriptions ... Where's the filter?

Nov 25, 2002, 12:03am
The mask it sent when you connect (aw_enter, after a disconnect, etc) and
after calling aw_event_set.

With aw_event_set the mask it not sent immediately. You must first call
aw_wait or any function that has an associated callback (ie: aw_query, not
aw_say). The callback does not have to be set.

-Grimm

[View Quote]

Anyone know how to make a bot respond in VB?

Apr 2, 2001, 11:45pm
1 - Call sdk.AwEventSet AW_EVENT_AVATAR_ADD
2 - Make sure you are calling sdk.AwWait 0 periodically (I usually have a
Timer fire every second for this).

[View Quote]

Getting "my" session number

Jun 11, 2003, 4:00pm
These are the only error codes that would be returned by aw_session:

RC_NOT_INITIALIZED
RC_NO_INSTANCE
RC_NO_CONNECTION

-Will

[View Quote]

Visual Basic 6 SDK?

Jun 28, 2003, 7:31am
Active X controls are dlls with a specific interface. AwSdk.dll is still an
ActiveX/COM control, it just has a different extension.

AwSdkOcx#.ocx used MFC, AwSdk.dll/AwSdk2.dll use ATL. Same deal, different
method.

-Will

[View Quote]

Visual Basic 6 SDK?

Jun 28, 2003, 7:34am
The AwSdk (dll) on the server is not the same one from 1999.

-Will

[View Quote]

Visual Basic 6 SDK?

Jun 28, 2003, 7:38am
It's pretty much the same, except for the function names containing _'s and
variables being accessed via the aw_string/int/bool(_set). A control array
should still work.

-Will

[View Quote]

VB SDK DLL/OCX?

Jul 9, 2003, 10:06pm
ActiveX controls are based upon COM (Component Object Model).

"COM Components built with the ActiveX Template Library are smaller and
faster than components built with MFC, and they only require the ATL
runtime. They are better suited to components - which, by definition are
designed for very specific operations -as they don't offer all the built-in
functionality that the MFC classes provide, whereas MFC is better suited to
applications."

AwSdkOcx#.ocx was built with MFC. AwSdk2.dll was built with ATL. The dll
extension on AwSdk2.dll does -not- mean it isn't an ActiveX(OCX) control.

If "AwSdk 1.1 Type Library" is not listed in the VB components window, click
"Browse...", change "Files of type" to "All Files (*.*)" and browse to
AwSdk2.dll.

-Will

[View Quote]

Unofficial AwOcxSdk6.ocx INCOMPLETE TEST

Jul 9, 2003, 9:18pm
This just creates additional dependencies. If you must use the same
interface as AwSdkOcx just create a class wrapper.

-Will

[View Quote]

Seprating words in a ListBox

Apr 9, 2001, 9:54pm
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

[View Quote]

sdk.aw_address conversion code

Feb 25, 2004, 6:15am
Or you can just use:

ip = sdk.long2ip (sdk.aw_int (AW_AVATAR_ADDRESS))
addr = sdk.ip2long (ip)

There's also long2date and date2long to convert timestamps

-MrGrimm

[View Quote]

Visual Basic Bot Programming

May 1, 2001, 12:47am
I have multiple MrGrimm accounts.

[View Quote]

Object Changing, & x,y,z,& yaw co-ords

May 15, 2001, 12:20am
AwMyX is a long, not a string. When handling user input that is supposed to
be numerical you should use val () to convert it. Like so:

sdk.AwMyX = val (txtMyX.Text) * 1000

-MG

[View Quote]

blah (nt)

Sep 26, 2001, 4:24pm

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