Sign in to follow this  
Followers 0
czingishan

error IE.au3

16 posts in this topic

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

Share this post


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

Share this post


Link to post
Share on other sites

268 line in script.exe but script.au3 have 23 lines

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Autoit 3.3.8.1

IE 9, 7 and 6

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


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

Share this post


Link to post
Share on other sites

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

1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


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

Share this post


Link to post
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?

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

#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

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Yes, its spam bot in browser game.

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  
Followers 0