Thread

the next step in programing :P (Sdk)

the next step in programing :P // Sdk

1  |  

giles

May 30, 2005, 12:02pm
ok i made a bot usieng a concel now and i'm pretty happy with it so i
decided to take the next step up.... a windows GUI and well i've alredy ran
into troubles -_- for some reason the richedit that i was planing on useing
for the log dont appear at all i'm programing in C++ useing dev C++ version
4.9.9.2 so can anyone help at all with this? i tryed msdn but they dident
help much so.... yeah

dabean o

May 30, 2005, 12:24pm
Ever hear of punctuation?! Give it a shot :) .. If I knew anything about
bots or bot programming, I'd give you a hand, but thats not my
department so I can't help, sorry.


[View Quote]

strike rapier

May 30, 2005, 12:28pm
Make a better bot in console now then, and then another, and another... when
you have made 5 or 6 then go onto GUI's. Which are quite similar, except no
aw_wait loop.

--
- Mark Randall
http://zetech.swehli.com

[View Quote]

giles

May 30, 2005, 12:33pm
-_- half of the reason that i wanted togo to GUIs now is cuz i've BEEN
makeing concel programs that's all i made oh and one game witch is nothing
but testing functions and well it gets annoying after a while -_-

[View Quote]

dabean o

May 30, 2005, 12:39pm
Again with the punctuation >.<.. Anyways, i'm not a programmer, although
I have some experience with basic C++/ Programming is a tedious, at
times boring process, so to do this properly, you have to overcome the
desire for entertainment while you focus on what you are doing. It takes
time to make somethihng work properly, and many different modes of
getting there. Tomas Edison for example, tried 2000 ways to make a
lightbuld, and found one way that worked. Patience and time will teach
you how to make the GUI function and how to make it work.


[View Quote]

giles

May 30, 2005, 12:43pm
alright stop posting about my puncuation i dont really care i've always
typed like that and i always will and C++ programing is fun cuz u get to
dance around like a moron once your 50 line code finaly compiles and runs
without crashing
[View Quote]

themask

May 30, 2005, 1:32pm
[View Quote] The punctuation he keeps commenting about is quite a nerveracking thing.
It's starting to haunt me now.

chrispeg

May 30, 2005, 1:52pm
With the Resourcce Manager of VS 4.x RichEdit controls could not be used
directly. Load and create the window 'manually' in your code instead, which
would look like (for ANSI 8 bit chars ) :

#include <richedit.h>

LoadLibrary ("Riched20.dll");
CreateWindowEx ( 0, "RichEdit20A", ...);


I'm sure you figure it out,
Chris

"Giles" <giles at gfsmail.no-ip.com> schrieb im Newsbeitrag
news:429b1cee$1 at server1.Activeworlds.com...
> ok i made a bot usieng a concel now and i'm pretty happy with it so i
> decided to take the next step up.... a windows GUI and well i've alredy
> ran
> into troubles -_- for some reason the richedit that i was planing on
> useing
> for the log dont appear at all i'm programing in C++ useing dev C++
> version
> 4.9.9.2 so can anyone help at all with this? i tryed msdn but they dident
> help much so.... yeah
>
>

giles

May 30, 2005, 1:58pm
erm.... i dident use any recorce manager but i think u just pointed out what
i frogot.... load lobery and the #include :P
[View Quote]

giles

May 30, 2005, 2:04pm
omg.... i feel dumb now -_- it was only cuz i had this:

log = CreateWindowEx (
WS_EX_CLIENTEDGE,
"RichEdit",
"",
WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL |
ES_AUTOVSCROLL | ES_LEFT | ES_MULTILINE | ES_NOHIDESEL |
WS_VSCROLL | WS_HSCROLL | WS_BORDER | ES_WANTRETURN,
0,
100,
544,
275,
hwnd,
(HMENU)1,
hThisInstance,
NULL
);

insted of this:

log = CreateWindowEx (
WS_EX_CLIENTEDGE,
"RichEdit20A",
"",
WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL |
ES_AUTOVSCROLL | ES_LEFT | ES_MULTILINE | ES_NOHIDESEL |
WS_VSCROLL | WS_HSCROLL | WS_BORDER | ES_WANTRETURN,
0,
100,
544,
275,
hwnd,
(HMENU)1,
hThisInstance,
NULL
);

ohh and i frogot to load the dll :P thank you soo much

[View Quote]

neophile

May 31, 2005, 1:22pm
Giles a écrit :
> ok i made a bot usieng a concel now and i'm pretty happy with it so i
> decided to take the next step up.... a windows GUI and well i've alredy ran
> into troubles -_- for some reason the richedit that i was planing on useing
> for the log dont appear at all i'm programing in C++ useing dev C++ version
> 4.9.9.2 so can anyone help at all with this? i tryed msdn but they dident
> help much so.... yeah
>
>
Maybe you are using aw_wait(-1) ? If yes, the AW SDK take for itself all
the thread time for it. your rich control is not refresh by the windows
system. You have 2 solutions for resolve it : make an aw_wait(20) inside
the windows callback loop (20 ms for exemple) or use a specific thread
for AW. I using Dev CPP 4.9.9.0 with the wxWidgets (better than windows
API for the GUI)

