thomas_mielich

Only Object-type variables allowed in a "With" statement

4 posts in this topic

#1 ·  Posted

Hello,

on every 5th / 6th call following error-message appear:

Only Object-type variables allowed in a "With" statement

 

What is wrong in my script ?? compile x86 / ver 3.3.14.2

 

#include <IE.au3>

Dim $oIE = _IECreate('about:blank', 0, 0)

With $oIE
    .Left = 0
    .Top = 0
    .Menubar = False
    .Resizable = True
    .StatusBar = False
    .TheaterMode = False
    .Toolbar = False
    .Visible = True
EndWith

WinSetState(_IEPropertyGet($oIE, "hwnd"), "", @SW_MAXIMIZE)

_IENavigate($oIE, 'http://aeneis-01:23000/CMS/LSW_Portal')

Share this post


Link to post
Share on other sites



#2 ·  Posted

Try adding some error checking after the _IECreate.

Share this post


Link to post
Share on other sites

#3 ·  Posted

I have added following error checking:

Dim $oIE = _IECreate('about:blank', 0, 0)
If @error Then Exit
 

is this enough ??

Share this post


Link to post
Share on other sites

#4 ·  Posted

Yes, that should prevent the script from continuing when the _IECreate fails.

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