Sign in to follow this  
Followers 0
mdwerne

ComboBox data from domain group - almost there.

3 posts in this topic

#1 ·  Posted (edited)

Hello,

I'm trying to populate a ComboBox from a domain group.

I can list the group just fine: Line #12 (currently commented out)

But when I try and take that list to the ComboBox, all results show up on the same line.

Never played with ComboBoxes so I would guess that I missing something very obvious to many of you, sadly it's unobvious to me.

Here is what I have so far:

#include <GuiConstantsEx.au3>

Dim $List

$Group = ObjGet("WinNT://" & "domain" & "/" & "group" & ",group")

For $Member in $Group.Members

    $List = $List & $Member.Name & "@domain.com" & @CRLF
Next

;MsgBox(0, "Members...", $List)

GUICreate("Combo Test", 200, 50)
GUICtrlCreateCombo("", 10, 10, 150)
GUICtrlSetData(-1, $List)
GUISetState()

While 1
$msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

WEnd

Any suggestions?

Thanks,

-Mike

Edited by mdwerne

Share this post


Link to post
Share on other sites



according to helpfile:

...

$List = $List & $Member.Name & "@domain.com" & '|'

...
I saw that in the helpfile and assumed it meant that if I wanted a separator, '|' was the default. I didn't understand that I needed to use it to force separation. :mellow:

As you may have guessed, works perfectly now.

Thank you!

-Mike

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0