MirnesC2 Posted September 9, 2013 Share Posted September 9, 2013 (edited) Hey, there is a checkbox on IE which I would like to manipulate. The .HTML is as follows.. <td><input type="checkbox" value="557" name="stopCheck[]"></td> I have tried this.. (using the IEFormElementCheckBoxSelect) _IELoadWait($oIE) Local $oForm = _IEFormGetCollection($oIE, 0) _IEFormElementCheckBoxSelect($oForm, 0, "stopCheck[]", 1, "byIndex") But it still will not check the box. I am either doing something wrong in $oForm with the IEFormGetCollection() or IEFormElementCheckBoxSelect() but can't figure out what >.> I followed the examples in the help files.. Any ideas? Thanks! Edited September 9, 2013 by MirnesC2 Link to comment Share on other sites More sharing options...
Kidney Posted September 9, 2013 Share Posted September 9, 2013 whats the website?? Link to comment Share on other sites More sharing options...
mLipok Posted September 9, 2013 Share Posted September 9, 2013 (edited) are you sure $oForm is an object ? Look for ObjEvent in documentation exacly for example with _ErrFunc($oError) or just use _IEErrorNotify ( True ) EDIT: sorry better be this: _IEErrorHandlerRegister() Edited September 9, 2013 by mlipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
MirnesC2 Posted September 10, 2013 Author Share Posted September 10, 2013 Welp so much for a simple script, running into problems around every corner it seems >.> This is what I am looking to check off.. are you sure $oForm is an object ? Look for ObjEvent in documentation exacly for example with _ErrFunc($oError) or just use _IEErrorNotify ( True ) EDIT: sorry better be this: _IEErrorHandlerRegister() That does sound like it could be the issue, it's most likely not hooked right to the box so it can't check it off.. which is what the error messages are saying I am assuming. --> IE.au3 V2.4-0 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Warning from function _IEFormElementCheckboxSelect, $_IEStatus_NoMatch How do I find the right object? Link to comment Share on other sites More sharing options...
mLipok Posted September 10, 2013 Share Posted September 10, 2013 this is your problem: --> IE.au3 V2.4-0 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted September 10, 2013 Share Posted September 10, 2013 (edited) try to replace _IELoadWait($oIE) Local $oForm = _IEFormGetCollection($oIE, 0) _IEFormElementCheckBoxSelect($oForm, 0, "stopCheck[]", 1, "byIndex") with that: _IELoadWait($oIE) ConsoleWrite('IsObj($oIE) = ' & IsObj($oIE) & @CRLF) $oForms = _IEFormGetCollection($oIE) ConsoleWrite('IsObj($oForms) = ' & IsObj($oForms) & @CRLF) For $oForm In $oForms ConsoleWrite('$oForm.name = ' & $oForm.name & @CRLF) ConsoleWrite('$oForm.id = ' & $oForm.id & @CRLF) Next Local $oForm = _IEFormGetCollection($oIE, 0) _IEFormElementCheckBoxSelect($oForm, 0, "stopCheck[]", 1, "byIndex") and show what you get in console EDIT: or just simply add a new function: Func _IE_test_FormCollection(ByRef $oIE) ConsoleWrite('! IsObj($oIE) = ' & IsObj($oIE) & @CRLF) $oForms = _IEFormGetCollection($oIE) ConsoleWrite('! IsObj($oForms) = ' & IsObj($oForms) & @CRLF) For $oForm In $oForms ConsoleWrite('! $oForm.name = ' & $oForm.name & @CRLF) ConsoleWrite('! $oForm.id = ' & $oForm.id & @CRLF) Next EndFunc ;==>_IE_test_FormCollection and change your script: _IELoadWait($oIE) _IE_test_FormCollection($oIE) Local $oForm = _IEFormGetCollection($oIE, 0) _IEFormElementCheckBoxSelect($oForm, 0, "stopCheck[]", 1, "byIndex") Edited September 10, 2013 by mlipok MirnesC2 1 Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted September 10, 2013 Share Posted September 10, 2013 (edited) take a look here: '?do=embed' frameborder='0' data-embedContent>> use this: _IE_test_FormElementCollection($oIE) and give me the result of the function, which is visible in the console. EDIT: remeber to use AutoIt 3.3.9.20 BETA Edited September 10, 2013 by mlipok MirnesC2 1 Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
MirnesC2 Posted September 11, 2013 Author Share Posted September 11, 2013 take a look here: '?do=embed' frameborder='0' data-embedContent>> use this: _IE_test_FormElementCollection($oIE) and give me the result of the function, which is visible in the console. EDIT: remeber to use AutoIt 3.3.9.20 BETA Thats a useful .udf thanks for that! output... expandcollapse popup>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\User\Desktop\ddd.au3" --> IE.au3 V2.4-0 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType ! _IE_test_FormElementCollection: IsObj($oIE) = 1 ! _IE_test_FormElementCollection: IsObj($oForms) = 1 ! _IE_test_FormElementCollection: $iForm_index = 0 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="host" class="m-wrap small" type="text" placeholder="00000000"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = host ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="port" class="m-wrap small" type="text" placeholder="80"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = port ! _IE_test_FormElementCollection: $iElement_index = 2 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="time" class="m-wrap small" type="text" placeholder="60"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = time ! _IE_test_FormElementCollection: $iElement_index = 3 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" checked="" value="Method Type"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 4 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="charge"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 5 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="css"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 6 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="syn"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 7 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="Hide" type="checkbox" value="yes"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = Hide ! _IE_test_FormElementCollection: $iElement_index = 8 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="goBtn" class="btn blue" type="submit" value="Go!"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = goBtn ! _IE_test_FormElementCollection: $iForm_index = 1 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="host" class="m-wrap medium" type="text" placeholder="web address"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = host ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="port" type="hidden" value="80"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = port ! _IE_test_FormElementCollection: $iElement_index = 2 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="time" class="m-wrap small" type="text" placeholder="60"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = time ! _IE_test_FormElementCollection: $iElement_index = 3 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" checked="" value="xml"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 4 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="rude"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 5 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="mear"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 6 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="slow"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 7 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="get"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 8 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="post"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 9 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="head"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 10 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="goBtn" class="btn blue" type="submit" value="Go!"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = goBtn ! _IE_test_FormElementCollection: $iForm_index = 2 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="stopCheck[]" type="checkbox" value="2241"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = stopCheck[] ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="stopbtn" class="btn red" type="submit" value="Stop!"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = stopbtn ! _IE_test_FormElementCollection: $iForm_index = 3 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="host2" class="m-wrap small" type="text" placeholder="000000"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = host2 ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="port2" class="m-wrap small" type="text" placeholder="80"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = port2 ! _IE_test_FormElementCollection: $iElement_index = 2 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="times" class="m-wrap small" type="text" placeholder="15"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = times ! _IE_test_FormElementCollection: $iElement_index = 3 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="redirect" class="btn light-blue" type="submit" value="Redirect" !"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = redirect --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementCheckboxSelect, $_IEStatus_InvalidDataType >Exit code: 0 Time: 2.416 I think this the bit we are looking for is this.. ! _IE_test_FormElementCollection: $iForm_index = 2 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="stopCheck[]" type="checkbox" value="2241"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = stopCheck[] ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="stopbtn" class="btn red" type="submit" value="Stop!"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = stopbtn So how do we set it up to find the form/object now? Link to comment Share on other sites More sharing options...
mLipok Posted September 11, 2013 Share Posted September 11, 2013 now tell me With the new knowlege, How you want to use the standard _IE function ? MirnesC2 1 Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mikell Posted September 11, 2013 Share Posted September 11, 2013 (edited) This way doesn't work ? $cb = _IEGetObjByName($oIE, "stopCheck[]") $cb.checked = true Edited September 11, 2013 by mikell MirnesC2 1 Link to comment Share on other sites More sharing options...
Solution mLipok Posted September 11, 2013 Solution Share Posted September 11, 2013 try this: $oForm2 = _IEFormGetCollection ( $oIE , 2) $oForm2_elCheck = _IEFormElementGetObjByName($oForm2,"stopCheck[]") $oForm2_elCheck.checked = true or this: $oForm2 = _IEFormGetCollection ( $oIE , 2) _IEFormElementCheckBoxSelect($oForm2, 0, "", 1, "byIndex") MirnesC2 1 Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
MirnesC2 Posted September 12, 2013 Author Share Posted September 12, 2013 try this: $oForm2 = _IEFormGetCollection ( $oIE , 2) $oForm2_elCheck = _IEFormElementGetObjByName($oForm2,"stopCheck[]") $oForm2_elCheck.checked = true or this: $oForm2 = _IEFormGetCollection ( $oIE , 2) _IEFormElementCheckBoxSelect($oForm2, 0, "", 1, "byIndex") Got it! Thanks for that and the udf Link to comment Share on other sites More sharing options...
mLipok Posted September 12, 2013 Share Posted September 12, 2013 Tell me: Which one works ? Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 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