Jump to content

[SOLVED] IE send to input name


Recommended Posts

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
Link to comment
Share on other sites

Just now, DaLiMan said:

What am I missing here?

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

 

 

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 Codefor 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 * 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 TaskSchedulerIE 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 stuffOnHungApp handlerAvoid "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"
: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: 2023-04-24

Link to comment
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

 

Link to comment
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

 

Link to comment
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...

Link to comment
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;" />

 

Link to comment
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:
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 Codefor 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 * 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 TaskSchedulerIE 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 stuffOnHungApp handlerAvoid "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"
: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: 2023-04-24

Link to comment
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)

 

Link to comment
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:
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 Codefor 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 * 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 TaskSchedulerIE 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 stuffOnHungApp handlerAvoid "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"
: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: 2023-04-24

Link to comment
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

 

Link to comment
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")

 

Link to comment
Share on other sites

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

??

 

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 Codefor 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 * 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 TaskSchedulerIE 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 stuffOnHungApp handlerAvoid "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"
: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: 2023-04-24

Link to comment
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. :(

Link to comment
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.
 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...