grimble // User Search

grimble // User Search

1  ...  11  12  13  14  15  16  ...  28  |  

bots

Jul 23, 2001, 1:23am
"still waiting for Brant's classes to be fixed". Geesh! Some know it all you
are !!! Fix them yourself if you're as damned clever as you seem to think
you are!!

And what's with you today? Suffering from sympathy PMS or something??


[View Quote]

WHo here dosnt liek Lanezeri?

Aug 2, 2001, 9:04pm
Well I have the offensive know-it-all idiot filtered, and until this post
had almost forgotten about him - a policy that WAS working quite nicely.
GRRRR!!

[View Quote]

Zeebot

Aug 28, 2001, 7:38pm
Anyone going to say anything useful on this thread rather than this personal
slanging match? Preferably something to do with bots or the SDK perhaps
considering half of it is getting cross posted between the Bots and SDK
newsgroups.

Children!

[View Quote]

Passing a Variable to a url

Aug 8, 2001, 10:42pm
Is anyone following this thread, because its confusing the hell out of me!!

If you are sending the URL from bot then the bot needs to understand the
variables. Build the staring in the bot code and the use aw_url_send.

If the URL is linked from another page, then where does the bot fit in?

If you are looking for hidden/visible form values are preset in a web-page,
use a combination of a variable (as faber suggested) as the trigger for the
ASP to prefill the values.

Am I missing the point here?

Grims.

[View Quote]

Passing a Variable to a url

Aug 9, 2001, 4:28pm
I still don't see the problem. One aw_url_send preceeded by a bit of string
building.

In MSVC++ its something like this - I only typed it directly into OE cuz I
don't have time right now to try it out, but you should get the drift ...

int SendParmURL(int urlSession, CString urlParm)
{
CStirng targetURL;


targetURL.Format("www.somehost.somedomain/somepage.asp?somevariable=%s",
urlParm);
return aw_url_send(urlSession, targetURL, NULL);
}

Then just pass the target session and the string parm to the function
SendParmURL.

SendParmURL(avatarSession, "Grimble")

For integer values, urlParm is an int and use %d instead of %s in the Format
expression.

etc., etc., etc.

Is this what you need to do?

Grims



[View Quote]

Passing a Variable to a url

Aug 10, 2001, 12:46pm
OK ... PLEASE clear this up for me.

Are there 440 different variables VALUES (citnum=1, citnum=2 or citnum=3,
etc.) or 440 different VARIABLES
(citnum=1&citname="AWUser"&avX=-2436&avY=4657?... etc.)? I can't imagine
that there are 440 different peices of information that you would want to
pass to a CGI or ASP script to generate a single page (ARE there over 400 AW
attributes?). If there you do need to pass this amount of information
(yikes), I can see two other options over and above the file option JerMe
suggested.:

(a) Get the web script to do something a bit more interesting - having a set
of URLs that define a conversation between the bot itself and the web-server
via CGI/ASP scripts before sending the url with some generated key to allow
the script to retrieve the information. Much more fun to do and you can do
some HTTP/HTML decoding stuff too in your bot.

(b) Pack the data into a smaller number of large variable values, delimited
by some innocuous character that won't be in any of the values (i.e. "~").

I'm not too keen on using files for temporary storage in asynchronous
environments because of the timing involved. If the url is triggered by an
avatar event (clicking, entering an area or world, etc.), there is every
possibility that the avatar could do it again and again and again in quick
succession. Also, there could be 10 people all there doing the same thing
and you're going to get a very confused script. Calls to ASP scripts are
session-based so its a one-request-one-response conversation unless you
either build some persistence on the web side (servlets, etc.) or make some
conversation model.

If you only want to pass one of the variables in any one call, the string
building routines can handle that in the same way in the same way as the
values. All this is pointless though if you just have 440 different values
to the same variable.

Grims



[View Quote]

Passing a Variable to a url

Aug 10, 2001, 6:31pm
You only need to do that if its a buffer for returning a value from the
call - such as in GetPrivaterofileString ... CString has a cast for it if
its one-way.

What should be pointed out, however, is that CString is an MFC class and may
not be port to other C++ compilers.

Grims.

[View Quote]

The bird bot

