DaLiMan

[SOLVED] IE send to input name

22 posts in this topic

#1 ·  Posted (edited)

I'm trying to figure out how to send data tot a IE element.
The element HTML code is like below.
 

<input name="ctl00$cph$OfferteDetails$DetailsOverview$ctl02$OndersteuningInkoop$CustomTextBox" type="text" id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_OndersteuningInkoop_CustomTextBox" tabindex="5" class="frm_TextBox" style="background-color:White;width:70px;">

 

I've tried like this (and other variant from the example scripts) but nothing seems to work.
What am I missing here?

Local $oIE = _IECreate("http://intranet/CalculationTool/Pages/Main/CalculationOverview.aspx?QuotationNumber=" & $OfferteNummer & "&QuotationVersionNumber=" & $OfferteVersie, 0,1,1,1)
Local $oText = _IEFormElementGetObjByName($oIE, "ctl00$cph$OfferteDetails$DetailsOverview$ctl02$OndersteuningInkoop$CustomTextBox")
_IEFormElementSetValue($oText, 8)


 

Edited by DaLiMan

Share this post


Link to post
Share on other sites



Just now, DaLiMan said:

What am I missing here?

... to show us your console output from SciTE.

 

 


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
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 API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

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 * Best coding practices * 

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) * 

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: 2017-06-04

Share this post


Link to post
Share on other sites

The first parameter for _IEFormElementGetObjByName should be the form object, not the IE object.

Local $oText = _IEGetObjById($oIE, "ctl00_cph_OfferteDetails_DetailsOverview_ctl02_OndersteuningInkoop_CustomTextBox")
$oText.value = 9

 

Share this post


Link to post
Share on other sites

Sorry....

So it's an invalid object type....
How to get it valid?

All suggestions are very welcome.  ^_^

 

>Running:(3.3.14.2):H:\myPrograms\AutoIt\install\autoit3_x64.exe "H:\myPrograms\AutoIt\Scripts\_IEtest.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147023179, Browser has been deleted prior to operation.)
--> IE.au3 T3.0-2 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType
--> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEQuit, $_IESTATUS_InvalidObjectType
+>10:43:46 AutoIt3.exe ended.rc:0

 

Share this post


Link to post
Share on other sites
1 minute ago, jguinch said:

The first parameter for _IEFormElementGetObjByName should be the form object, not the IE object.

Local $oText = _IEGetObjById($oIE, "ctl00_cph_OfferteDetails_DetailsOverview_ctl02_OndersteuningInkoop_CustomTextBox")
$oText.value = 9

 

Excuse me, missed this one while I was typing...

Share this post


Link to post
Share on other sites

Ok, it seems to be a lot of <DIV id="something"> followed by more <DIV id="nextone"> with some <table class="DG_data"> etc..
How can I find my way in such a nested IE form?

Here a little code of the page.

<div id="OfferteDetailsContainer">
            <div>
    <table class="DataGrid" cellspacing="0" rules="all" border="1" id="ctl00_cph_OfferteDetails_DetailsOverview" style="border-collapse:collapse;">
        <tr class="DG_HeaderStyle">
            <th scope="col">&nbsp;</th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$Aantal')">Aantal</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$ArtikelNummer')">Artikel</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$ArtikelOmschrijving')">Artikel omschrijving</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$DV')">DV</a></th><th scope="col">&nbsp;</th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$HGS')">HGS</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$Leverancier')">Leverancier</a></th><th scope="col">Bruto prijs (€)</th><th scope="col">Korting-1 (%)</th><th scope="col">Korting-2 (%)</th><th scope="col">Korting-3 (%)</th><th scope="col">Netto Prijs (€)</th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$NettoWaarde')">Netto waarde (€)</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$VerrekenWaarde')">Verreken waarde (€)</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$MargeExclusiefComponenten')">Marge excl componenten (%)</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$MargeInclusiefComponenten')">Marge incl componenten (%)</a></th><th scope="col">Automatische BMC (€)</th><th scope="col">Ondersteuning Inkoop (%)</th><th scope="col">Grondslag Inkoop</th><th scope="col">Ondersteuning Leverancier (%)</th><th scope="col">Grondslag Leverancier</th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$TotaalOndersteuning')">Totale ondersteuning (€)</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$VerrekenPrijs')">VerrekenPrijs (€)</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$InkoopPrijs')">Inkoop prijs (€)</a></th><th scope="col"><a href="javascript:__doPostBack('ctl00$cph$OfferteDetails$DetailsOverview','Sort$VrachtRecht')">Vrachtrecht (%)</a></th>
        </tr><tr class="DG_ItemStyle" data-rowindex="0" style="white-space:nowrap;">
            <td style="color:Orange;width:100px;">&nbsp;</td><td style="width:100px;">300</td><td style="width:100px;">8925923</td><td style="width:100px;">PH MASTERLED 10-50 AR111 2724D</td><td style="width:100px;">8</td><td>
                
            </td><td style="width:100px;">220301</td><td style="width:100px;">32607</td><td style="width:100px;">45,00</td><td>
                <input name="ctl00$cph$OfferteDetails$DetailsOverview$ctl02$Korting1$CustomTextBox" type="text" value="42,22" id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_Korting1_CustomTextBox" tabindex="1" class="frm_TextBox" style="background-color:LightGreen;width:70px;" />

