I was wondering if someone can help me with a code...I want to make a code where when someone opens the .exe an Instant Message in the AIM client is *SENT* not just opened...This Is what I Have So far...This is just a Snippet...Just the part im asking for help with.

#include <stdio.h>
#include <windows.h> 
#include <time.h>
int main(void)
{

char* URL = "Aim:GOIM?screenname=Some+sceenname&message=I+have+accepted+the+terms!";

LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, 
						 WPARAM wParam, LPARAM lParam)
{

Sleep ( 5000 );
ShellExecute( NULL, "open", URL, NULL, "C:\\", SW_SHOW );

}

<< moderator edit: added code tags: [code][/code] >>


This Causes an instant message window to open with the message ready 2 be sent...The User still has the option to send it or close it....I need the message to be sent as a notify for a registration in the program....Help please?

I don't think that the AIM software enables user to force a message to be sent using the commanline, or ShellExecute action. You may use instead an external C library that allows to do such things.

You can maybe libgaim, it is the opensource library that is used with the excellent GAIM program.

http://gaim.sourceforge.net/

Thanks...But Most people don't have the Gaim client...The majority of people have AIM...So maybe I could Use the shell execute command and put a keyboard interupt and have the Enter Key pressed Right after...Idk...Still Need help.

gaim is compatible with the aim protocol, that's why it has been written for. The advantage of using the libgaim dll is that you will not require user of your program to install a 3rd party program (ie. AIM)

gaim is compatible with the aim protocol, that's why it has been written for. The advantage of using the libgaim dll is that you will not require user of your program to install a 3rd party program (ie. AIM)

Um...I think I did not post clearly...I need 2 have it send an Instant message for AIM to another SN...This program is for AIM users. Not GAIM users, Sorry 4 the confusion.

>Um...I think I did not post clearly...
i think u mA b correct in ur assessment. ppl who use dumb abbr. r hard 2 understand.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.