Solved

VB Script error

Posted on 2014-04-22
10
1,973 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 300 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

623 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