Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

<input type=file> problem, why script pauses in IE.au3

$
0
0
Hello Forum,

I tried to fill up a form which has the button <input type="file">,

I got success in clicking the browse button, but after that the script pauses, can't able to send any commands to the browser, why is it so, is there any security restrictions by IE, how to solve this, please help,

Below is my Code
[ autoit ]         
#RequireAdmin ;$btype = $CmdLine[1] ;$filepath = $CmdLine[2] ;$pass = $CmdLine[3] $btype = "Automobile Dealers" $filepath="D:\Datas\Coimbatore_Automobile-Dealers_Data.xml" $pass="avssoft" $weburl="http://jrvindia.com/newdata.php" #include <IE.au3> $oIE = _IECreate($weburl) _IELoadWait($oIE) $sText1 = _IEBodyReadHTML ($oIE) If StringInStr($sText1,"JRV INDIA Data Upload Panel") Then $oform = _IEFormGetObjByName($oIE, "form1") $obtype = _IEFormElementGetObjByName($oform, "database") $oupload = _IEFormElementGetObjByName($oform, "uploadfile") $opassword = _IEFormElementGetObjByName($oform, "secpass") ;_IEFormElementSetValue($obtype, $btype) _IEFormElementSetValue($opassword, $pass) $oSelect = _IEFormElementGetObjByName($oForm, "database") _IEFormElementOptionselect($oSelect, $btype, 1, "byText") ;$oInputFile = _IEFormElementGetObjByName($oForm, "uploadfile") $oElement = _IEFormElementGetObjByName($oForm, "uploadfile") $oElement.fireEvent("onmouseover") $oInput = _IETagnameGetCollection($oForm, "input", 0) _IEAction($oInput, "click") exit ;$Button = _IEGetObjByName ($oIE, "upload") ;_IEAction ( $Button, "click" ) ;_IELoadWait($oIE) Endif


HTML Code

[ autoit ]         
<h1 align="center">JRV INDIA Data Upload Panel</h1> <div align="center"> <form action="newdata.php" method="post" enctype="multipart/form-data" name="form1"> <table align="center"> <tr>      <td colspan="2"><div align="center"><strong>Uplad New Data</strong></div></td> </tr> <tr><td> <p>      <label for="select"></label>      Select The Database      </p> </td>      <p>          <label for="fileField"></label>      </p></td> </tr> <tr>      <td>Select The XML File</td>      <td><input type="file" name="uploadfile" id="uploadfile" /></td> </tr> <tr>      <td>Enter Your Password</td>      <td>      <label for="secpass"></label>      <input type="password" name="secpass" id="secpass" />      </td> </tr> <tr>      <td>&nbsp;</td>      <td><input type="submit" name="upload" id="upload" value="Upload File" /></td> </tr> <tr>      <td colspan="2">&nbsp;</td> </tr> <tr>      <td colspan="2">&nbsp;</td> </tr> </table></form> </div> <p align="center">Developed by <a href="http://www.avssoftwares.in">AVS WEBRAMS INFOTECH</a></p>

Thanks & Regards
Sathish V.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>