Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting a VB script to VFP
Message
De
04/08/2004 09:58:21
 
 
À
04/08/2004 09:28:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00930631
Message ID:
00930647
Vues:
10
Hi Tom, thanks for replying!

>Fernando, try replacing the Array('group') with @group to pass the array by reference.

You mean:
colGroups.Filter = @group
If yes, I did it and got an error message ("Command contains unrecognized phrase/keyword.")

Regards,

Fernando

>Fernando, try replacing the Array('group') with @group to pass the array by reference. I think this or something close to it will work. Ran into something similar to it years ago so can't recall it exactly.
>>Hi,
>>
>>I have the following VB script, that I need to convert to VFP:
>>
>>
>>strComputer = "MyServer"
>>
>>Set colGroups = GetObject("WinNT://" & strComputer & "")
>>
>>colGroups.Filter = Array("group")
>>
>>For Each objGroup In colGroups
>>    Wscript.Echo objGroup.Name
>>    For Each objUser in objGroup.Members
>>        Wscript.Echo vbTab & objUser.Name
>>    Next
>>Next
>>
>>I tried to convert to the following VFP code, but get stuck with the line "colGroups.Filter = Array ("group")"
>>
>>strComputer = "MyServer"
>>
>>colGroups = GetObject("WinNT://" + strComputer + "")
>>
>>colGroups.Filter = Array ("group")
>>
>>For Each objGroup In colGroups
>>    Wait Window NoWait objGroup.Name
>>    For Each objUser In objGroup.Members
>>        Wait Window NoWait objUser.Name
>>    Next
>>Next
>>
>>Wait Clear
>>
>>How should it be?
>>
>>TIA,
>>
>>Fernando
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform