Solved

VB Script error

Posted on 2014-04-22
10
1,903 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
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

825 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