Solved

VB Script error

Posted on 2014-04-22
10
1,952 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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