Aug 4, 2001, 12:33am
Bots aren't silly, they are a key part to the overall look, feel and
functionality of many worlds. Bots require no visual component by
definition - i.e. they have no need for a dependancy on the browser - so why
make them a plugin of the browser?

Ryan obviously doesn't understand what the concepts are behind bots and I'm
afraid you may be missing the point here also Eep.

Grims.

[View Quote]

Eep, Bots should not be intigrated into the browser as plugins.

Aug 6, 2001, 12:19pm
And besides, I expect a lot of people have stopped monitoring the general
discussions group because it was getting used for crap. This is a
continuation of a previous thread (which the guy no longer has on his news
reader) ... what's the issue here?

[View Quote]

Eep, Bots should not be intigrated into the browser as plugins.

Aug 6, 2001, 9:26pm
Ummmm that's pretty much what a bot is ... and you get to be there too.
Part of the idea of naming standard for bots ("[]") is so that people can
see that they are dealing with a non-human avatar. I don't thing that this
courtesy fits with your idea.

Grims


[View Quote]

Eep, Bots should not be intigrated into the browser as plugins.

Aug 7, 2001, 5:05pm
That was part of my point ... controlling a "human" avatar in an automated
fashion. People expect to be able to interact with a citizen's avatar. If
you want to script an avatar, then a bot is easily the best option - just
don't use the other features. Either use one of the generic scripted bots or
write a dedicated one.

I don't think its in the AW "ethic" to give people the ability to easily
script the browser - without the use of a third-party utility - and to be
honest, the benefits of controlling the browser remotely are lost on me.
Sorry.

Grims

[View Quote]

My Bots.. (are back)

Aug 14, 2001, 7:54pm
What's the problem you have?

[View Quote]

My Bots.. (are back)

Aug 16, 2001, 2:48pm
OK, I am having to make some assumptions here, but I am guessing that
vntIndexKey is the session number that was returned from the
Avatar(sdk.AwAvatarName).avSession call. If this is the case, then you're
falling foul of the difference between collection KEYS and collection
INDEXES.

If you provide a string as the locator for a collection then its a KEY ...

Set Item = mCol("Lanezeri") - locates the item you inserted with a key
of "Lanezeri"

If you provide a number as the locator then its an INDEX (like in an array)
....

Set Item = mCol(3) - locates the third item in the collection.

In VB6, you can now use string representations of numbers (i.e. "46739") as
keys in collections, but in VB5 I don't think this was allowed and you had
to put an alpha character on the front. So ...

If you're using VB6, when inserting into, referencing or removing from the
collection, instead of using the numeric value in a variant, explicitly
convert it to a string with CStr(vntIndexKey).

With VB5, I think you'll need to use something like "K" & CStr(vntIndexKey)
or something like that as the key, again in all places you use the
collection.

Does this help?? If I'm on the wrong track, give me a little more info and
I'll look again. When you're using variants, there's no way for me to see
what data type (i.e. string or numeric) the value vntIndexKey is in the
code.

I've attached a tiny little example in VB6 to demonstrate.

Grims.


