Barry Posted March 11, 2007 Share Posted March 11, 2007 Hi all. Is there any way to compile a progressbar that can be called from other scripting program such vbs. Link to comment Share on other sites More sharing options...
PaulIA Posted March 11, 2007 Share Posted March 11, 2007 Hi all.Is there any way to compile a progressbar that can be called from other scripting program such vbs.Welcome to the forum. Could you possibly provide an example? For example, do you envision launching a program from VBS that has a progress bar control in it and then updating the progress bar as your script runs? Is there a reason that you are not doing the entire task from AutoIt? Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Barry Posted March 11, 2007 Author Share Posted March 11, 2007 The main purpose is that the login script that run all user call a progress bar with details of the day, logon server, map drives with progress, and at the end of the login script close the progress bar. Here are the two file I'm trying to use whitout success. Option Explicit Dim objLP, InitLogonprogressOK InitLogonprogressOK = False Dim WshNetwork, fso, GroupDict, WshShell, blIsNewBusy, oUser Set WshShell= WScript.CreateObject("WScript.Shell") Set WshNetwork = WScript.CreateObject("WScript.Network") Set fso = CreateObject("Scripting.FileSystemObject") oUser = WshNetwork.UserName Main Sub Main On Error Resume Next InitLogonprogress InfoLogonprogress 0 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 10 , "" WScript.Sleep 1000 ' 1/10 th of a second If IsMember("ES_General") Then WSHNetwork.MapNetworkDrive "R:", "\\SERVER\refresco" End If InfoLogonprogress 15 , "" WScript.Sleep 1000 ' 1/10 th of a second If IsMember("ES_General") Then WSHNetwork.MapNetworkDrive "S:", "\\SERVER\SHARED" End If InfoLogonprogress 20 , "" WScript.Sleep 1000 ' 1/10 th of a second If IsMember("ES_General") Then WSHNetwork.MapNetworkDrive "H:", "\\SERVER\" & strusername & "$" End If InfoLogonprogress 25 , "" WScript.Sleep 1000 ' 1/10 th of a second If IsMember("ES_General") Then WSHNetwork.MapNetworkDrive "P:", "\\SERVER\PROGRAMS" End If InfoLogonprogress 30 , "" WScript.Sleep 1000 ' 1/10 th of a second If IsMember("ES_General") Then WSHNetwork.MapNetworkDrive "N:", "\\SERVER\BANCA" End If InfoLogonprogress 35 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 40 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 50 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 55 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 60 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 65 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 75 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 80 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 85 , "" WScript.Sleep 1000 ' 1/10 th of a second InfoLogonprogress 90 , "" WScript.Sleep 1000 ' 1/10 th of a second 'If IsMember("GRP LG HQ HQPRT005") Then ' WshNetwork.AddWindowsPrinterConnection HQPRT005 'End If InfoLogonprogress 95 , "" WScript.Sleep 1000 ' 1/10 th of a second End Sub InfoLogonprogress 100 , "" WScript.Sleep 1000 ' 1/10 th of a second CloseLogonprogress WScript.Quit() Function IsMember(sGroup) Dim sAdsPath, oUser, oGroup If IsEmpty(GroupDict) Then Set GroupDict = CreateObject("scripting.Dictionary") Set WshNetwork = WScript.CreateObject("WScript.Network") GroupDict.CompareMode = vbTextCompare sAdsPath = WshNetwork.UserDomain & "/" & WshNetwork.UserName Set oUser = GetObject("WinNT://" & sAdsPath & ",user") For Each oGroup In oUser.Groups GroupDict.Add oGroup.Name, "-" Next Set oUser = Nothing End If isMember = CBool(GroupDict.Exists(sGroup)) End Function Sub InitLogonprogress () Err.Clear On Error Resume Next Dim fso, WshProcEnv, WshShell Set fso = CreateObject("Scripting.FileSystemObject") Set WshShell=WScript.CreateObject("WScript.Shell") Set WshProcEnv=WshShell.Environment("PROCESS") If Not fso.FileExists ( WshProcEnv("U:\Privado\scripts\ProgressBar\Prueba1.exe" ) Then Exit Sub Set objLP = CreateObject("logonprogress.application") If Err.Number <> 0 Then Exit Sub objLP.ShowScreen = 1 objLP.Bartype = 0 objLP.title = "Powered By Information Technology" InitLogonprogressOK = True End Sub Sub InfoLogonprogress ( Position, Description ) On Error Resume Next If InitLogonprogressOK Then Description = "Logon script is processing, one moment please..." objLP.Bar = Position objLP.Description = Description End If End Sub Sub CloseLogonprogress ( ) On Error Resume Next If InitLogonprogressOK Then objLP.ShowScreen = 0 objLP.Quit Set objLP = Nothing End If End SubPrueba1.au3 Link to comment Share on other sites More sharing options...
arcker Posted March 11, 2007 Share Posted March 11, 2007 yep you can using the control progress bar registered in the system registry My logon script at my firm shows a progress bar for users i can send you an example when i'll be at work c u for now, look at the clsid controls and more (the progress bar is shown through an internet explorer object) -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
Barry Posted March 11, 2007 Author Share Posted March 11, 2007 yepyou canusing the control progress bar registered in the system registryMy logon script at my firm shows a progress bar for usersi can send you an example when i'll be at workc ufor now, look at the clsid controls and more(the progress bar is shown through an internet explorer object)Thanks a lot.I've tried to do it too with IE, but as it use activeX it blocks the progress bar unless you permit activeX code. Am I right?. Link to comment Share on other sites More sharing options...
Barry Posted March 12, 2007 Author Share Posted March 12, 2007 Hi, Is anyone there than can help me?. thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now