Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript and HourGlass 1

Status
Not open for further replies.

cdavidsn

Programmer
Jul 19, 2002
4
US
Is there a way to set the hourglass mouse pointer on and off using VBScript? I have looked all over the net and I can't find out how to do it. Any help would be appreciated.

Chris Davidson Applicatin Developer
 
I suppsoe I should give you people some history of what I am trying do. I have a batch file that which places an Access DB shortcut on the desktop of a Windows 95 machine. That works perfect in Windows 95. When run on Windows 2000 of course it does not work. I have tried to place the icon in the My Documents and Settings and the All folder. The icon gets placed in the folder but to my surprise, it does not get placed on the desktop.

I have found a VBScript that copies shortcuts to the desktop. What I am trying to do is write the script so that it will place an access database shortcut on the desktop of both windows 95 and Windows 2000 machine. All the user has to do is run the script and it updates the databases. Now what the problem is when the script is ran, it looks like the machine is doing nothing. When they click the script, the user may think that nothing is happening and may try to click it again. What I need is either a popup window to be displayed as it is going or a hourglass mouse pointer to be displayed. A msgbox appears at the end telling the user that the process is done.

I am very new at vbscript. I want this done totally within the vbscript. Any ideas people. As is, this problem is driving me crazy...

Thanks for any help you people can provide
 
Problem has been solved. I am using cscript rahter then wscript.
 
I know this is probably not a total answer but I use an IE window to display progress and during my script I write out to the window, that way I can identify where I am up to

If you wnat to try it I have placed the code below:

Set objExplorer = WScript.CreateObject("InternetExplorer.Application")

Dbreak = &quot;<br>&quot; & &quot;<br>&quot;
Sbreak = &quot;<br&quot;
objExplorer.Navigate &quot;about:blank&quot;
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width=400
objExplorer.Height = 200
objExplorer.Left = 0
objExplorer.Top = 0
Do While (objExplorer.Busy)
Wscript.Sleep 200
Loop
objExplorer.Visible = 1
objExplorer.Document.Body.InnerHTML = &quot;The Release File copy process is about to Start, a message will be displayed on completion&quot; & Dbreak


I call this very early on within my script as a sub and then during my script I place the following line

objExplorer.Document.Body.InnerHTML = objExplorer.Document.Body.InnerHTML + &quot;more infor on what is happening&quot; & Dbreak

This way I can keep track.

Regards
Steve
 
Hi cdavidsn , you said that you solved the problem using cscript rahter then wscript. Can you provide the code you have put in?

Does CScript runs on every windows machine like vbs?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top