Solved

VB Script error

Posted on 2014-04-22
10
1,851 Views
Last Modified: 2014-04-23
I have a POP Email notification program which displays a banner on the desktop when messages which meet certain criteria are detected on the server.  This has worked for years, until a few days ago.  I haven't modified the script, or the POP mail program's settings, so I don't know why this error appears.  I'm ignorant about VB script and could use some guidance in remedying this.  I've attached the script and a screen shot of the error (running Windows 7).Signed-Agreement.vbsError msg
0
Comment
Question by:ddantes
  • 5
  • 4
10 Comments
 
LVL 65

Expert Comment

by:RobSampson
Comment Utility
Hi, is it possible you just upgraded to IE10 or IE11?  This should work in IE8 or IE9, from what I can tell.  I'll see if there's an IE10+ equivalent.

Rob.
0
 

Author Comment

by:ddantes
Comment Utility
Thank you for your message.  I upgraded to IE10 more than a year ago, and then to IE 11 many months ago.  The script worked fine under IE 11 until a couple of days ago, and it still works on another machine running IE9.  Could a Microsoft Update have affected this?
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 300 total points
Comment Utility
OK, so just by pure luck (trying to debug it), it appears that it may be case sensitive.  Your original code didn't work for me with IE10, but this did:

    intWidth = objIE.document.parentwindow.screen.availwidth
    intHeight = objIE.document.parentwindow.screen.availheight
    intWidthW = objIE.document.parentwindow.screen.availwidth * .40
    intHeightW = objIE.document.parentwindow.screen.availheight * .15

Open in new window


which you will notice only has lowercase letters.  It seems odd, but it's worth a try.

Rob.
0
 

Author Comment

by:ddantes
Comment Utility
Thank you for testing that, and your findings.  I'll give it a try and post again...
0
 
LVL 5

Expert Comment

by:MohitPandit
Comment Utility
Yes, it could be possible of version of IE modified because earlier we use to do like that.

Please find below URL IE Display


Best Regards
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:ddantes
Comment Utility
Thank you for your comment.  Are you saying that your VBS code no longer works in IE?
0
 
LVL 65

Expert Comment

by:RobSampson
Comment Utility
It does work for me after I used the lower case version.
0
 

Author Comment

by:ddantes
Comment Utility
Rob, that fixed it!
1
 
LVL 65

Expert Comment

by:RobSampson
Comment Utility
Great! It's unusual for VBScript to be case sensitive. Something must have changed with the IE object model.

Thanks for the grade. Just a quick note, since you weren't setting the .Visible property until after that error line, you may have a heap of iexplore.exe processes running that you can't see.

Rob.
0
 

Author Comment

by:ddantes
Comment Utility
If I open Internet Explorer with a link to a website, there are two iexplore.exe processes running, and they both end when the window is closed.  The same thing happens when I execute that VB script.  Thank you for the head's up.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now