begin 666 Lanezeri Example 1.zip
M4$L#!!0````(`+1D$"N!?="8PP$``"H$```+````9G)M36%I;BYF<FUU4E%/
MXS ,?J_4_V#U at 0,)3=L-$#SPL(URAVY;=W0;CRAMO"VZ-*G2%-B_QUG'M9UH
M)"N*O\^?'=OK\#E^BN9PW>OW?6^,6Z% at />X]:I/!QF0S1F_?`X )RZW0"K[.
M/5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_B-Y$,J60YL4X\[V/$;W
M1HX at at B4GQ] <T!171P6D+4#MZF=HT$(9.><#KPW43:RVEKO.8U9ZE2)"D\:N
MZTVN_IHL-]=, at 3[:/_\"4$L#!!0````(`,1D$"L>! at 1$* at ```#0````4````
M3&%N97IE<FE%>&%M<&QE,2YV8G=+*\KU3<S,4[!5,#'1`6-3,P, at P])(1R%*
M1\'("()-C2V at N9 &6=>+ at !02P$"% `4````" "T9! K at 7W0F,,!```J! ``
M"P`````````!`" `MH$`````9G)M36%I;BYF<FU02P$"% `4````" #$9! K
M''BH.Z(!``".` at ``% `````````!`" `MH'L`0``3&%N97IE<FE%>&%M<&QE
M,2YV8G!02P$"% `4````" #$9! K' at 8$1"H````T````% `````````!`" `
MMH' `P``3&%N97IE<FE%>&%M<&QE,2YV8G=02P4&``````,``P"]````' 0`
#````
`
end

My Bots.. (are back)

Aug 19, 2001, 5:16pm
Well if you ever want to use/reference collections, I think this is
something you should spend some time trying to understand. Its pretty
fundamental stuff.

[View Quote]

Sorry everyone...

Sep 4, 2001, 9:06pm
Hey people, can we restrict this to ONE newsgroup please? ... rather than
all of them? The topic is kinda tired now.

[View Quote]

VB, query and disconnects

Sep 26, 2001, 12:23pm
I haven't looked at the SDK for a little while, and there have been a couple
of changes since I last used it, but based on my "old" knowledge, your
safest bet would definitely be to do a requery when it reconnects.

All you need to do is to retain the values in the 3x3 sector sequence number
array you used in your initial query instead of initialising them to zero.
Restart the query process again using the aw_query call (AwQuery the last
time I looked at the VB SDK) using the same center sector X and Z
corrdinates and all the event and callback handlers will be called again as
before. The entire contents of any cells that have changed since the
sequence number was last set (the previous aw_query) will be notified to the
bot.

The main drawback of this approach (not that I think there are any
alternatives short of repeating the full query) is that aw_query only
notifies the bot about objects that ARE there at the time of the query.
Where you are deleting objects, you need to bear in mind that if you don't
get an update for an object in a cell that has changed, then the object has
been deleted. In the past, I have done one of two things on receipt of an
AW_EVENT_CELL_BEGIN in a requery:

** Thrown away the entire store for the previous cell contents and rebuilt
it from the new events raised.

** Flagged all the objects in the cell store as "Unconfirmed", matched the
objects returned from the aw_query against the cell store using the
object_number updating them to "Confirmed" (or obviously adding a new one if
there's no matching objecting) and then dropped all "Unconfirmed" objects
when I get the AW_EVENT_CELL_END event.

One solution is quick and dirty (nothing wrong with that) but the other IMHO
is neater, faster and more true to what you are trying to do.

Also, I imagine you have this covered already, but I always used a
AW_EVENT_WORLD_ATTRIBUTES event to signify that the bot had reconnected to
the world after the AW_EVENT_WORLD_DISCONNECT event.

If some of this is obsolete now, apologies, but I don't imagine that AW
would have radically changed the way such a fundamental bot process would
work.

Hope this helps,

Grims.



[View Quote]

Custom Bots

Oct 10, 2001, 1:08pm
So on the same thought ....

Q. Why buy commercial software when there are perfectly good alternatives
available as freeware ...

A. Because the freeware versions are invariably inferior.

Grims.

[View Quote]

Open/Close Files

Oct 18, 2001, 9:24am
Open logFile for Append as #1

.... will open the file and continue writing at the end of the existing data.
I remember saying a load of other stuff last time you asked, so you might
want to dig the old post out anyway. You have a number of options for how to
use it programatically.

Grims



[View Quote]

Open/Close Files

Oct 19, 2001, 10:51am
Just like Baron, I'm not sure what you're trying to do here. I have a nasty
suspicion that you're looking for a way to handle the file for random access
(i.e. inserting, deleting and seeking records withing the contents of a
file). If this is the case then I'm afraid you're out of luck with VB since
the model VB (that damned File System Object!) has no direct support for
random file access as we know it (I was using random access files at school
in Pascal under CPM on an RM-380Z when Windows was just a file manager - I
think M$ believe you should be using databases for random data access
nowadays, although they're not everyone's preference). There is a way to use
random access methods from VB but, in a word, they are crap and don't work
as you would expect (can't delete records ... just blank them out!). If you
want to look at what VB CAN do for random access file, its in the help file
(check in the help index for "random access" or the like) or there are other
resources at development sites around the web, such as
http://pages.about.com/vbmakai/minidb1.htm. It ain't pretty, and, although I
hate to admit it, databases are a much simpler solution - like the Jet DB
Engine through good old DAO.

The Append file mode I mentioned is a replacement for the Output file mode
in VB for adding data to the end of an existing file. You can relate the
Output and Append file modes directly to DOS pipes ">" (write screen output
to file) and ">>" (append screen output to file) respectively. If you open a
file for Output, then any existing file is scrapped and the file is written
afresh. Append will open the existing contents of the file and write any
output to the end of the that file, preserving the contents. I've attached a
small project to demonstrate these two output modes which I hope will
clarify things for you. If not, post back here or e-mail me.

If you can be more specific, explain what you are trying to do, because
there is a lot of programming experience in these newsgroups and there will
certainly be a number of different methods of achieving what you want to do.
If all you want to do is add to the end of the data in a file, then Append
is your boy, but you can't read from a file opened for Output or Append.

Cheers,

Grims


[View Quote]
begin 666 File Mode Demo.zip
M4$L#!!0````(`,9K4RL(J?7&A0,``$$+```+````9G)M1&5M;RYF<FW%55UO
MXS80? ^0_[#0`76"' at S92>[:HGEP_'$UX%B&[5P>`TJD8^(D4I"HQOWW79*B
M12NVD:(H*D"1HQTN9W9VQ>_CY6H:S>&N&X:7%P_LE0OX_M"=R"*#39&-6";A
M\ at (`AB177 IPUSW>P82G#!XE9:"! at 06FG GU!^.O6^6 -U_[H1><L8UJLGSQ
M0VN9>QO<W-YYL6=.U;:)?0GMPAD7/W 93PZ8H8">);1*2,H:/H>$3+!)?)AY
MI4BAGO*%++G1;H(`G6<NJ'PK4?2&5*DRV'WIAC++B* /E5*X)(\'><X$-94R
M0#A1RVZW"\ at :+#YP6(]X0_#KG0LWI6S"O=O;T,77))X*RG9^O+\/[HOM+>[O
MUWIE\<(]N_=8T$/=,UZJ![F#--9:AU(HM*R$<SKZO_YR7DC_K([>.1W.0SBN
MX\;5\)V.MG]+5C+U<?NB2N65^E?VG5<=GE/]C]PS?P9*%3RN%$/M+W.2,00&
M]>0'K?"W5,8DU:!53A*-G)"T9"W4L&!$D3 at ]%5\4C+(D)?B84L2LBZH-&>]R
M63+:)(ALQ?%]RA..$W=YL2CXGP3AV&FE at M'X,7J93&?CE_G at <0RM:U#B+!=<
MO&IQ%)5MT,^NVFF?,%,58U9853&LMO+-;]^K:UVNS at !*GN6H:%.)Q#!1$B at O
M\Y3\!6K+(''M+C?F?YT?L)_,;_P4=4I(<3YBN=/Y]#WBF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SL^+PZCP(9=.ASZMY9WL7LWHS1Q#!DDXQ)%0X
MNSDI('T%:M\^08<6VI%+.?'60(-CM97<][[OZJ!11&C2V74#I^H/)[EY8 at KT
MR4;^`5!+`P04````" `0;%,K+0<,$BL````T````$ at ```$9I;&4 at 36]D92!$
M96UO+G9B=TLKRG5)S<U7L%4P,=$!8S,3"QT%8S,#'05G'04C(P at V,S(#"AH#
M99QYN0!02P$"% `4````" #&:U,K"*GUQH4#``!!"P``"P`````````!`" `
MMH$`````9G)M1&5M;RYF<FU02P$"% `4````" #\:U,K;Z>O"ID!``"*` at ``
M$ at `````````!`" `MH&N`P``1FEL92!-;V1E($1E;6\N=F)P4$L!`A0`% ``
M`` at `$&Q3*RT'#!(K````- ```!(``````````0` at `+:!=P4``$9I;&4 at 36]D
at 92!$96UO+G9B=U!+!08``````P`#`+D```#2!0``````
`
end

Open/Close Files

Oct 19, 2001, 3:20pm
Ok, for what you are trying to do, the principle is really simple ... just
load the file into the edit box and then, when you want to save it again,
just overwrite the whole file with the new contents of the edit box (open
for output, print the lines to the file and close it).

If you are using a multi-line edit box then you just write the entire
contents of the edit box with a single statement. When loading it in,
however, every line will be treated as a single record. So the following is
what you want (txtFile is the name of the edit box on the form and
DEMO_FILE_NAME is a constant defined for the file being used).

'## Load text file into a multi-line edit box
Private Sub LoadFileToForm()

Dim fileNo As Long
Dim fileRec As String
Dim fileData As String
Dim recNo As Long

fileNo = FreeFile
fileData = vbNullString
recNo = 0

'Open the file for reading
Open DEMO_FILE_NAME For Input As #fileNo '<== OPEN FOR INPUT

Do While Not EOF(fileNo)
recNo = recNo + 1

' Decide whether you need to add a carriage return in the string (only
records 2 and onwards)
If Not (recNo = 1) Then
fileData = fileData & vbCrLf

End If

'Read the next record from the file and add it to the end of the
previously loaded content
Line Input #fileNo, fileRec
fileData = fileData & fileRec

Loop

Close #fileNo

'Store the results of the load in the exit box
txtFile.Text = fileData

End Sub


'## Save the contents of the edit box to file
Private Sub SaveFormToFile()

Dim fileNo As Long

fileNo = FreeFile
Open DEMO_FILE_NAME For Output As #fileNo '<== OPEN FOR OUTPUT

'Output the entire contents of the edit box to the file (is done in one
go)
Print #fileNo, txtFile.Text

