Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB Script error

Posted on 2014-04-22
10
Medium Priority
?
2,002 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 40016652
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
ID: 40016662
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 1200 total points
ID: 40016668
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

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

Expert Comment

by:MohitPandit
ID: 40016711
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
 

Author Comment

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

Expert Comment

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

Author Comment

by:ddantes
ID: 40018107
Rob, that fixed it!
1
 
LVL 65

Expert Comment

by:RobSampson
ID: 40018147
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
ID: 40018200
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

661 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