Jump to content

Workplace client refusing connect with script?


 Share

Recommended Posts

Hello Forum,

I want to open our workplace website with AutoIt, and I use this function: 
 

#include <IE.au3>

$oIE = _IECreate ("Workplace Webpage Url") ; Here comes the correct webpage URL of the company website

 

And get this error codes:

--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147023179, Browser has been deleted prior to operation.)

If I use other functions like _IE_Navigate or _IE_Attachm I also get error codes:

-> IE.au3 T3.0-2 Error from function _IENavigate, $_IESTATUS_InvalidObjectType

I am sure the problem is not with my script, because this function works with other web pages perfectly.

So my suspicion is that I get error code because of some settings is not good in my Internet Explorer settings, but I can open the webpage without a script and use it.

I use IE 11 without compatibility mode.

I have already tried this script with

#RequireAdmin

and I added the webpage to secure sites.

Are there any suggestions?

 

Thank you in advance! :)

 

 

 

Link to comment
Share on other sites

Thank you very much for your help!

I have found the protected mode and it was disabled.

So unfortunately, this can not cause the issue.

 

I have also tried that, I checked Safety -> AutoX filtering and it not works. :(

I have also consulted with my boss, and he said that I have all the clearance to access the intranet.

Any other ideas? 

Link to comment
Share on other sites

Can you access the web site manually with IE ?  Does it have outside references ? Is the initial url changing during the load ?  Any supplemental information would certainly help...

Link to comment
Share on other sites

Thanks again for your assistance I am grateful :) 

Yes, I can access to the website manually with IE.

  Does it have outside references? I don't know what that mean ?

Is the initial url changing during the load ?  No it not changes, moreover sometimes if you click inside to other pages in the  site  the url stays the same, Thats can be the problem?

 

I have already read some topics in this forum, and I am not the only one who had this issue that _IE functions not worked with intranet, unfortunately, it is not tackled yet.

Link to comment
Share on other sites

2 hours ago, DannyJ said:

Does it have outside references? I don't know what that mean ?

If you look at the DOM, do you see http* reference going outside your intranet.  Can you post the differernt codes you have tried so far ?  

Maybe create the object without url, navigate outside successfully then renavigate inside, see if that changes anything...

Link to comment
Share on other sites

Thanks again your help!

 

Yes I tried that I Navigate from the login page of this intranet page but still not works.

Other code I tried:

$oIE = _IECreate ("google.hu")

$oIE = _IENavigate($oIE,"intranet main page") ; The error apperars already here.

$oIE = _IENavigate($oIE,"intranet page I want to do things")   ;Error also apperars here.

 

Link to comment
Share on other sites

Like Danp2 says, that's what I do. I'm behind a proxy and sometimes IE will get a redirect or something after I navigate, before I get routed to the original URL. If you don't use IE much, you might be able to attach to the first instance and just wait it out, ignoring whatever url it is using currently.

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

Hello

On 8/26/2019 at 2:30 PM, Danp2 said:

Have you tried like this?

Local $sURL = "Workplace Webpage Url"
_IECreate($sURL, 0, 1, 0)
Sleep(2000)
Local $oIE = _IEAttach($sURL, "url")

 

Hello I used your code with the intranet

And I get this errors:

I am sure that I wrote the correct name of the forms and inputs.

--> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch
--> 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 _IEFormElementSetValue, $_IESTATUS_InvalidDataType

I guess this is a protection of the intranet ?

Any ideas?

Link to comment
Share on other sites

2 hours ago, DannyJ said:

Any ideas?

You could try increasing the Sleep time or maybe looping until the _IEAttach succeeds. You could also try launching the website manually and then using _IEAttach to connect with this browser tab. Finally, review the help file for _IEAttach. There are multiple options for the parameter $sMode. If you can't get "url" working, then try one of the others.

Link to comment
Share on other sites

Thank you I will talk with the devs, but actually I have to wait before I can talk them.

 

Other idea that can it be an Internet Explorer setting?

 

(It is a mandatory that we have to use IE 11 to open intranet pages)q

Link to comment
Share on other sites

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