From: Maw on 10 Jun 2010 11:38 Hi all, i want find a way to show in a popup or in ie windows a status message of the script: ......part of the some script in a loop For Each objUser in objOldOU strstreetAddress = objUser.Get("streetAddress") 'wscript.echo strstreetAddress Select Case (strstreetAddress) Case "MI- Europa" oudest = "LDAP://ou=Utenti,ou=Europa,ou=Sedi," & varDomainNC objUser.Put "scriptPath", "europa.cmd" MESSAGE = "SELECT CASE 1" Case "Cavallotti" oudest = "LDAP://ou=Utenti,ou=Cavallotti,ou=Sedi," & varDomainNC objUser.Put "scriptPath", "cavallotti.cmd" MESSAGE = "SELECT CASE 2" Case "Broletto" oudest = "LDAP://ou=Utenti,ou=Broletto,ou=Sedi," & varDomainNC objUser.Put "scriptPath", "broletto.cmd" MESSAGE = "SELECT CASE 3" Case "Mi - Sempione" oudest = "LDAP://ou=Utenti,ou=Sempione,ou=Sedi," & varDomainNC objUser.Put "scriptPath", "sempione.cmd" MESSAGE = "SELECT CASE 4" End Select objUser.SetInfo Set objNewOU = GetObject(oudest) WSCRIPT.ECHO MESSAGE objNewOU.MoveHere objUser.ADsPath, vbNullString It's possible open a message and close it after some second without the user click on some button? Thx in advance. Maw
From: Tom Lavedas on 10 Jun 2010 13:28 On Jun 10, 11:38 am, Maw <maw81...(a)gmail.com> wrote: > Hi all, > i want find a way to show in a popup or in ie windows a status message > of the script: > > .....part of the some script in a loop > > For Each objUser in objOldOU > strstreetAddress = objUser.Get("streetAddress") > 'wscript.echo strstreetAddress > Select Case (strstreetAddress) > Case "MI- Europa" > oudest = "LDAP://ou=Utenti,ou=Europa,ou=Sedi," & varDomainNC > objUser.Put "scriptPath", "europa.cmd" > MESSAGE = "SELECT CASE 1" > Case "Cavallotti" > oudest = "LDAP://ou=Utenti,ou=Cavallotti,ou=Sedi," & varDomainNC > objUser.Put "scriptPath", "cavallotti.cmd" > MESSAGE = "SELECT CASE 2" > Case "Broletto" > oudest = "LDAP://ou=Utenti,ou=Broletto,ou=Sedi," & varDomainNC > objUser.Put "scriptPath", "broletto.cmd" > MESSAGE = "SELECT CASE 3" > Case "Mi - Sempione" > oudest = "LDAP://ou=Utenti,ou=Sempione,ou=Sedi," & varDomainNC > objUser.Put "scriptPath", "sempione.cmd" > MESSAGE = "SELECT CASE 4" > End Select > objUser.SetInfo > Set objNewOU = GetObject(oudest) > WSCRIPT.ECHO MESSAGE > objNewOU.MoveHere objUser.ADsPath, vbNullString > > It's possible open a message and close it after some second without > the user click on some button? > Thx in advance. > > Maw The simplest solution if the Wscript.Shell Popup function ... Set WshShell = CreateObject("WScript.Shell") WshShell.Popup "Your message here", 5, "Title", vbOkay + vbExclamation See the WSH documentation for more information. WSH 5.6+ documentation download (URL all one line) http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en The other approach is to build your own adaptable display through the IE document object model. I've posted a number of examples here in the past. Try a groups.google search. _____________________ Tom Lavedas
From: "Dave "Crash" Dummy" on 10 Jun 2010 14:49 Tom Lavedas wrote: <snipped> > The other approach is to build your own adaptable display through the > IE document object model. I've posted a number of examples here in > the past. Try a groups.google search. I like using HTA scripts for dynamic displays. -- Crash "The real question is not whether machines think but whether men do." ~ B. F. Skinner ~
From: Maw on 11 Jun 2010 03:28 On 10 Giu, 19:28, Tom Lavedas <tglba...(a)verizon.net> wrote: > On Jun 10, 11:38 am, Maw <maw81...(a)gmail.com> wrote: > > > > > Hi all, > > i want find a way to show in a popup or in ie windows a status message > > of the script: > > > .....part of the some script in a loop > > > For Each objUser in objOldOU > > strstreetAddress = objUser.Get("streetAddress") > > 'wscript.echo strstreetAddress > > Select Case (strstreetAddress) > > Case "MI- Europa" > > oudest = "LDAP://ou=Utenti,ou=Europa,ou=Sedi," & varDomainNC > > objUser.Put "scriptPath", "europa.cmd" > > MESSAGE = "SELECT CASE 1" > > Case "Cavallotti" > > oudest = "LDAP://ou=Utenti,ou=Cavallotti,ou=Sedi," & varDomainNC > > objUser.Put "scriptPath", "cavallotti.cmd" > > MESSAGE = "SELECT CASE 2" > > Case "Broletto" > > oudest = "LDAP://ou=Utenti,ou=Broletto,ou=Sedi," & varDomainNC > > objUser.Put "scriptPath", "broletto.cmd" > > MESSAGE = "SELECT CASE 3" > > Case "Mi - Sempione" > > oudest = "LDAP://ou=Utenti,ou=Sempione,ou=Sedi," & varDomainNC > > objUser.Put "scriptPath", "sempione.cmd" > > MESSAGE = "SELECT CASE 4" > > End Select > > objUser.SetInfo > > Set objNewOU = GetObject(oudest) > > WSCRIPT.ECHO MESSAGE > > objNewOU.MoveHere objUser.ADsPath, vbNullString > > > It's possible open a message and close it after some second without > > the user click on some button? > > Thx in advance. > > > Maw > > The simplest solution if the Wscript.Shell Popup function ... > > Set WshShell = CreateObject("WScript.Shell") > WshShell.Popup "Your message here", 5, "Title", vbOkay + > vbExclamation > > See the WSH documentation for more information. > WSH 5.6+ documentation download (URL all one line)http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207... > > The other approach is to build your own adaptable display through the > IE document object model. I've posted a number of examples here in > the past. Try a groups.google search. > _____________________ > Tom Lavedas Hi, i like the WshShell.Popup but i don't want the button, it's possible? And HTA for me it's a new way, i don't know the code!!! thx
From: "Dave "Crash" Dummy" on 11 Jun 2010 04:11 Maw wrote: > On 10 Giu, 19:28, Tom Lavedas <tglba...(a)verizon.net> wrote: >> On Jun 10, 11:38 am, Maw <maw81...(a)gmail.com> wrote: >> >> >> >>> Hi all, i want find a way to show in a popup or in ie windows a >>> status message of the script: .....part of the some script in a >>> loop For Each objUser in objOldOU strstreetAddress = >>> objUser.Get("streetAddress") 'wscript.echo strstreetAddress >>> Select Case (strstreetAddress) Case "MI- Europa" oudest = >>> "LDAP://ou=Utenti,ou=Europa,ou=Sedi," & varDomainNC objUser.Put >>> "scriptPath", "europa.cmd" MESSAGE = "SELECT CASE 1" Case >>> "Cavallotti" oudest = "LDAP://ou=Utenti,ou=Cavallotti,ou=Sedi," & >>> varDomainNC objUser.Put "scriptPath", "cavallotti.cmd" MESSAGE = >>> "SELECT CASE 2" Case "Broletto" oudest = >>> "LDAP://ou=Utenti,ou=Broletto,ou=Sedi," & varDomainNC objUser.Put >>> "scriptPath", "broletto.cmd" MESSAGE = "SELECT CASE 3" Case "Mi - >>> Sempione" oudest = "LDAP://ou=Utenti,ou=Sempione,ou=Sedi," & >>> varDomainNC objUser.Put "scriptPath", "sempione.cmd" MESSAGE = >>> "SELECT CASE 4" End Select objUser.SetInfo Set objNewOU = >>> GetObject(oudest) WSCRIPT.ECHO MESSAGE objNewOU.MoveHere >>> objUser.ADsPath, vbNullString It's possible open a message and >>> close it after some second without the user click on some button? >>> Thx in advance. Maw >> The simplest solution if the Wscript.Shell Popup function ... >> >> Set WshShell = CreateObject("WScript.Shell") WshShell.Popup "Your >> message here", 5, "Title", vbOkay + vbExclamation >> >> See the WSH documentation for more information. WSH 5.6+ >> documentation download (URL all one >> line)http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207... >> >> >> The other approach is to build your own adaptable display through >> the IE document object model. I've posted a number of examples >> here in the past. Try a groups.google search. >> _____________________ Tom Lavedas > > > > Hi, i like the WshShell.Popup but i don't want the button, it's > possible? No. > And HTA for me it's a new way, i don't know the code!!! It is the same as a scripted web page except with a HTA extension instead of HTM, and you have all the privileges of a VBS script. http://en.wikipedia.org/wiki/HTML_Application -- Crash "When you get to a fork in the road, take it." ~ Yogi Berra ~
|
Next
|
Last
Pages: 1 2 3 Prev: PINGing a List of Servers Using VBScript Next: Simple hack to get $500 to your home |