Jump to content

ComboBox data from domain group - almost there.


mdwerne
 Share

Recommended Posts

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
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...