|
发表于 2014-10-24 09:05:16
|
显示全部楼层
本帖最后由 libo1220 于 2014-10-24 09:13 编辑
楼主我的也是这个问题,帮忙指导指导
我参照过你的代码,但是不行
不知道这句是什么意思: ControlSend($selectFileButton, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{space}")
html代码:
<BODY background=../_themes/construc/urbtextb.gif aLink=#ff0066 link=#009900 text=#330033 vLink=#996600><BR><FONT class=lemon1 color=#000000>
1、点“<FONT color=#cc3366>Browser</FONT>”按钮,找到您所要粘贴的附件:</FONT>
<P></P>
<P><FONT class=chinese color=#000000>2<SPAN class=lemon1>、选定一个文件后,点“<FONT color=#cc3366>粘贴</FONT>”按钮,将该文件贴到邮件上:</SPAN></FONT> </P>
<FORM id=form1 encType=multipart/form-data method=post name=form1 action=GetFundFile.asp><INPUT value=attchment type=hidden name=sendtype>
<TABLE cellPadding=0 cellspaceing="0">
<TBODY>
<TR>
<TD>附件1:</TD>
<TD><INPUT size=60 type=file name=FILE1></TD>
</TR>
<TR></TR>
<TR></TR>
<TR>
<TD></TD>
<TR>
<TD colSpan=2 align=middle>
<INPUT id=submit1 value=粘贴 type=submit name=submit1>
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
</BODY>
代码如下:
Local $attachFileForm = _IEFormGetObjByName($oIESelectFile,"form1") ; $oIEGetFundFile
Local $selectFileButton=_IEFormElementGetObjByName($attachFileForm,"FILE1")
Local $attchmentTextfield = _IEFormElementGetObjByName($attachFileForm,"sendtype") ;
Local $file=$filepath&"对帐结果管理.xls"
;MsgBox("","","1")
;_IEAction($selectFileButton,"click")
_IEAction($selectFileButton,"focus")
ControlSend($selectFileButton, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{space}")
WinActivate($oIE)
ControlSetText("选择要加载的文件", "", "[CLASS:Edit; INSTANCE:1]", $file )
ControlSend("选择要加载的文件", "", "[CLASS:Button; INSTANCE:1]", "{enter}")
;$oBZf=_IETagNameGetCollection($attchmentTextfield, "input",2)
_IEAction($attchmentTextfield,"click") |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|