really want I want to do is open internet explorer, but remove all the toolbars, address bar, etc....
Has Anyone ever seen this done before?
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
> Is it possible to spawn a popup window from a WSH or VB script?
>
> really want I want to do is open internet explorer, but remove all the toolbars, address bar, etc....
Hi
Here is an example that asks for a password, using IE. The trick to remove all bars, is to create a
FullScreen window and then resize it.
' ---- Code Start ----
' Here is a script posted by Tom Lavedas.
' Modified some by Torgeir Bakken (marked as 'Modified in the code),
' e.g. added AppActivate to avoid that the password
' box hides behind other windows
Dim bPasswordBoxWait ' A required global variable, do not remove!
sPwd = PasswordBox("Enter your password")
WScript.Echo "You entered:" & sPwd
Function PasswordBox(sTitle)
Set oIE = CreateObject("InternetExplorer.Application")
'Modified (added), used by AppActivate
sIETitle = "Password Input"
With oIE
.FullScreen = True
.ToolBar = False : .RegisterAsDropTarget = False
.StatusBar = False : .Navigate("about:blank")
'Modified
'While .Busy : WScript.Sleep 100 : Wend
Do Until .ReadyState = 4 : WScript.Sleep 100 : Loop
With .document
With .ParentWindow
.resizeto 400,100
.moveto .screen.width/2-200, .screen.height/2-50
End With
'Modified (added)
.WriteLn "<HTML><TITLE>" & sIETitle & "</TITLE>"
.WriteLn("<html><body bgColor=Silver><center>")
.WriteLn(" <b>" & sTitle & "<b> <p>")
.WriteLn("Password <input type=password id=pass> " & _
"<button id=but0>Submit</button>")
.WriteLn("</center></body></html>")
With .ParentWindow.document.body
.scroll="no"
.style.borderStyle = "outset"
.style.borderWidth = "3px"
End With
.all.but0.onclick = GetRef("PasswordBox_Submit")
.all.pass.focus
oIE.Visible = True
'Modified (added)
Set oShell = CreateObject("WScript.Shell")
oShell.AppActivate sIETitle
bPasswordBoxOkay = False : bPasswordBoxWait = True
On Error Resume Next
While bPasswordBoxWait
WScript.Sleep 100
If oIE.Visible Then bPasswordBoxWait = bPasswordBoxWait
If Err Then bPasswordBoxWait = False
Wend
'Modified (added)
PasswordBox = .all.pass.value
End With ' document
.Visible = False
'Modified (added)
.Quit
End With ' IE
End Function
Sub PasswordBox_Submit()
bPasswordBoxWait = False
End Sub
' ---- Code Stop ----
--
torgeir
Thanks. This looks like what I need!!
Josh