Special characters and sending them to programs...
I'm writing a little app that opens the default mail program and sends a message that links to an attachment on a network. My question is where can I find a full list of all characters that need to be preceded by a \ to be considered characters, i.e: \" =" .
Also is there anyway to send keystrokes to another program? I want to send the keystroke control+enter (pressing both keys at the same time). This would allow me to automatically send the e-mail. Thanks for any help!
Code:
//Syntax: mail address subject filename
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
char trial[]="start mailto:\"";
char subj[]="?subject=";
char body[]="&body=<a href=file:///z:";
char ending[]="</a>\"";
strcat(trial,argv[1]);
strcat(trial,subj);
strcat(trial,argv[2]);
strcat(trial,body);
strcat(trial,argv[3]);
strcat(trial,ending);
system(trial);
//wait for app to open and send keystrokes
return 0;
}