Jump to content

error IE.au3


Recommended Posts

#include

$open=FileOpen("users.txt",0)
$oIE = _IEAttach("[CLASS:IEFrame]", "embedded")
$topic="hi"
$message="test"
While 1
sleep(50)
$oIE = _IEAttach("[CLASS:IEFrame]", "embedded")
$readline=FileReadLine($open)
If @error=-1 then ExitLoop
$oDiv = _IEGetObjByName($oIE, "to")
_IEFormElementSetValue($oDiv,$readline)
$nameinput=_IEGetObjByName($oIE,"subject")
_IEFormElementSetValue($nameinput,$topic)
$nameinput1=_IEGetObjByName($oIE,"text")
_IEFormElementSetValue($nameinput1,$message)
$button=_IEGetObjByName($oIE,"send")
_IEAction($button,"click")
_IELoadWait($oIE)
_IENavigate($oIE, "adress www")
_IELoadWait($oIE)
WEnd

line 268

error: the requested action with this object has failed.

This error pop up in random moments.

What is wrong?

Link to comment
Share on other sites

what is line 268 you are referring to?

I pasted your code and executed it in Scite, when I opened any website in IE, it would pop up a 404-Not found error (deliberately of course). Wouldn't you consider it as a malware (for novices at least?)

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Link to comment
Share on other sites

Which version of AutoIt do you run? Which version of the IE do you use?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

If you run your script from SciTe what line number do you get? If a script is compiled all comments are removed so the line numbers are not very useful for debugging any more.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Run that is tools--->Go ?

e:Program FilesAutoIt3IncludeIE.au3 (585) : ==> The requested action with this object has failed.:

WEnd

WEnd^ ERROR

>Exit code: 1 Time: 16.460

EDIT

--> IE.au3 V2.4-0 Warning from function _IEGetObjByName, $_IEStatus_NoMatch (Name: to, Index: 0)

--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

--> IE.au3 V2.4-0 Warning from function _IEGetObjByName, $_IEStatus_NoMatch (Name: subject, Index: 0)

--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

--> IE.au3 V2.4-0 Warning from function _IEGetObjByName, $_IEStatus_NoMatch (Name: text, Index: 0)

--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

--> IE.au3 V2.4-0 Warning from function _IEGetObjByName, $_IEStatus_NoMatch (Name: send, Index: 0)

--> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType

e:Program FilesAutoIt3IncludeIE.au3 (585) : ==> The requested action with this object has failed.:

WEnd

WEnd^ ERROR

>Exit code: 1 Time: 35.774

EDIT2

e:Program FilesAutoIt3IncludeIE.au3 (2362) : ==> The requested action with this object has failed.:

Return SetError($_IEStatus_Success, $o_object.document.GetElementsByName($s_Id).length, $o_object.document.GetElementsByName($s_Id).item($i_index))

Return SetError($_IEStatus_Success, $o_object.document.GetElementsByName($s_Id).length, $o_object.document.GetElementsByName($s_Id)^ ERROR

>Exit code: 1 Time: 11.535

Edited by czingishan
Link to comment
Share on other sites

Concentrate on the first message you get from SciTe - chances are that if you figure that one out, you will solve your whole issue.

Your webpage is obviously in flux duing this script exection as you are doing clicks and navigates... you are doing _IELoadWait in a couple of places that seem appropriate, but your page is most certainly still in flux as you enter one of your loop iterations. Put in more debugging statements and watch the execution to see what is going on. This is NOT a bug in IE.au3 - it is an issue with the state of the webpage and your script logic.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Have a look at this - they were discussing a "WEnd" error.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

The WEND error is an artifact of the errors that come before it. Focus on the first message.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Thx water this fixed IE.au3 solved the problem.

I have anothe problem

#include

$open=FileOpen("users.txt",0)
$oIE = _IEAttach("[CLASS:IEFrame]", "embedded")
$topic="hi"
$message="test"
While 1
sleep(50)
$oIE = _IEAttach("[CLASS:IEFrame]", "embedded")
$readline=FileReadLine($open)
If @error=-1 then ExitLoop
$oDiv = _IEGetObjByName($oIE, "to")
_IEFormElementSetValue($oDiv,$readline)
$nameinput=_IEGetObjByName($oIE,"subject")
_IEFormElementSetValue($nameinput,$topic)
$nameinput1=_IEGetObjByName($oIE,"text")
_IEFormElementSetValue($nameinput1,$message)
$button=_IEGetObjByName($oIE,"send")
if $button = "send" then;<-------------------------------------------------------
_IEAction($button,"click")
_IELoadWait($oIE)
_IENavigate($oIE, "adress www")
_IELoadWait($oIE)
else;<--------------------------------------------
exit;<-----------------------------------------
endif;<------------------------------------
WEnd

Why this (<--) don't work?

Link to comment
Share on other sites

_IEGetObjByName returns an object variable pointing to the specified object.

Why do you want to test the text of the button? You specified the name as parameter to _IEGetObjByName. If you want to check for success then check @error <> 0.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

#include

$open=FileOpen("users.txt",0)
$oIE = _IEAttach("[CLASS:IEFrame]", "embedded")
$topic="hi"
$message="test"
While 1
sleep(50)
$oIE = _IEAttach("[CLASS:IEFrame]", "embedded")
$readline=FileReadLine($open)
If @error=-1 then ExitLoop
$oDiv = _IEGetObjByName($oIE, "to")
_IEFormElementSetValue($oDiv,$readline)
$nameinput=_IEGetObjByName($oIE,"subject")
_IEFormElementSetValue($nameinput,$topic)
$nameinput1=_IEGetObjByName($oIE,"text")
_IEFormElementSetValue($nameinput1,$message)
$button=_IEGetObjByName($oIE,"send")
If @error=-1 then Exit;<-------------------------------------------------------
_IEAction($button,"click")
_IELoadWait($oIE)
_IENavigate($oIE, "adress www")
_IELoadWait($oIE)
WEnd

Dont work :/

Edited by czingishan
Link to comment
Share on other sites

A question that comes to my mind after looking at your code:

What do you try to do with the script? Send an email to a list of people? Looks like a - slow - spam bot.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Please read the forum rules and you will understand why support stops now.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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