tony m

May 31, 2005, 4:42pm
[View Quote] > Giles a écrit :
>
> Maybe you are using aw_wait(-1) ? If yes, the AW SDK take for itself all the thread time for it. your rich control is not refresh by the windows system. You have 2 solutions for resolve it : make an aw_wait(20) inside the windows callback loop (20 ms for exemple) or use a specific thread for AW. I using Dev CPP 4.9.9.0 with the wxWidgets (better than windows API for the GUI)

You should use 0 for aw_wait(), as any non-zero value will cause the GUI to block. As I understand it, the value of 0 will cause aw_wait() to just process immediately without blocking.

giles

May 31, 2005, 9:24pm
ok i got the richedit control to work and all but now i'm getting a wierd
reason code when it fails -_-
reason code 500 what is this error code and what causes it?

giles

May 31, 2005, 9:31pm
oops sry i frogot to mention what it fails todo :P it fails to connect to aw
here's the connection code:

addline("Connecting....\n");
if (rc=aw_create("auth.activeworlds.com", 5670, 0))
{//5670,"auth.activeworlds.com"
sprintf(tempstr,"Unable to Connect (reason %d)\n", rc);
adderrline(tempstr);
//return 0;
}
else
addline("Connected...\n");

ok adderrline and addline are both helper functions i made to help with
writeing the log

tony m

May 31, 2005, 9:34pm
[View Quote] > oops sry i frogot to mention what it fails todo :P it fails to connect to aw here's the connection code:
>
> addline("Connecting....\n");
> if (rc=aw_create("auth.activeworlds.com", 5670, 0))
> {//5670,"auth.activeworlds.com"
> sprintf(tempstr,"Unable to Connect (reason %d)\n", rc);
> adderrline(tempstr);
> //return 0;
> }
> else
> addline("Connected...\n");
>
> ok adderrline and addline are both helper functions i made to help with writeing the log

Reason code 500 is RC_CANT_RESOLVE_UNIVERSE_HOST.

tony m

May 31, 2005, 9:39pm
[View Quote] > oops sry i frogot to mention what it fails todo :P it fails to connect to aw here's the connection code:
>
> addline("Connecting....\n");
> if (rc=aw_create("auth.activeworlds.com", 5670, 0))
> {//5670,"auth.activeworlds.com"
> sprintf(tempstr,"Unable to Connect (reason %d)\n", rc);
> adderrline(tempstr);
> //return 0;
> }
> else
> addline("Connected...\n");
>
> ok adderrline and addline are both helper functions i made to help with writeing the log

By the way, if you just want to get into the default universe aw_create(0, 0, 0) is sufficient.

You may need to check your DNS server to see if something is wrong if you are receiving RC_CANT_RESOLVE_UNIVERSE_HOST (500).

giles

May 31, 2005, 9:58pm
nopoint i dont get it on any of my other bots -_-



[View Quote]

outsider

Jun 1, 2005, 1:04am
[View Quote] Timers are fine with a -1. Be careful with multi-threaded applications
with the SDK.

outsider

Jun 1, 2005, 1:06am
[View Quote] I need to ask you a small favor, please use decent grammar. I know it's
a pain but it really helps us to help you in the end.

Most programmers will be able to find errors in your code if they can
understand you. Also, link to a code file instead of copy and pasting.
(if you don't want to show the whole code just copy it to a new file and
show all related functions that are called -- use geocities to host it
or something)

neophile

Jun 10, 2005, 3:19pm
Tony M a écrit :
[View Quote] For example , I have my GUI in the main thread and all AW operation are
in this thread.
For the aw_wait(x), I make a specific Thread who I can stop, pause and
resume in normal task priority.But in this specific thread, I don't use
the -1 value because it block my thread, so I use a time like 20 ms.
I'll test it with a 0 value, I'll tell you...

chrispeg

Jun 10, 2005, 5:55pm
You have to call all SDK functions from the same thread. Although, you can
run the GUI or other working threads from another thread. It's up to the
application programmer to take care of IPC ( Inter Process Communication -
transfering data and issuing function calls inbetween threads of an
application ).

Chris

"Neophile" <neophile at abyssia.net> schrieb im Newsbeitrag
news:42a9cba5 at server1.Activeworlds.com...
> Tony M a écrit :
> I never test the 0 value, I'll do it. I know the -1 make AW loop and block
> the main thread. and a time in ms if for synch operation.
>
> For example , I have my GUI in the main thread and all AW operation are in
> this thread.
> For the aw_wait(x), I make a specific Thread who I can stop, pause and
> resume in normal task priority.But in this specific thread, I don't use
> the -1 value because it block my thread, so I use a time like 20 ms. I'll
> test it with a 0 value, I'll tell you...

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