Jump to content

Recommended Posts

Posted (edited)

I use IE in for next loop

to set value in INPUT and search something on the web

when site take me back response then I read what I need and back to home site

and again set value ....

 

 

  Quote
<INPUT style="WIDTH: 135px" id=MainContent_txtAdvPesel maxLength=11 type=text name=ctl00$MainContent$txtAdvPesel>

 

$oIE_aspnetForm = _IEGetObjById($oIE, "aspnetForm")
$oIE_aspnetForm_ctl00_MainContent_txtAdvPesel = _IEFormElementGetObjByName($oIE_aspnetForm, "ctl00$MainContent$txtAdvPesel")
 
;When I use
Consolewrite(isobj($oIE_aspnetForm_ctl00_MainContent_txtAdvPesel) & @CRLF)
;then result is always = 1
 
 
;I Check to be sure that I have taken correct OBJ
Consolewrite($oIE_aspnetForm_ctl00_MainContent_txtAdvPesel.name & @CRLF)
;then result is always = ctl00$MainContent$txtAdvPesel
 
 
 
;so why not always but very often
;this function
_IEFormElementSetValue($oIE_aspnetForm_ctl00_MainContent_txtAdvPesel, $s_new_value, 1)
; return to me that error

 

  Quote

;~ C:\Program Files\AutoIt3\Include\ie.au3 (1307) : ==> The requested action with this object has failed.:

;~ $o_object.fireEvent("OnClick")
;~ $o_object.fireEvent("OnClick")^ ERROR
 

 

 

I do severals test by adding

sleep - do not take any diffrence 

trying to _IEAction($oIE_aspnetForm_ctl00_MainContent_txtAdvPesel,"click") - before SetValue

trying to _IEAction($oIE_aspnetForm_ctl00_MainContent_txtAdvPesel,"focus") - before SetValue

 
 
Click And Focus give me back that same errors
 
When I start again "For ... to ..." then its can do for example 50 more steps and crash 
sometimes do only 10 step somtimes 30 steps a 
 
 
Edited 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 Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Do you get any error messages when running your script from SciTE?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Yes

  Quote

 

The requested action with this object has failed

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:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

To be more precise. Do you get any error messages from the IE UDF like: No Match found.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

I see another strange thing

In IE when I use Developer Tool (F12) 

and Want to copy outerhtml   or innerhtml   of this tag

  Quote

 

<INPUT style="WIDTH: 135px" id=MainContent_txtAdvPesel maxLength=11 type=text name=ctl00$MainContent$txtAdvPesel>

 

I get nothing (clipboard is empty).

but if I refresh the site and try again to copy this tag then I get 

  Quote
<INPUT style="WIDTH: 135px" id=MainContent_txtAdvPesel maxLength=11 type=text name=ctl00$MainContent$txtAdvPesel>

 

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:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

oops

....

I forgot to enable COM error handling

....

now I must wait to do test toomorow 

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:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
--> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
!>$o_AutoIt_MyErrFunc.number is: -2147352567
$o_AutoIt_MyErrFunc.windescription: Nieokreślony błąd. (UNKNOWN ERROR)
 
$o_AutoIt_MyErrFunc.description is: Nieokreślony błąd. (UNKNOWN ERROR)
$o_AutoIt_MyErrFunc.source is: htmlfile
$o_AutoIt_MyErrFunc.helpfile is: C:WINDOWSsystem32mshtml.hlp
$o_AutoIt_MyErrFunc.helpcontext is: 0
$o_AutoIt_MyErrFunc.lastdllerror is: 0
$o_AutoIt_MyErrFunc.scriptline is: 1307
$o_AutoIt_MyErrFunc.retcode is: -2147467259

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:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
$o_AutoIt_MyErrFunc.number is: -2147024891
$o_AutoIt_MyErrFunc.windescription: Odmowa dostępu. (PERMISION DENIED)
 
$o_AutoIt_MyErrFunc.description is: Nieokreślony błąd. (UNKNOWN ERROR)
$o_AutoIt_MyErrFunc.source is: htmlfile
$o_AutoIt_MyErrFunc.helpfile is: C:WINDOWSsystem32mshtml.hlp
$o_AutoIt_MyErrFunc.helpcontext is: 0
$o_AutoIt_MyErrFunc.lastdllerror is: 0
$o_AutoIt_MyErrFunc.scriptline is: 3690
$o_AutoIt_MyErrFunc.retcode is: -2147467259

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:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
after refreshing site
 
 
 
  Quote
--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType

 

 

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:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

$oIE_aspnetForm = _IEGetObjById($oIE, "aspnetForm")

should be _IEFormGetObjByName or use the ID of the form.

Edited by hiho
Posted

I dont think so 

  Quote
<form id="aspnetForm" action="SearchAdvanced.aspx" method="post" _events="[object Object]">

 

 

so It must be _IEGetObjById

 

$oIE_aspnetForm is a reference to "Form" Object

_IEFormGetObjByName - get reference to object inside "Form" not to "Form" for example to "Input" in "Form"

 

but maybe I'am wrong ?

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:

  Reveal hidden contents

Signature last update: 2023-04-24

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
×
×
  • Create New...