Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


IE Status Window

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,24652
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> IE Status Window
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 IE Status Window - 8/10/2005 12:30:23 AM   
  esnmb

 

Posts: 431
Score: 0
Joined: 1/11/2005
From: USA
Status: offline
If you ever need a status window for yourself or a user t let them know that a background process is running.....  On Error Resume Next ''''''''''''''''''Creates an Internet Explorer instance to display script status '''''''''''''''''''
Set objExplorer = Wscript.CreateObject("InternetExplorer.Application", "IE_") objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Top = 180
objExplorer.Left = 200
objExplorer.Width = 630
objExplorer.Height = 320
objExplorer.Visible = 1
objExplorer.Resizable = 0 Do While (objExplorer.Busy)
Wscript.Sleep 250
Loop 'Defines HTML code for status window
Set objDocument = objExplorer.Document
objDocument.Open
objDocument.Writeln "<html><head><title>^^ Status Window^^</title></head>"
objDocument.Writeln "<style type=""text/css"">body {background-color: #FFFFFF;}"_
& ".style2 {font-family: Arial, Helvetica, sans-serif;font-size: 10.5pt;color: "_
& "#CC6600;font-weight: bold;}.style3 {font-family: Arial, Helvetica, sans-serif}"_
& "body,td,th {font-family: Arial, Helvetica, sans-serif;}</style></head><body>"
objDocument.Writeln "<img src=""file:///F|/Users/SHARED/IT/Procedures/New Hires/Content/Images/logo.gif"" width=""189"" height=""46"">"
objDocument.body.style.cursor = "Wait"
objDocument.Writeln "<p class=""style2""><B>Please wait while APPLICATION is loading...<br>"
objDocument.Writeln "<br>Please be patient...<br></p>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")   Do Until colProcesses.Count = 0
objDocument.Writeln "*"
Wscript.Sleep 250
Set colProcesses = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = 'Notepad.exe'") '  ** Change this to the EXE of your choice **
Loop objDocument.Writeln "<p class=""style2"">Application is complete.</p>"
objDocument.body.style.cursor = "Default"
objDocument.Writeln "</body></html>"
objDocument.Writeln()
objDocument.Close
call killProg("IExplore.exe") Sub killProg(prog)
WScript.Sleep(2000)
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = '" & prog & "'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
End Sub
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> IE Status Window Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts