有什么方法可以从 ac# 应用程序中获取元素的内容或浏览器中打开的网页的控件吗?
我试图获得窗口 ex,但在与它进行任何形式的交流之后我不知道如何使用它。我也试过这个代码:
using (var client = new WebClient())
{
var contents = client.DownloadString("http://www.google.com");
Console.WriteLine(contents);
}
Run Code Online (Sandbox Code Playgroud)
这段代码给了我很多我无法使用的数据。
我正在尝试使用c ++ visual studio 2013发送电子邮件.从网上搜索我发现了一些代码示例,但我仍然无法发送电子邮件.在一些代码中我gt错误包括文件没有这样的文件或目录
#include sys/socket.h
我也尝试过提升,但它只是卡住了.谁能帮我?我试过的最后一个代码:
#include<iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
using namespace std;
#define HELO "HELO 192.168.1.1\r\n"
#define DATA "DATA\r\n"
#define QUIT "QUIT\r\n"
//#define h_addr h_addr_list[0]
//FILE *fin;
int sock;
struct sockaddr_in server;
struct hostent *hp, *gethostbyname();
char buf[BUFSIZ+1];
int len;
char *host_id="192.168.1.10";
char *from_id="rameshgoli@domain.com";
char *to_id="rameshgoli@domain.com";
char *sub="testmail\r\n";
char wkstr[100]="hello how r u\r\n";
/*=====Send a string to the socket=====*/
void send_socket(char *s)
{
write(sock,s,strlen(s));
write(1,s,strlen(s));
//printf("Client:%s\n",s);
}
//=====Read a string …
Run Code Online (Sandbox Code Playgroud)