Close #fileNo

End Sub


Should be enough to be going on with. HTH,

Grims



[View Quote]

VB Question

Nov 18, 2001, 11:32am
First make sure you don't issue the aw_init for the second SDK instance when
you load it - once per app only. Beyond that, in the absence anything except
the totally pointless "getting an error from the class file" you're on
you're own pal.

Grims.

[View Quote]

VB Question

Nov 19, 2001, 4:33pm
OK Ricky, lets have a guess at what you're doing here in the absence of any
additional information. I'll try to keep it in english.

To me, it sounds like your trying to use a .cls like you would a .bas, when
they are completely different concepts. The assumption from any VB
programmer here is going to be that you understand how to use classes is
you're going to include them in your project.

Classes instantiate as COM objects, just like every object in VB (including
forms) and, at a high level, the concept of an object is that you code a
class - the definition of the object - once and instantiate it a number of
times ... it becomes synonymous with a variable type such like longs,
strings, etc. You can look at it as if it was a user defined data structure
with a set of functions to "do stuff" with the data, but you can have many
copies of the structure with different data in it and one set of code ...
without the need for a load of messy array handling and needless parameter
passing.

If you want to use objects, then you create classes that represent single
instances of "things", for example ONE BOT. Its a template for that "thing"
just like in real life ... you would only design a cup once, and then create
man of them from the design. So, you write a class as if its a single bot
and then create two of them as different variables:

