Jump to content

Recommended Posts

Posted

Hello!

I hope this is not a boring old question, but I did not find the Problem in this Forum so far.

I have written an autoit script that uses IE.au3 to test if a given Website responds and if a Login is possible (this should become part of our monitoring)

Everything works as expected and I created an .exe from the .au3

Now I wanted the exe to be executed on a Server (!) vie Task planner.

Therefore I created a .bat file that calls my .exe (generated from from autoit-script) and catches its output.

When I execute the .bat manually, everything is fine.

When the .bat is executed from the Task planner (with the same user as when doing it manually) the output says:

--> IE.au3 T3.0-2 Error from function _IECreate,  (Browser Object Creation Failed)
--> IE.au3 T3.0-2 Error from function _IEFormGetObjByName, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEGetObjById, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEBodyReadText, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEQuit, $_IESTATUS_InvalidDataType
 

Does anybody knows, what I have to change?

Sincerely, Jürgen.

Posted (edited)
  On 9/14/2018 at 5:59 AM, JCM said:

Now I wanted the exe to be executed on a Server (!) vie Task planner.

Expand  

Do you mean TaskScheduler ?

btw.

:welcome: to the forum.

 

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

Without your code and access to URL this is very dificult to answer to your question.

If you want to automatate IE without unlocked Windows station (loged user) you must to know that you will meet many problems.
Some of them will be unresolvable.

Automating IE is possible but many cases need to user to be loged in to Windows Desktop and the station can not be locked.

If you wan to automate some websites with TaskScheduler then you must start using :

 

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
  On 9/14/2018 at 5:59 AM, JCM said:

When I execute the .bat manually, everything is fine.

Expand  

You mean you run this form desktop ?

Did you try to manually run this scheduled taks , and keep being loged to the Station ?

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

exactly. When I use the Windows Explorer to make a double click on the .bat file, the autoit-exe is started, the IE-Window appears and everything works fine. When I (in the same session) use the Task Scheduler to manually run the Task (that calls the .bat-File and that runs under the same Login) nothing happens, but the result are the Errors Standing in my first post.

Should there really be no other solution than to write a Program that deals with http requests/streams? Is this complicated?

Posted

There are options in the TS that you need to set - run only when a user is logged on , interactive logon, Run whether user is logged on, Run with highest privileges. Check your option and settings carefully.

Posted (edited)
  On 9/14/2018 at 2:31 PM, JCM said:

Should there really be no other solution than to write a Program that deals with http requests/streams?

Expand  

I'm not sure, maybe @Danp2 could say something more, as he is our expert to interact with all kind of browsers ;)


My knowledge is currently focused only on InternetExplorer.

 

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

Thank you all for your precious help!!!

 

As far as I can say at this time, the problem seems to be solved if

- Option "run only when user is logged on" is selected for the task

- Option "run with highest privileges" is selected for the task

- the user stays logged on (but maybe disconnected)

 

When I put everything into that condition, the task produces the expected results.

Again: Thank you all for your help!!! :)

Jürgen.

Posted

This is interesting findings.
Thanks to share them.

Regards,
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

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
  • Recently Browsing   0 members

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