Jump to content
Sign in to follow this  
MirnesC2

Cant check checkbox!

Recommended Posts

MirnesC2

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 by MirnesC2

Share this post


Link to post
Share on other sites
Kidney

whats the website??

Share this post


Link to post
Share on other sites
mLipok

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 by mlipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  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 APIErrorLog.au3 UDF - A logging Library
 

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 *

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 * 

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

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 *

"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"
:naughty:  :ranting:, 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: 2018-10-15

Share this post


Link to post
Share on other sites
MirnesC2

Welp so much for a simple script, running into problems around every corner it seems >.>

This is what I am looking to check off..

09RAlMU.png

 

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?

Share this post


Link to post
Share on other sites
mLipok

this is your problem:

 

--> IE.au3 V2.4-0 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  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 APIErrorLog.au3 UDF - A logging Library
 

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 *

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 * 

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

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 *

"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"
:naughty:  :ranting:, 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: 2018-10-15

Share this post


Link to post
Share on other sites
mLipok

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 by mlipok
  • Like 1

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  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 APIErrorLog.au3 UDF - A logging Library
 

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 *

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 * 

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

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 *

"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"
:naughty:  :ranting:, 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: 2018-10-15

Share this post


Link to post
Share on other sites
mLipok

take a look here:

'?do=embed' frameborder='0' data-embedContent>>

use this:

  1. _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 by mlipok
  • Like 1

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  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 APIErrorLog.au3 UDF - A logging Library
 

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 *

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 * 

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

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 *

"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"
:naughty:  :ranting:, 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: 2018-10-15

Share this post


Link to post
Share on other sites
MirnesC2

 

take a look here:

'?do=embed' frameborder='0' data-embedContent>>

use this:

  1. _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...

>"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?

Share this post


Link to post
Share on other sites
mLipok

now tell me

With the new knowlege,

How you want to use the standard _IE function ?

  • Like 1

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  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 APIErrorLog.au3 UDF - A logging Library
 

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 *

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 * 

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

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 *

"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"
:naughty:  :ranting:, 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: 2018-10-15

Share this post


Link to post
Share on other sites
mikell

This way doesn't work ?

$cb = _IEGetObjByName($oIE, "stopCheck[]")
$cb.checked = true
Edited by mikell
  • Like 1

Share this post


Link to post
Share on other sites
mLipok

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")
  • Like 1

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  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 APIErrorLog.au3 UDF - A logging Library
 

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 *

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 * 

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

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 *

"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"
:naughty:  :ranting:, 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: 2018-10-15

Share this post


Link to post
Share on other sites
mLipok

Tell me: Which one works ?


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  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 APIErrorLog.au3 UDF - A logging Library
 

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 *

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 * 

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

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 *

"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"
:naughty:  :ranting:, 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: 2018-10-15

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×