So imagine a class file called "clsMyBot" with four member functions (I'm
not looking at issues returning error codes here) ... Create, Login, Enter
and MoveTo. This would be used something like this - I am typing this
straight into Outlook Express and so I can't guarantee the syntax.

Dim botExample1 as clsMyBot
Dim botExample2 as clsMyBot

Set botExample1 = new clsMyBot
Set botExample2 = new clsMyBot

awSDK.AwInit(AW_BUILD)

botExample1.Create(...<Bot 1's universe details> ...)
botExample1.Login(... <Bot 1's login parms> ...)
botExample1.EnterWorld("AW")
botExample1.MoveTo(... <Bot 1's position> ...)

botExample2.Create(...<Bot 2's universe details> ...)
botExample2.Login(... <Bot 2's login parms> ...)
botExample2.EnterWorld("AWTeen")
botExample2.MoveTo(... <Bot 2's position> ...)

etc. etc. etc.

This will give you two bots with identical behaviour - as defined in the
class clsMyBot. If you want the bots are different, then that is a different
template (different cup - different design), so you would need to create
"clsMyOtherBot", copying the common code (creating/destroying the instance,
logging in, entering the world, etc.) to the new bot or using a .bas file as
a function library and passing the necessary parameters. Then you would have
something like

Dim botExample1 as clsMyBot
Dim botExample2 as clsMyOtherBot

Set botExample1 = new clsMyBot
Set botExample2 = new clsMyOtherBot

If you want to get as close to real object programming as VB lets you, then
look into the Implements command, but I would stick to duplicating the
common code for now.

If this doesn't make any sense to you, then I'm afraid you're not ready for
classes in your bots. You need to look at programming completely differently
to use them effectively (which is the only way to use them to justify the
additional cost in processing - and it is a significant cost) and I would
think bots are not a good place to start. This is not procedural programming
like using .bas files ... its a totally different programming model.

Microsoft have examples - one of which is a coffee maker I think so search
the help files for "coffee" maybe - to help you to think in the way you need
to (unfortunately they're only up to the usual standard of M$ examples), but
there are plenty of other resources on the web. If I can find some in the
next few minutes, I'll post them here.

Good luck,

Grims.



[View Quote]

VB Question

Nov 19, 2001, 5:05pm
A couple of web resources you may find useful (get your reading goggles on!)

http://www.vbinformation.com/tut-obj.htm

http://www.vbexplorer.com/ooptutor.asp
http://www.vbexplorer.com/oop2.asp

http://www.vbsquare.com/activex/begobjects/
http://www.vbsquare.com/activex/begobjects2/
http://www.vbsquare.com/activex/begobjects3/

and of course, the good old MSDN ...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/htm
l/vbconprogrammingwithobjects.asp

HTH,

Grims.

can a bot be created using this program language?

Nov 30, 2001, 3:18am
There is one statement in that post that really irritates me (sorry) and I
hear it all too often. Bad programming habits are developed through lack of
preparation (i.e. time invested in learning correct methods) and laziness
.... not a language that fully supports comprehensive declarations but allows
certain shortcuts to be taken if the programmer so wishes (or by default if
people don't RTFM). I think its unfair to say that VB will teach a
programmer bad habits - often an argument levelled against VB - since in
reality it only allows lazy programmers to skip the basics of good method.

Mandatory declarations can be forced in VB, and a Variant, in some
instances, is a perfectly valid data type. If people approached programming
in Visual Basic in the same manner that they would approach programming in
C, C++, Pascal, Java, COBOL, etc. (and there is no reason why they
shouldn't) then there are no bad habits to "learn". In fact it is a high
productivity development language and when it comes to number crunching,
doesn't run too far behind C in terms of performance. Don't forget that
large corporations have implemented enterprise applications in Visual Basic
with excellent results. BTW - I'm not solely a VB programmer, so I'm not
sticking up for it out without knowing the alternatives.

Anyone out there who is looking for a startup language, don't be put off by
the bad press VB gets from programmers. Its an excellent start-up language
with a comparatively short learning curve. It has its limitations, but by
the time they become an issue you are easily ready for a more complex and
flexible language.

Grims



[View Quote]

AwAvatarName in Class

Nov 24, 2001, 10:36pm
Ricky, you're at it again. "it gives me an error" doesn't give anyone here
enough information to help you. What's the error, man?

Grims

[View Quote]

well...

Nov 30, 2001, 7:11pm
What's the new part of C++ to you? ... the language itself or just the OO
part? Most people who say they are using C++ to develop bots are really just
writing C code and compiling it with a C++ compiler ... subtle difference in
when you're looking for tutorials.

Depending on where your focus lies, I'd make one of two recommendations:

** If you want to learn "C++" rather than C then go direct for the OO
implementation and work from there.

** If you want to write bots with C/C++ then initially get one working using
C code and then go learn the OO sode of things if that interests you.

Grims.

[View Quote]

Please just give me a list and tell me if it'll be a definate or you'll need another program.

Dec 2, 2001, 5:13am
Can someone explain to me what was wrong with Baron's answer to this
question the first time around? No omissions as far as I can see and
definitely doesn't warrant asking the same question twice more in 48 hours.

[View Quote]

didn't know

Dec 3, 2001, 3:22pm
Never had any problems with VC++ myself. Excellent development platform.

[View Quote]

didn't know

Dec 4, 2001, 1:24pm
"Accepted"?? So now you're saying that Windows is a legacy platform?

Ummm ..... Don't think so.

[View Quote]

didn't know

Dec 4, 2001, 7:59pm
That's funny. :o)

[View Quote]

1  ...  11  12  13  14  15  16  ...  28  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2025. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn