Guitz Posted December 28, 2015 Share Posted December 28, 2015 I created a script that autocomplete a form but it doesn't work and I don't know why. Could you help me? Thank you HTML code:<form action="adauga_comentariu.php" method="POST"> Nume:<input type="text" required name="nume_utilizator" id="nume"><br><br> Email:<input type="email" required name="adresa_email" id="email"><br><br> Comentariu:<br> <textarea name="comentariu" cols="45" id="comentariu"></textarea><br><br> <input type="hidden" name="id_model" value="<?=$id_model?>"> <center><input type="submit" id="adauga" value="Adaugă" style="width: 100px; height: 30px; font-size: 16px;"></center> </form> AutoIT code:#include <IE.au3>Local $mag = _IECreate("http://localhost/mag/model.php?id_model=8")Sleep(2000)Local $nume= _IEGetObjById($mag,"nume")Local $email= _IEGetObjById($mag,"email")Local $comentariu= _IEGetObjById($mag,"comentariu")_IEFormElementSetValue ($nume,"Test")_IEFormElementSetValue ($email,"test@test.com")_IEFormElementSetValue ($comentariu,"Test Test Test Test Test") AutoIT errors:>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\Andrei\Desktop\emag.ro.au3" --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147023179, Browser has been deleted prior to operation.)--> IE.au3 T3.0-2 Error from function _IEGetObById, $_IESTATUS_InvalidObjectType--> IE.au3 T3.0-2 Error from function _IEGetObById, $_IESTATUS_InvalidObjectType--> IE.au3 T3.0-2 Error from function _IEGetObById, $_IESTATUS_InvalidObjectType Link to comment Share on other sites More sharing options...
Danyfirex Posted December 28, 2015 Share Posted December 28, 2015 For me is working right.#include <IE.au3> Local $mag = _IECreate("") Local $sHTML = "" $sHTML &= '<form action="adauga_comentariu.php" method="POST">' & @CRLF $sHTML &= 'Nume:<input type="text" required name="nume_utilizator" id="nume"><br><br>' & @CRLF $sHTML &= 'Email:<input type="email" required name="adresa_email" id="email"><br><br>'& @CRLF $sHTML &= 'Comentariu:<br>' & @CRLF $sHTML &= '<textarea name="comentariu" cols="45" id="comentariu"></textarea><br><br>' & @CRLF $sHTML &= '<input type="hidden" name="id_model" value="<?=$id_model?>">' & @CRLF $sHTML &= '<center><input type="submit" id="adauga" value="Adauga" style="width: 100px; height: 30px; font-size: 16px;"></center>' & @CRLF $sHTML &= ' </form>' & @CRLF _IEDocWriteHTML($mag, $sHTML) Local $nume= _IEGetObjById($mag,"nume") Local $email= _IEGetObjById($mag,"email") Local $comentariu= _IEGetObjById($mag,"comentariu") _IEFormElementSetValue ($nume,"Test") _IEFormElementSetValue ($email,"test@test.com") _IEFormElementSetValue ($comentariu,"Test Test Test Test Test")Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
water Posted December 28, 2015 Share Posted December 28, 2015 Is the local web server up and running? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Guitz Posted December 28, 2015 Author Share Posted December 28, 2015 Yes, I use XAMPP and it is working Link to comment Share on other sites More sharing options...
Guitz Posted December 28, 2015 Author Share Posted December 28, 2015 For me is working right.#include <IE.au3> Local $mag = _IECreate("") Local $sHTML = "" $sHTML &= '<form action="adauga_comentariu.php" method="POST">' & @CRLF $sHTML &= 'Nume:<input type="text" required name="nume_utilizator" id="nume"><br><br>' & @CRLF $sHTML &= 'Email:<input type="email" required name="adresa_email" id="email"><br><br>'& @CRLF $sHTML &= 'Comentariu:<br>' & @CRLF $sHTML &= '<textarea name="comentariu" cols="45" id="comentariu"></textarea><br><br>' & @CRLF $sHTML &= '<input type="hidden" name="id_model" value="<?=$id_model?>">' & @CRLF $sHTML &= '<center><input type="submit" id="adauga" value="Adauga" style="width: 100px; height: 30px; font-size: 16px;"></center>' & @CRLF $sHTML &= ' </form>' & @CRLF _IEDocWriteHTML($mag, $sHTML) Local $nume= _IEGetObjById($mag,"nume") Local $email= _IEGetObjById($mag,"email") Local $comentariu= _IEGetObjById($mag,"comentariu") _IEFormElementSetValue ($nume,"Test") _IEFormElementSetValue ($email,"test@test.com") _IEFormElementSetValue ($comentariu,"Test Test Test Test Test")SaludosFor me isn't working this code Link to comment Share on other sites More sharing options...
Danyfirex Posted December 28, 2015 Share Posted December 28, 2015 Does code I posted work for you?What console output do you get running my code?Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Guitz Posted December 28, 2015 Author Share Posted December 28, 2015 >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\Andrei\Desktop\test.au3" --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147023179, Browser has been deleted prior to operation.)--> IE.au3 T3.0-2 Error from function _IEDocWriteHTML, $_IESTATUS_InvalidObjectType (Expected document element)--> IE.au3 T3.0-2 Error from function _IEGetObById, $_IESTATUS_InvalidObjectType--> IE.au3 T3.0-2 Error from function _IEGetObById, $_IESTATUS_InvalidObjectType--> IE.au3 T3.0-2 Error from function _IEGetObById, $_IESTATUS_InvalidObjectType--> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType--> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType--> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType>Exit code: 0 Time: 0.9284 Link to comment Share on other sites More sharing options...
Guitz Posted December 28, 2015 Author Share Posted December 28, 2015 this is the code#include <IE.au3> Local $mag = _IECreate("http://localhost/mag/model.php?id_model=8") Local $sHTML = "" $sHTML &= '<form action="adauga_comentariu.php" method="POST">' & @CRLF $sHTML &= 'Nume:<input type="text" required name="nume_utilizator" id="nume"><br><br>' & @CRLF $sHTML &= 'Email:<input type="email" required name="adresa_email" id="email"><br><br>'& @CRLF $sHTML &= 'Comentariu:<br>' & @CRLF $sHTML &= '<textarea name="comentariu" cols="45" id="comentariu"></textarea><br><br>' & @CRLF $sHTML &= '<input type="hidden" name="id_model" value="<?=$id_model?>">' & @CRLF $sHTML &= '<center><input type="submit" id="adauga" value="Adauga" style="width: 100px; height: 30px; font-size: 16px;"></center>' & @CRLF $sHTML &= ' </form>' & @CRLF _IEDocWriteHTML($mag, $sHTML) Local $nume= _IEGetObjById($mag,"nume") Local $email= _IEGetObjById($mag,"email") Local $comentariu= _IEGetObjById($mag,"comentariu") _IEFormElementSetValue ($nume,"Test") _IEFormElementSetValue ($email,"test@test.com") _IEFormElementSetValue ($comentariu,"Test Test Test Test Test") Link to comment Share on other sites More sharing options...
Danyfirex Posted December 28, 2015 Share Posted December 28, 2015 It look like your server is not working.try the code I posted with _IECreate("") Instead _IECreate("http://localhost/mag/model.php?id_model=8") Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Guitz Posted December 28, 2015 Author Share Posted December 28, 2015 Without my link it works. I need to make something to work using the link... Link to comment Share on other sites More sharing options...
Danyfirex Posted December 28, 2015 Share Posted December 28, 2015 Does your default broswer or any loads that page succesfully ? http://localhost/mag/model.php?id_model=8 Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Guitz Posted December 28, 2015 Author Share Posted December 28, 2015 Yes, both Chrome and IE load the page succesfully Link to comment Share on other sites More sharing options...
jaensterr Posted December 28, 2015 Share Posted December 28, 2015 Could we maybe find out a diffrence in iexplore here?it could be you use a really recent or windows 10 related thing that makes the diffrence?Long story short, could you tell us our iexplore version since iexplore is used for the used UDF Link to comment Share on other sites More sharing options...
Guitz Posted December 28, 2015 Author Share Posted December 28, 2015 I am using Internet Explorer v.11 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now