Search the Community
Showing results for tags 'group'.
-
Hello, <edit> In this posting below you will find a script to get an Active Directory User's Group Memberships including nested Group Memberships: </edit> quite a while ago I started this thread: https://www.autoitscript.com/forum/topic/193984-ad-member-of-group-in-group/ #include <AD.au3> _AD_Open() $user=_AD_SamAccountNameToFQDN("ASP") $group=_AD_SamAccountNameToFQDN("daten-Bestellung-QS_lesen") $result=_AD_IsMemberOf($group,$user,false,True) ; $Group is the 1st, $User the 2nd param ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $result = ' & $result & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console _AD_Close() this works fine, thanks for the help in the other thread. Howto to get the "chain" of groups for nested group memberships? In AD.AU3 I found the function _AD_RecursiveGetMemberOf(), which might be an approach, (get all the group content then sort out what's needed), just wondering if there is another function that I've overlooked, that directly would give me the "nested membership chain" *ONLY*? Regards, Rudi.
-
Hello, from this posting of @Jos https://www.autoitscript.com/forum/topic/162005-getting-windows-users-account-type/?do=findComment&comment=1176831 I can smoothly check, if a user is a *DIRECT* group member. Has anybody some code to check also, if a user is a *INDIRECT* member of a cascaded group construct? Maybe with @Melba23 's AD UDF? The required rights are granted to group "Dept_B" User John is member of group "Dept_A" Group "Dept_A" is member of the group "Dept_B" So in the AD / NTFS FS environment John finally has the rights of both groups But when checking his "membership to group Dept_B" the result is "no member". The approach I can think of would be, to check all Group Members of group "Dept_B" whether they are of type group, then check again if "John" is member of than " 2nd level group" Func UserInGroup($InGroup,$ThisUser=@LogonDomain & "/" & @UserName) Local $objUser = ObjGet("WinNT://" & $ThisUser ) For $oGroup in $objUser.Groups If $oGroup.Name = $InGroup Then Return 1 EndIf Next Return 0 EndFunc Any suggestions appreciated, regards, Rudi.
-
Hi every one, I wrote this code and I want both the edit boxes scroll vertically together. I used the form v scroll does not help. Then I grouped them together with v scroll does not help. Then inserted radios along side the group also does not help. This is a sample code: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $TitleEdit = GUICreate("Title Editor", 1107, 691, 232, 75, BitOR($GUI_SS_DEFAULT_GUI,$WS_VSCROLL)) $Group1 = GUICtrlCreateGroup("Group1", 8, 40, 1081, 1500, BitOR($GUI_SS_DEFAULT_GROUP,$BS_CENTER,$BS_FLAT,$WS_TABSTOP,$WS_HSCROLL,$WS_VSCROLL,$WS_CLIPSIBLINGS)) GUIStartGroup() $Edit1 = GUICtrlCreateEdit("", 16, 56, 50, 1450) GUICtrlSetData(-1, StringFormat(" 1:\r\n 2:\r\n 3:\r\n 4:\r\n 5:\r\n 6:\r\n 7:\r\n 8:\r\n 9:\r\n10:\r\n11:\r\n12:\r\n13:\r\n14:\r\n15:\r\n16:\r\n17:\r\n18:\r\n19:\r\n20:\r\n21:\r\n22:\r\n23:\r\n24:\r\n25:\r\n26:\r\n27:\r\n28:\r\n29:\r\n30:\r\n31:\r\n32:\r\n33:\r\n34:\r\n35:\r\n36:\r\n37:\r\n38:\r\n39:\r\n40:\r\n41:\r\n42:\r\n43:\r\n44:\r\n45:\r\n46:\r\n47:\r\n48:\r\n49:\r\n50:\r\n51:\r\n52:\r\n53:\r\n54:\r\n55:\r\n56:\r\n57:\r\n58:\r\n59:\r\n60:\r\n61:\r\n62:\r\n63:\r\n64:\r\n65:\r\n66:\r\n67:\r\n68:\r\n69:\r\n70:")) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Edit2 = GUICtrlCreateEdit("", 73, 56, 960, 1450) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Radio0 = GUICtrlCreateRadio("1", 1040, 100, 20, 17) $Radio1 = GUICtrlCreateRadio("1", 1040, 208, 20, 17) $Radio2 = GUICtrlCreateRadio("2", 1040, 300, 20, 17) $Radio3 = GUICtrlCreateRadio("3", 1040, 400, 20, 17) $Radio4 = GUICtrlCreateRadio("4", 1040, 500, 20, 17) $Radio5 = GUICtrlCreateRadio("5", 1040, 600, 20, 17) $Radio6 = GUICtrlCreateRadio("6", 1040, 700, 20, 17) $Radio7 = GUICtrlCreateRadio("7", 1040, 800, 20, 17) $Radio8 = GUICtrlCreateRadio("8", 1040, 900, 20, 17) $Radio9 = GUICtrlCreateRadio("9", 1040, 1000, 20, 17) $Radio10 = GUICtrlCreateRadio("10", 1040, 1100, 20, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Any help??
-
Hi, i want to display a tooltip when i hover over the listview group. It sounds not difficult but i couldn't find a solution and i searched for autoit as well as for c# :/ So i came up with a not so pretty solution: #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <GuiToolTip.au3> #include <WinAPI.au3> Global $idListview, $hWndListView Global $hToolTip = _GUIToolTip_Create(0, BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)); balloon style tooltip Global Const $LVN_GROUPINFO = ($LVN_FIRST - 88) Global Const $tagNMLVGROUP = $tagNMHDR & ";int iGroupId;uint iNewState;uint iOldState" ; $LVGS_flags $LVGS_flags Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $tInfo, $tNMHDR = DllStructCreate($tagNMHDR, $lParam), $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Local $iIDFrom = DllStructGetData($tNMHDR, "IDFrom"), $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode ; Case $of?????? ; A Group was clicked <---- I need help with this Case $LVN_GROUPINFO ConsoleWrite("hier" & @CRLF) $tInfo = DllStructCreate($tagNMLVGROUP, $lParam) _DebugPrint("$LVN_GROUPINFO" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->GroupId:" & @TAB & DllStructGetData($tInfo, "iGroupId") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "iNewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "iOldState")) Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam) _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint If Not StringInStr($CmdLineRaw, "/ErrorStdOut") Then Exit MsgBox($MB_TOPMOST, @ScriptName, 'please run from the editor, thanks', 10) Example() Func Example() Local $aInfo, $hImage, $idListview $ghui = GUICreate("ListView Group COLLAPSIBLE", 400, 300) $idListview = GUICtrlCreateListView("", 30, 20, 354, 218);, BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL, $LVS_REPORT, $WS_CLIPSIBLINGS)) $hWndListView = GUICtrlGetHandle($idListview) ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) _GUICtrlListView_AddColumn($idListview, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($idListview, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem($idListview, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem($idListview, "Row 3: Col 1", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1", 1) ;~ _GUICtrlListView_SetGroupInfo($idListview, 1, "Group 1", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") ;~ _GUICtrlListView_SetGroupInfo($idListview, 2, "Group 2", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Local $apos = _GUICtrlListView_GetGroupRect($idListview, 2, $LVGGR_LABEL) Local $test = GUICtrlCreateLabel("a", 2, 2, 10, 17) Local $val = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_STYLE) Local $valex = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_EXSTYLE) Local $aha = _WinAPI_CreateWindowEx($valex+$WS_EX_LAYERED, "static", "blabla", $val, $apos[0], $apos[1], 50, 20, $hWndListView) _GUIToolTip_AddTool($hToolTip, $hWndListView, "This is a ToolTip3", $aha) GUISetState(@SW_SHOW) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Short description: I only created a label with CreateWindowEx which i can append to the listview control and layered it with the $WS_EX_Layered flag so it looks like it's transparent. Then i only added a tooltip tool to that created label. Hover over the Group 2 text and the Tooltip will be displayed. My question is: does someone know another perhaps much prettier solution? Thanks in advance
-
Name: GroupCheckBox Description: Allows to create and manage group checkboxes. AutoIt: 3.3.6.1 - 3.3.12.0 Example: Download: GroupCheckBox.zip
-
Hi Guys, Im having a bit of trouble with the AD UDF - I know its me and not the UDF but i thought i had this working well until i introduced a domain check before my function. It appears at that point my domain check is ignoring my commands and always going with the domain of the currently logged on user ut i dont know why. Here is my code: #include <File.au3> #include <MsgBoxConstants.au3> #include <AD.au3> Global $sFQDN_User, $Groups, $sUserIdParam, $sPasswordParam, $sDNSDomainParam, $sHostServerParam, $sConfigurationParam FileWrite(@ScriptDir & "\TestGroups.txt", "SoftwareInstaller-All" & @CRLF) FileWrite(@ScriptDir & "\TestGroups.txt", "SoftwareInstaller-ProfServ" & @CRLF) FileWrite(@ScriptDir & "\TestGroups.txt", "SoftwareInstaller-Sales" & @CRLF) DetectAD() Func DetectAD() If @LogonDNSDomain = "Domain.one.two" Then ADCheckOT() ElseIf @LogonDNSDomain = "Domain.three" Then ADCheckT() EndIf EndFunc ; Syntax.........: _AD_Open([$sUserIdParam = "", $sPasswordParam = ""[, $sDNSDomainParam = "", $sHostServerParam = "", $sConfigurationParam = ""[, $iSecurity = 0]]]) Func ADCheckOT() _AD_Open($sUserIdParam = "", $sPasswordParam = "", $sDNSDomainParam = "DC=domain,DC=one,DC=two", $sHostServerParam = "", $sConfigurationParam = "") ;Then ; Get the Fully Qualified Domain Name (FQDN) for the current user $sFQDN_User = _AD_SamAccountNameToFQDN() _FileReadToArray(@ScriptDir & "\TestGroups.txt", $Groups) For $i = 1 To $Groups[0] $sFQDN_Group = $Groups[$i] ; Check the group membership of the specified user for the specified group $iResult = _AD_IsMemberOf($sFQDN_Group, $sFQDN_User) Select Case $iResult = 1 If $sFQDN_Group = "SoftwareInstaller-All" Then MsgBox(0,"","SoftwareInstaller-All") ElseIf $sFQDN_Group = "SoftwareInstaller-ProfServ" Then MsgBox(0,"","SoftwareInstaller-ProfServ") ElseIf $sFQDN_Group = "SoftwareInstaller-Sales" Then MsgBox(0,"","SoftwareInstaller-Sales") EndIf EndSelect Next _AD_Close() EndFunc Func ADCheckT() _AD_Open($sUserIdParam = "", $sPasswordParam = "", $sDNSDomainParam = "DC=domain,DC=three", $sHostServerParam = "", $sConfigurationParam = "") ;Then ; Get the Fully Qualified Domain Name (FQDN) for the current user $sFQDN_User = _AD_SamAccountNameToFQDN() _FileReadToArray(@ScriptDir & "\TestGroups.txt", $Groups) For $i = 1 To $Groups[0] $sFQDN_Group = $Groups[$i] ; Check the group membership of the specified user for the specified group $iResult = _AD_IsMemberOf($sFQDN_Group, $sFQDN_User) Select Case $iResult = 1 If $sFQDN_Group = "SoftwareInstaller-All" Then MsgBox(0,"","SoftwareInstaller-All") ElseIf $sFQDN_Group = "SoftwareInstaller-ProfServ" Then MsgBox(0,"","SoftwareInstaller-ProfServ") ElseIf $sFQDN_Group = "SoftwareInstaller-Sales" Then MsgBox(0,"","SoftwareInstaller-Sales") EndIf EndSelect Next _AD_Close() EndFunc FileDelete(@ScriptDir & "\TestGroups.txt")Im pretty sure i dont understand the syntax, I dont want to specify a username or password i just want to specify which domain to check as i should be able to query groups this without having to authenticate. The idea is that the script will check which domain they are on first, then connect to the correct domain to check group membership, if they are in 1 of the groups then another function will run - replaced with MsgBoxs for the reproducer. Can someone point me in the right direction? Thanks
-
How to _IEFormElementRadioSelect a radio button that doesn't have a radio group's name or ID? _IEFormElementRadioSelect($o_object, $s_string, $s_name) <fieldset class="share-item"> <legend>share a link or news</legend> <div class="share-item-types"><span class="radio-group-label">Discussion type:</span> <span class="radio-group"> <input type="radio" class="fancy" id="discussion-type-general" name="forumtype" value="7" checked="true" tabindex="0"><label class="radio-label" for="discussion-type-general">General</label> <input type="radio" class="fancy" id="discussion-type-job" name="forumtype" value="5" tabindex="0"><label class="radio-label" for="discussion-type-job">Job</label> <input type="radio" class="fancy" id="discussion-type-promotion" name="forumtype" value="8" tabindex="0"><label class="radio-label" for="discussion-type-promotion">Promotion</label> </span> </div> <div class="share-item-group"> <input type="hidden" value="0" name="contentImageCount" id="share-img-total"> <input type="hidden" value="-1" name="contentImageIndex" id="share-img-selected-idx"> <input type="hidden" value="" name="contentImage" id="share-img-selected-url"> <input type="hidden" value="" name="contentEntityID" id="share-entity-id"> <input type="hidden" value="" name="contentUrl" id="share-entity-url"> <div id="share-mode" class="share-mode"> <div class="share-loading"></div> <div id="share-view" class="share-preview"></div> <div class="share-edit"> <ul id="share-edit-list" class="form"> <li id="share-edit-title-wrapper"> <input type="text" name="contentTitle" value="" id="share-edit-title" tabindex="0" class="text share-edit-title" maxlength="70"> </li> <li id="share-edit-meta"></li> <li id="share-edit-summary-wrapper"> <textarea name="contentSummary" id="share-edit-summary" tabindex="0" class="text" maxlength="250"></textarea> </li> <li id="share-include-photo-wrapper"> <input type="checkbox" name="contentImageIncluded" value="true" id="share-include-photo" class="check" checked="checked" tabindex="0"> <label for="share-include-photo">Include Photo</label> </li> <li> <input type="button" name="#" value="Save" class="btn-primary" id="share-edit-submit" tabindex="0"> or <a href="#" tabindex="0" id="share-edit-cancel">Cancel</a> </li> </ul> </div> </div> <div class="post-actions"> <div class="post-actions-row"> <div class="submit"> <input type="submit" name="postItem" value="Share" class="btn-primary share-submit disabled" id="share-submit" tabindex="0" disabled=""> </div> </div> </div> </div> </fieldset> This is what I want to select: <input type="radio" class="fancy" id="discussion-type-job" name="forumtype" value="5" tabindex="0"><label class="radio-label" for="discussion-type-job">Job</label>
-
Hi all. I was wondering whether anyone could kindly provide me with some examples of creating a group in AD as well as an OU please? Or is this not possible? Many thanks in advance!
- 6 replies
-
- active directory
- ad
-
(and 2 more)
Tagged with:
-
I am trying to pull information from different files. They will all be grouped together by name. In treeview I would have Last Name << This labels would be the actual name. -First Name -Address -Phone Number I currently have the above information saved into 4 different ini files. I am writting the values as Section Keys. Like so: IniWriteSection(@ScriptDir & "\First Name.ini", GUICtrlRead($Name),"") Then read it into an array such as Local $Name2 = IniReadSectionNames(@ScriptDir & "\First Name.ini") For $I = 1 To $Name2[0] GUICtrlSetData(-1, $Name2[$I] & "|") Next The problem is I can not get the separate values into the TreeView based on what last name is selected. Here is what I have so far: Onlastnamesearch("CueClub") Func Onlastnamesearch($LastName) GUICreate("Notes for " & $LastName, 300, 250, -1, -1, "", $WS_EX_TOPMOST) GUICtrlCreateLabel("LAST NAME", 5, 10, 60, 40) Local $Tmp = IniReadSectionNames(@ScriptDir & "\Last Name.ini") Local $Tmp2 = GUICtrlCreateTreeView(5, 50, 170, 100) For $I = 1 To $tmp[0] $tmp3 = GUICtrlCreateTreeViewItem($tmp[$i], $Tmp2) $FirstName = GUICtrlCreateTreeViewItem("First Name", $Tmp3) $Address = GUICtrlCreateTreeViewItem("Address", $Tmp3) $PhoneNumber = GUICtrlCreateTreeViewItem("Phone Number", $Tmp3) Next Local $exit = GUICtrlCreateButton("Exit", 5, 160, 50, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $exit Or $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() EndFunc ;==>Example As you can see above, I can get the treeview to populate, and even the tree items, However I am stumped as to how to pull the data from the separate ini files and display them based on what is clicked on the treeview. I have read the help file, and searched here a bit, but it is a bit confusing for me. Any help would be appreciated. CC
-
Hi guys, Been a while since I was last using AutoIt properly and it's showing! I am creating a simple game launcher - before you all pounce, this is not a hack. I will use it to pass command line parameters to a game. Not to hack it. Anyway, I have loaded the background image and have a button displayed - however the text on both the checkbox and group will not change? Looking through the help file, I noted: That sort of contradicts itself? My brother tried to show me optional 'workarounds' however neither of them suited what I want to do. So here is the program. Works the same without the background image. #include <GDIPlus.au3> #include <WinAPI.au3> Global $hGUI, $hImage, $hGraphic, $hLabel Global $hRunGroup, $hRun, $hRunTesting ; Create GUI $hGUI = GuiCreate("Assaultcube Launcher", 400, 400) ;~ GUICtrlSetDefColor(0xFFFFFF, $hGUI) GUISetBkColor(0x000000, $hGUI) GUISetState() ; Create background image _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile("C:\Program Files\AssaultCube_v1.1.0.4\packages\misc\startscreen.png") $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 10, -20, 380, 380) ; Hide Loading... text GUICtrlCreateLabel("", 130, 180, 120, 30) GUICtrlSetBkColor(-1, 0x000000) ; Create controls $hRunGroup = GUICtrlCreateGroup("Run Assaultcube", 10, 250, 380, 50) $hRun = GUICtrlCreateButton("Run Assaultcube", 40, 300) $hRunTesting = GUICtrlCreateCheckbox("Testing", 100, 100) ; Set appropriate colours GUICtrlSetColor($hRunGroup, 0xFFFFFF) GUICtrlSetColor($hRun, 0x000000 ) GUICtrlSetColor($hRunTesting, 0xFFFFFF) While 1 switch GUIGetMsg() case -3 _Exit() EndSwitch WEnd Func _Exit() _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hImage) _GDIPlus_ShutDown() Exit EndFunc Can anyone help me to set the group and checkbox text colours please? Please note the background colours must stay the same.