已经解决,代码如下:$hForm=guicreate("form",300,230)
$hEdit=guictrlcreateedit("",0,0,300,200)
$hBut=guictrlcreatebutton("submit",120,205,60,20)
guisetstate()
while 1
switch guigetmsg()
case -3
exitloop
case $hBut
$text=guictrlread($hEdit)
$htm=_fairy_post("http://localhost/bbs/get.php",$text)
clipput($htm)
msgbox(0,'ok','ok')
endswitch
wend
func _fairy_post($url,$data)
$oHTTP = ObjCreate("microsoft.xmlhttp")
$oHTTP.Open("post",$url,false)
$oHTTP.setRequestHeader("Cache-Control", "no-cache")
$oHTTP.setRequestHeader("Accept-Language", "zh-cn")
$oHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.setRequestHeader("Referer",$url)
$oHTTP.Send("text="&$data)
$htm = $oHTTP.responseText
return $htm
endfunc
|