<br />
<span id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_Korting1_validator" style="color:Red;display:none;">Verkeerde invoer</span>
            </td><td>
                <input name="ctl00$cph$OfferteDetails$DetailsOverview$ctl02$Korting2$CustomTextBox" type="text" id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_Korting2_CustomTextBox" tabindex="2" class="frm_TextBox" style="background-color:LightGreen;width:70px;" />

<br />
<span id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_Korting2_validator" style="color:Red;display:none;">Verkeerde invoer</span>
            </td><td>
                <input name="ctl00$cph$OfferteDetails$DetailsOverview$ctl02$Korting3$CustomTextBox" type="text" id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_Korting3_CustomTextBox" tabindex="3" class="frm_TextBox" style="background-color:LightGreen;width:70px;" />

<br />
<span id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_Korting3_validator" style="color:Red;display:none;">Verkeerde invoer</span>
            </td><td>
                <input name="ctl00$cph$OfferteDetails$DetailsOverview$ctl02$NettoPrijs$CustomTextBox" type="text" value="26,00" id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_NettoPrijs_CustomTextBox" tabindex="4" class="frm_TextBox" style="background-color:LightCoral;width:70px;" />

<br />
<span id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_NettoPrijs_validator" style="color:Red;display:none;">Verkeerde invoer</span>
            </td><td style="width:100px;">7800,00</td><td style="width:100px;">6684,00</td><td style="width:100px;">14,31</td><td style="width:100px;">14,31</td><td style="width:100px;">
                <span id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_AutomatischeBMC" DoubleOnly="True" style="color:Black;"></span>
            </td><td style="width:100px;">
                <input name="ctl00$cph$OfferteDetails$DetailsOverview$ctl02$OndersteuningInkoop$CustomTextBox" type="text" id="ctl00_cph_OfferteDetails_DetailsOverview_ctl02_OndersteuningInkoop_CustomTextBox" tabindex="5" class="frm_TextBox" style="background-color:White;width:70px;" />

 

Share this post


Link to post
Share on other sites
Just now, DaLiMan said:

 

>Running:(3.3.14.2):H:\myPrograms\AutoIt\install\autoit3_x64.exe "H:\myPrograms\AutoIt\Scripts\_IEtest.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147023179, Browser has been deleted prior to operation.)
--> IE.au3 T3.0-2 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType
--> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEQuit, $_IESTATUS_InvalidObjectType
+>10:43:46 AutoIt3.exe ended.rc:0

 

The main problem is first  error.
Is it from _IECreate ?


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
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 API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

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 * Best coding practices * 

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) * 

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: 2017-06-04

Share this post


Link to post
Share on other sites
20 minutes ago, mLipok said:

The main problem is first  error.
Is it from _IECreate ?

Yes, I'm opening the IE window with _IEcreate like this.

Local $oIE = _IECreate("http://intranet/CalculationTool/Pages/Main/CalculationOverview.aspx?QuotationNumber=" & $OfferteNummer & "&QuotationVersionNumber=" & $OfferteVersie, 0,1,1,1)

 

Share this post


Link to post
Share on other sites
19 minutes ago, jguinch said:

Did you try my example ? It works with the html code your posted

Yes I did, but it is not working here.

Share this post


Link to post
Share on other sites
Just now, DaLiMan said:

