![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | array Hi all, i would like to optimize this code with a cicle, could someone help me please? Set server1 = CreateObject("WMSServer.Server", "server") Set server2 = CreateObject("WMSServer.Server", "server2") server1.PublishingPoints("Stress").stop server2.PublishingPoints("Stress").stop thanks a lot |
My System Specs![]() |
| | #2 (permalink) |
| | Re: array <yqyq22@xxxxxx> wrote in message news:a690233b-4001-41d2-b8aa-4a6cbd8df473@xxxxxx Quote: > Hi all, i would like to optimize this code with a cicle, could someone > help me please? > Set server1 = CreateObject("WMSServer.Server", "server") > Set server2 = CreateObject("WMSServer.Server", "server2") > server1.PublishingPoints("Stress").stop > server2.PublishingPoints("Stress").stop > > thanks a lot verbose code but it won't speed up execution. aServers = Split("Server1 Server2 Server3 Server4") For i = 0 To UBound(aServers) Set oServer = CreateObject("WMSServer.Server", aServers(i)) oServer.PublishingPoints("Stress").stop Next |
My System Specs![]() |
| | #3 (permalink) |
| | Re: array On 15 Ott, 17:45, "Pegasus \(MVP\)" <I....@xxxxxx> wrote: Quote: > <yqy...@xxxxxx> wrote in message > > news:a690233b-4001-41d2-b8aa-4a6cbd8df473@xxxxxx > Quote: > > Hi all, i would like to optimize this code with a cicle, could someone > > help me please? > > Set server1 = CreateObject("WMSServer.Server", "server") > > Set server2 = CreateObject("WMSServer.Server", "server2") > > server1.PublishingPoints("Stress").stop > > server2.PublishingPoints("Stress").stop Quote: > > thanks a lot > Maybe a loop like the one below is what you're after. It will result in less > verbose code but it won't speed up execution. > > aServers = Split("Server1 Server2 Server3 Server4") > For i = 0 To UBound(aServers) > *Set oServer = CreateObject("WMSServer.Server", aServers(i)) > *oServer.PublishingPoints("Stress").stop > Next bye |
My System Specs![]() |
| | #4 (permalink) |
| | Re: array "Pegasus (MVP)" <I.can@xxxxxx> wrote in message news:%23z5ia0tLJHA.728@xxxxxx Quote: > > <yqyq22@xxxxxx> wrote in message > news:a690233b-4001-41d2-b8aa-4a6cbd8df473@xxxxxx Quote: >> Hi all, i would like to optimize this code with a cicle, could someone >> help me please? >> Set server1 = CreateObject("WMSServer.Server", "server") >> Set server2 = CreateObject("WMSServer.Server", "server2") >> server1.PublishingPoints("Stress").stop >> server2.PublishingPoints("Stress").stop >> >> thanks a lot > Maybe a loop like the one below is what you're after. It will result in > less verbose code but it won't speed up execution. > > aServers = Split("Server1 Server2 Server3 Server4") > For i = 0 To UBound(aServers) > Set oServer = CreateObject("WMSServer.Server", aServers(i)) > oServer.PublishingPoints("Stress").stop > Next like: aServers = Split("Server1 Server2 Server3 Server4") For each server in aServers Set oServer = CreateObject("WMSServer.Server", server) oServer.PublishingPoints("Stress").stop Next /Al |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Fast copy method of sub array (=array range) possible? | VB Script | |||
| How to create array without quotes? $array = (a,b,c) | PowerShell | |||
| Array indexing: Want to say "Item #2 through the rest of the array." | PowerShell | |||
| Stupid Array Tricks: Initializing an Array to a Certain Size | PowerShell | |||
| how to assign values to array and how to create array via variable | PowerShell | |||