mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
in irc
Code:
 [code] alias ingameirc_readconsole {
  echo text is $dll(ingame_irc.dll,ScanConsole,NULL)
}

alias ingameirc_msg {
  msg #etpro msg
  echo parms are $1-
  msg $1-
}
in dll
Code:
int __declspec(dllexport) FAR PASCAL ScanConsole(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause){
Console not detected",PROGNAME,MB_OK);
	HWND hwnd;
	int i;
	char newline = '\n';
	char *result;
	if (game != ALL){
		hwnd = gethwnd();
		if (hwnd == NULL) return 0;
	}
	int length = strlen(console);

	strcpy(data,"\0");
		
		if (game != ALL){
			EnumChildWindows(hwnd,ScanString,NULL);
		}else{
			for(i=1;i<=(ALL-1);i++){
				hwnd = gethwndgame(i);
				if (hwnd != NULL) EnumChildWindows(hwnd,ScanString,NULL);
			}
		}
	substr(console,console,0,4096);

	    MessageBox(NULL,va("Wolf Console contains %s",console),PROGNAME,MB_OK);

		data = strstr(console,"]/ingameirc_");
		if (data == NULL){
			MessageBox(NULL,"message ]/irc NOT found",PROGNAME,MB_OK);
			CleanConsole();
			return 1;
		}else{
			MessageBox(NULL,va("message ]/irc found"),PROGNAME,MB_OK);
			result = strchr(data,newline);
			if (result == NULL){
				//strcpy(data,"FALSE");
				CleanConsole();
				return 1;
			}else{
				MessageBox(NULL,va("found newline and switched nullpoiter"),PROGNAME,MB_OK);
				*result = '\0';
				data = strstr(console,"ingameirc_");
				MessageBox(NULL,va("newdata %s \nswitching data[10] %c",data,data[10]),PROGNAME,MB_OK);
				switch(data[10]){
					case 's':
					case 'S':
													MessageBox(NULL,va("Say data = %s",data),PROGNAME,MB_OK);
						//CleanConsole();
						return 2;
						break;
					case 'm':
					case 'M':
			
						MessageBox(NULL,va("Msg data = %s",data),PROGNAME,MB_OK);
								//CleanConsole();
						return 3;
						break;
					case 'c':
					case 'C':
										MessageBox(NULL,va("Cmd data = %s",data),PROGNAME,MB_OK);
						//CleanConsole();
						return 2;
						break;
					default:
										MessageBox(NULL,va("Def data = %s",data),PROGNAME,MB_OK);
						return 2;
						break;
				}
			}
		}
	CleanConsole();
	return 1;
}
oke :x

the last messagebox shows Msg data = ingameirc_msg #etpro lol

so the entire msg was set in char *data corectly but in mirc nothing happents no msg anywhere ..

i tryid it whit normal commands like msg #etpro lol but also nothing

its realy hard to debug somthing whitout recieving anything at all :x

Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
i think my messsages are to hard no1 replies to them :x

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Give it time. 20 minutes or so isn't enough. Right now, only a few regulars are around. And I don't deal with DLLs, so I can't help you.

Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
oke thne its time u start using my knowedge on here laugh

well ill jsut keep on fooking around whit it

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
This is most probably the wrong place to ask about this too, I'm sure the Developer forum is quit efficient for this question.. smile

-Andy

Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
i thin kppl should read more sections of the forum then laugh


Link Copied to Clipboard