VBS popup box

Toshiba Satellite l505d-s5965 notebook
April 27, 2010 at 18:20:37
Specs: Windows 7, 1024
is there a VBS popup box/msg that doesnt have a button?

what im looking to do is i have a batch script that backs up files from a few servers looking to see if its possible to have a VBS script popup and have the batch script run its task which the batch is hidden but only show the VBS popup stating that its backing up and close once the batch has completed.

See More: VBS popup box

Report •

April 27, 2010 at 22:49:45
hey, i messed around some and found no ready solutions, but i figure the vbscript people can find better ones.
this was my only approach which imo kinda sucks:
dim wsh
set wsh=createobject("wscript.shell")
x=wsh.popup("message",,"BACKING UP...")

when backup done, execute script2:
dim wsh
set wsh=createobject("wscript.shell")
wsh.appactivate "BACKING UP..."
wsh.sendkeys ("{ENTER}")

the sucky part is they don't work if they're in the same script!
so then you need two files and two apps running.
If you want to get rid of buttons entirely, and/or enhance the screen display, you can use the same stuff i learned from you: hta, giving full range of html formatting:
script1: start xx.hta
(where xx.hta is just a display and has a title "TITLE")
then to kill it, script2:
wsh.appactivate "TITLE"
wsh.sendkeys ("%{F4}")

this is crappy work-around, but it seems to work. hopefully you'll get better methods... anyway here's a working demo:
(you'll recognize your own hta code! f1.hta:)
<title>*** Backing up Server ***...</title>
<body bgcolor="GOLD">
******** Currently backin up the server, system might be slowed *******
<SCRIPT Language="VBScript">
Sub Window_Onload
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
For Each objItem in colItems
intHorizontal = objItem.ScreenWidth
intVertical = objItem.ScreenHeight
'screen placement
intLeft = (intHorizontal - 300) / 2
intTop = (intVertical - 400) / 2
'window size
window.resizeTo 250,10
window.moveTo intLeft, intTop
End Sub

start f1.hta
'(wait till event: backups finished, then )
start cscript /b f1kill.vbs

script2 (f1kill.vbs)
dim wsh
set wsh=createobject("wscript.shell")
wsh.appactivate "*** backing up"
'kill signal: alt-F4
wsh.sendkeys ("%{F4}")

Report •
Related Solutions

Ask Question