Yes, I'm opening the IE window with _IEcreate like this.

Local $oIE = _IECreate("http://intranet/CalculationTool/Pages/Main/CalculationOverview.aspx?QuotationNumber=" & $OfferteNummer & "&QuotationVersionNumber=" & $OfferteVersie, 0,1,1,1)

 

Try this:

Local $oIE = _IECreate("http://intranet/CalculationTool/Pages/Main/CalculationOverview.aspx?QuotationNumber=" & $OfferteNummer & "&QuotationVersionNumber=" & $OfferteVersie, 0,1,0,1)

And you should reattach to this IE after URL is loaded completly.


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
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 API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

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 * Best coding practices * 

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) * 

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: 2017-06-04

Share this post


Link to post
Share on other sites

Just tried this, but stil no luck.

@mLipok how can I reattach to IE?

 

Local $oIE = _IECreate("http://intranet/CalculationTool/Pages/Main/CalculationOverview.aspx?QuotationNumber=" & $OfferteNummer & "&QuotationVersionNumber=" & $OfferteVersie,1)
Local $oText = _IEGetObjById($oIE, "ctl00_cph_OfferteDetails_DetailsOverview_ctl02_OndersteuningInkoop_CustomTextBox")
$oText.value = 9

 

Share this post


Link to post
Share on other sites

With _IEAttach of course.

Share this post


Link to post
Share on other sites
1 hour ago, Juvigy said:

With _IEAttach of course.

Ah, that was obvious. Sorry for that.

So now I'm able to re-attach.  (because the msgbox is showing the right URL))
But stil not able to set the value in the form input, which should be possible now.

Please help / advice me....

 

Global $OfferteNummer = 382901
Global $OfferteVersie = 1

AutoItSetOption("WinTitleMatchMode",2)

_DebugOut("IEcreate")
Local $oIE = _IECreate("http://intranet/CalculationTool/Pages/Main/CalculationOverview.aspx?QuotationNumber=" & $OfferteNummer & "&QuotationVersionNumber=" & $OfferteVersie,0,1,0,1)
Sleep(1500)

$oIE2 = _IEAttach("CalculationTool", "url")
local $IEhwnd = _IEPropertyGet($oIE2, "hwnd")
MsgBox($MB_SYSTEMMODAL, "The URL", _IEPropertyGet($oIE2, "locationurl"))

Sleep(1500)
Local $oText = _IEGetObjById($oIE2, "ctl00_cph_OfferteDetails_DetailsOverview_ctl02_OndersteuningInkoop_CustomTextBox")
_IEFormElementSetValue($oText, "9")

 

Share this post


Link to post
Share on other sites

Did you miss something again ? ...... c.......e o.....t

??

 


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
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 API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

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 * Best coding practices * 

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) * 

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: 2017-06-04

Share this post


Link to post
Share on other sites

Do you get the right element ?

Try to output $oText.Name or $oText.Text to see if you got the right one. You may have several frames with similar elements.

Share this post


Link to post
Share on other sites
5 hours ago, mLipok said:

Did you miss something again ? ...... c.......e o.....t

??

 

:>

Share this post


Link to post
Share on other sites
2 hours ago, Juvigy said:

Do you get the right element ?

Try to output $oText.Name or $oText.Text to see if you got the right one. You may have several frames with similar elements.

Oké, I'll try to find out tomorrow and report back.

Thanks for the patience. I'll probably look stupid not getting it right. :(

Share this post


Link to post
Share on other sites

Also take a look at the help file for _IEFormElementSetValue.  I think you have to get a valid form object using _IEFormGetObjByName or_IEFormGetCollection before you can start setting the values of the form.

Share this post


Link to post
Share on other sites

 

18 hours ago, Juvigy said:

Do you get the right element ?

Try to output $oText.Name or $oText.Text to see if you got the right one. You may have several frames with similar elements.

Changing the GetObj from ID to NAME is giving me acces to the element.

@jguinch It seems your code did the trick, I had to change the element to 'name'  instead of 'id'. 

 

Local $oKorting= _IEGetObjByName($oIE2, "ctl00$cph$OfferteDetails$DetailsOverview$ctl02$OndersteuningInkoop$CustomTextBox")
$oKorting.value = 9

 

Thanks everone, for helping me out.
 

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