Jump to content
Letraindusoir

_IEAttach,How to make it more stable and reliable[SOLVED]?

Recommended Posts

Posted (edited)
Quote

_IEAttach ( $sString, $sMode = "title" , $iInstance = 1)

In the case of the browser has been opened, this function, can be linked to the target web-page, simple and practical. However, instability sometimes occurs, for example, target web-page do exist, sometimes can be attached, sometimes attached failure. What are the main factors affecting reliability and how to ensure stability and reliability?

Edited by Letraindusoir

Share this post


Link to post
Share on other sites
59 minutes ago, Letraindusoir said:

What are the main factors affecting reliability and how to ensure stability and reliability?

I would say a lack of error checking in your script. 😏

P.S. Your post makes it sound like you think there's an issue with _IEAttach. I'm hoping that this is not your intent and it's simply due to a language barrier.

Share this post


Link to post
Share on other sites
On 1/9/2021 at 12:43 PM, Danp2 said:

I would say a lack of error checking in your script. 😏

P.S. Your post makes it sound like you think there's an issue with _IEAttach. I'm hoping that this is not your intent and it's simply due to a language barrier.

Thanks for attention to this small problem!

I am sorry that my english is not good! it Maybe have led to a misunderstanding.

I don't think there's an issue with _IEAttach,

 

I mean, I may not have mastered how to use the function.

Because in the process of use, the same browser, the same web-page, sometimes can be Attached, sometimes Attach failure. Whether a web-page is out of focus, or a window is deactivated, or a process problem causes the connection to be unstable?

error checking :

5 ($_IEStatus_InvalidValue)
7 ($_IEStatus_NoMatch)

But it doesn't seem to explain why

 


 

Edited by Letraindusoir

Share this post


Link to post
Share on other sites

Hard to say with no code.  Try using hwnd to attach, you cannot be wrong with this method...

Share this post


Link to post
Share on other sites
On 1/10/2021 at 10:42 PM, Nine said:

Hard to say with no code.  Try using hwnd to attach, you cannot be wrong with this method...

Good idea, try to get the handle, use the handle as the attachment target, Maybe more reliable:thumbsup:

Share this post


Link to post
Share on other sites
On 1/10/2021 at 10:43 PM, Danp2 said:

If you can show us a short code snippet that consistently reproduces the issue, then we may be able to offer some suggestions on how to improve your code.

More thanks,Danp2

The code is similar to the help example. Because sometimes can, sometimes can not, is not sutre which website page appears this kind of situation, therefore feels the code is difficult to explain the problem. Maybe it's more reliable to use a handle, as Nine says

 

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...