trunks2k
asked on
Focusing on a WScript IE explorer window
I'm not very familiar with VBScript, in fact this is my first day dealing with it. I'm basing most of the script off of an earlier version. Basically all the program does is open an IE window (via WScript) load the HTML, then send the information from the form to a perl script. That is all working fine, but I can't get the Script to focus on the IE window, so it opens behind everything else. I've looked all over the place and can't seem to find anything that will help, so I am giving in and asking people.
The code I have involving the window is
dim oIE
set oIE = WScript.CreateObject("Inte rnetExplor er.Applica tion", IE_)
//
|| Code defining the window size, etc
\\
oIE.navigate pathe & "LMP_Form.htm"
oIE.visible = 1
The code I have involving the window is
dim oIE
set oIE = WScript.CreateObject("Inte
//
|| Code defining the window size, etc
\\
oIE.navigate pathe & "LMP_Form.htm"
oIE.visible = 1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Fantasy,
I don't know why you have the IE open up in the background... I used the smae code adn got it to come up in front/top off all my other screens.. I commented out the ie.quit and set to nothing..and it stays to the top.
also.. not sure if you have gone to the following page.. but check it out.. it might help.
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/reference/objects/internetexplorer.asp
Good luck.
I don't know why you have the IE open up in the background... I used the smae code adn got it to come up in front/top off all my other screens.. I commented out the ie.quit and set to nothing..and it stays to the top.
also.. not sure if you have gone to the following page.. but check it out.. it might help.
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/reference/objects/internetexplorer.asp
Good luck.
This example show you how to grab a html content using perl:
#!/bin/perl
use LWP::Simple;
use HTML::Parse;
print (get $ARGV[O]); # use this if you want html format of text
print parse_html(get ($ARGV[0]))->format; # use this if you want all the tag stripped out
you can run the script by passing an url to it like this
%>> perl myscript.pl www.google.com
~ fantasy ~
#!/bin/perl
use LWP::Simple;
use HTML::Parse;
print (get $ARGV[O]); # use this if you want html format of text
print parse_html(get ($ARGV[0]))->format; # use this if you want all the tag stripped out
you can run the script by passing an url to it like this
%>> perl myscript.pl www.google.com
~ fantasy ~
Moderator, my recommended disposition is:
Split points between: alibabas and fantasy1001
Dan Rollins -- EE database cleanup volunteer
Split points between: alibabas and fantasy1001
Dan Rollins -- EE database cleanup volunteer
ASKER
That's pretty much what is there already.
fantasy1001:
sure, I'll take a perl solution.