tiger858 Posted October 1, 2013 Posted October 1, 2013 (edited) I have this code but it does not work can you please tell me why ? #include <IE.au3> $oIE = _IECreate("https://www.dropbox.com/login?lhs_type=anywhere") $username= _IEFormGetObjByName($oIE, "login_email") $password=_IEFormGetObjByName($oIE,"login_password") $submit=_IEFormGetObjByName($oIE,"login_submit_dummy") _IEFormElementSetValue($username, "username") _IEFormElementSetValue($password, "password") _IEAction($submit, "click") Also after i log in i would like to do a search within drop box how would i do this Edited October 1, 2013 by tiger858
water Posted October 1, 2013 Posted October 1, 2013 You need to add some error checking to your code. Every _IE* function sets @error to a non zero value to describe the type of error. The help file is your friend too My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
tiger858 Posted October 1, 2013 Author Posted October 1, 2013 i have been reading the help file and i can't even seem to get that copy paste script to work haha #include <IE.au3> Local $oIE = _IECreate("http://www.google.com") Local $oForm = _IEFormGetObjByName($oIE, "f") Local $oQuery = _IEFormElementGetObjByName($oForm, "q") _IEFormElementSetValue($oQuery, "AutoIt IE.au3") _IEFormSubmit($oForm) straight from the help file but does not work
water Posted October 1, 2013 Posted October 1, 2013 (edited) Add some error checking: Global $oIE = _IECreate("http://www.google.com") ConsoleWrite("_IECreate: " & @error & @LF) Global $oForm = _IEFormGetObjByName($oIE, "f") ConsoleWrite("_IEFormGetObjByName: " & @error & @LF) Global $oQuery = _IEFormElementGetObjByName($oForm, "q") ConsoleWrite("_IEFormElementGetObjByName: " & @error & @LF) _IEFormElementSetValue($oQuery, "AutoIt IE.au3") ConsoleWrite("_IEFormElementSetValue: " & @error & @LF) _IEFormSubmit($oForm) ConsoleWrite("_IEFormSubmit: " & @error) Edited October 1, 2013 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
water Posted October 1, 2013 Posted October 1, 2013 BTW: Please enclose AutoIt code in code tags. The editor has a blue Autoit icon for that. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
tiger858 Posted October 1, 2013 Author Posted October 1, 2013 (edited) Add some error checking: Global $oIE = _IECreate("http://www.google.com") ConsoleWrite("_IECreate: " & @error) Global $oForm = _IEFormGetObjByName($oIE, "f") ConsoleWrite("_IEFormGetObjByName: " & @error) Global $oQuery = _IEFormElementGetObjByName($oForm, "q") ConsoleWrite("_IEFormElementGetObjByName: " & @error) _IEFormElementSetValue($oQuery, "AutoIt IE.au3") ConsoleWrite("_IEFormElementSetValue: " & @error) _IEFormSubmit($oForm) ConsoleWrite("_IEFormSubmit: " & @error) I used your script and it ran but still just opened the ie page to google and did nothing , how do i check errors ? sorry for all the newbie questions don't mean to be annoying , thank you for trying to help Edited October 1, 2013 by tiger858
water Posted October 1, 2013 Posted October 1, 2013 The ConsoleWrite("xxx: " & @error) statements that return values <> 0 denote an error. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
tiger858 Posted October 1, 2013 Author Posted October 1, 2013 it does not look like it returns anything ?
water Posted October 1, 2013 Posted October 1, 2013 if I press F5 in SciTE to run the script I get: >Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Temp\Test.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop _IECreate: 0 --> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch _IEFormGetObjByName: 7 --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType _IEFormElementGetObjByName: 3 --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType _IEFormElementSetValue: 3 --> IE.au3 V2.4-0 Error from function _IEFormSubmit, $_IEStatus_InvalidDataType _IEFormSubmit: 3 +>15:40:31 AutoIt3.exe ended.rc:0 >Exit code: 0 Time: 1.121 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
tiger858 Posted October 1, 2013 Author Posted October 1, 2013 (edited) it just runs the script , maybe because i'm in windows 8 ? also did you put #include <IE.au3> in ? Edited October 1, 2013 by tiger858
water Posted October 1, 2013 Posted October 1, 2013 No. If you press F5 in SciTE you always get this output in the error pane in the lower part of the screen. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
tiger858 Posted October 1, 2013 Author Posted October 1, 2013 oh was not looking at that part sorry so where do i go from here ?
water Posted October 1, 2013 Posted October 1, 2013 also did you put #include <IE.au3> in ? Sure. Doesn't work without this statement. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
water Posted October 1, 2013 Posted October 1, 2013 The example script works fine as soon as you replace Global $oForm = _IEFormGetObjByName($oIE, "f") with Global $oForm = _IEFormGetObjByName($oIE, "gbqf") My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
water Posted October 1, 2013 Posted October 1, 2013 Which error messages do you get from your original script? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
tiger858 Posted October 1, 2013 Author Posted October 1, 2013 oh so the script must of been old and google updated ? okay i think i'm getting my head wrapped around this a little more now , sorry for being so annoying. what would be the easiest way to find the $oForm of a page ?
water Posted October 1, 2013 Posted October 1, 2013 Search the sourcecode for "<form". My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
tiger858 Posted October 1, 2013 Author Posted October 1, 2013 include <IE.au3> $oIE = _IECreate("https://www.dropbox.com/login?lhs_type=anywhere") ConsoleWrite("_IECreate: " & @error & @LF) $o_Form=_IEFormGetObjByName($oIE,"t") ConsoleWrite("_IEFormGetObjByName: " & @error & @LF) $o_username= _IEFormElementGetObjByName($o_Form, "login_email") ConsoleWrite("_IEFormElementGetObjByName: " & @error & @LF) $o_password=_IEFormElementGetObjByName($o_Form,"login_password") ConsoleWrite("_IEFormElementGetObjByName: " & @error & @LF) _IEFormElementSetValue($o_username, "username") ConsoleWrite("_IEFormElementSetValue: " & @error & @LF) _IEFormElementSetValue($o_password, "password") ConsoleWrite("_IEFormElementSetValue: " & @error & @LF) _IEFormSubmit ($o_form) ConsoleWrite("_IEFormSubmit: " & @error) i updated original , still doe not work but error is >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\Dan\Desktop\ssssssssssssssssssss.au3" _IECreate: 0--> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch _IEFormGetObjByName: 7--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType _IEFormElementGetObjByName: 3--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType _IEFormElementSetValue: 3--> IE.au3 V2.4-0 Error from function _IEFormSubmit, $_IEStatus_InvalidDataType _IEFormSubmit: 3>Exit code: 0 Time: 1.227
water Posted October 1, 2013 Posted October 1, 2013 Looks like "t" is not the name of the login form. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
tiger858 Posted October 1, 2013 Author Posted October 1, 2013 <form action="/login" novalidate="novalidate" method="post"><input type="hidden" name="t" value="vgY1oWb3gPVzLr_Xb5dxKdRS" /><input type="hidden" name="lhs_type" value="default" /><div class="alternative-option">(or <a id="register-link">create an account</a>)</div><div class="title-text">Sign in</div><div id="login-partial">
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