nabele Posted March 15, 2007 Posted March 15, 2007 Thanks for your help, it works fine.Sorry, to be annoying, but is there a way to do it without opening windows?I have found two solutions. I post them here as they might be of interest for others:- The command "control userpasswords2" opens directly the appropriate window.- The command "net user" provides a list of users defined on the system and can be piped for treatment.Thanks again for your help.
arcker Posted March 15, 2007 Posted March 15, 2007 (edited) yes it works ^^ thx you and...how to set the color of an item (not the text of all items) ? (like the guictrlsetcolor()) same, i don't find any example on it thx for your really good support edit 1 : tell me if i'm wrong, but items color text must be edited with the NM_CUSTOMDRAW message (listview NMLVCUSTOMDRAW) and so i have to use the structure i've begun as this, i'm on the right way ? func _tagNMLVCUSTOMDRAW ($pPointer = 0) Local $aTag[2] = ["tagLVSETINFOTIP_", _tagStruct ("ptr;uint;uint;int;dword;uint;int;int;int;int;uint;uint", $pPointer) ] Return _tagBuild ($aTag, "NMCUSTOMDRAW, clrText, clrTextBk, iSubItem, dwItemType, clrFace, iIconEffect, iConPhase, iPartId, iStateId, rcText, uAlign") EndFunc Edited March 15, 2007 by arcker -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
PaulIA Posted March 15, 2007 Author Posted March 15, 2007 yes it works ^^ thx you and...how to set the color of an item (not the text of all items) ? (like the guictrlsetcolor()) same, i don't find any example on it thx for your really good support edit 1 : tell me if i'm wrong, but items color text must be edited with the NM_CUSTOMDRAW message (listview NMLVCUSTOMDRAW) and so i have to use the structure i've begun as this, i'm on the right way ? func _tagNMLVCUSTOMDRAW ($pPointer = 0) Local $aTag[2] = ["tagLVSETINFOTIP_", _tagStruct ("ptr;uint;uint;int;dword;uint;int;int;int;int;uint;uint", $pPointer) ] Return _tagBuild ($aTag, "NMCUSTOMDRAW, clrText, clrTextBk, iSubItem, dwItemType, clrFace, iIconEffect, iConPhase, iPartId, iStateId, rcText, uAlign") EndFuncThis is correct. If you want to alter the color on an item by item basis, you'll need to handle custom draw messages. Auto3Lib: A library of over 1200 functions for AutoIt
arcker Posted March 16, 2007 Posted March 16, 2007 you'll need to handle custom draw messagesyep, that's the difficulty herei don't understand very well how to handle those messages to alter them after...what i've understood it that anytime this message is sent by the parent, the structure is setso it's the first step : retrieve those informationcan you tell me the start point ? i mean just verify is my structure seems correct and i'll do the resti've discovered that retrieving those messages let the use to modify subitems color as wellthat coulb be pretty cool XDthx for your answer -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
PaulIA Posted March 16, 2007 Author Posted March 16, 2007 (edited) yep, that's the difficulty here i don't understand very well how to handle those messages to alter them after... what i've understood it that anytime this message is sent by the parent, the structure is set so it's the first step : retrieve those information can you tell me the start point ? i mean just verify is my structure seems correct and i'll do the rest i've discovered that retrieving those messages let the use to modify subitems color as well that coulb be pretty cool XD thx for your answerYour structure definition is a tad off: CODEexpandcollapse popup; #STRUCTURE# =================================================================================================================== ; Description ...: _tagNMLVCUSTOMDRAW structure ; Parameters ....: $pPointer - If supplied, structure will be mapped over this pointer ; Fields ........: WndFrom - A window handle to the control sending the message ; IDFrom - An identifier of the control sending the message ; Code - A notification code ; DrawStage - The current drawing stage. This is one of the following values: ; |Global values: ; | $CDDS_POSTERASE - After the erasing cycle is complete ; | $CDDS_POSTPAINT - After the painting cycle is complete ; | $CDDS_PREERASE - Before the erasing cycle begins ; | $CDDS_PREPAINT - Before the painting cycle begins ; |Item specific values: ; | $CDDS_ITEM - Indicates that the ItemSpec, ItemState, and ItemlParam members are valid ; | $CDDS_ITEMPOSTERASE - After an item has been erased ; | $CDDS_ITEMPOSTPAINT - After an item has been drawn ; | $CDDS_ITEMPREERASE - Before an item is erased ; | $CDDS_ITEMPREPAINT - Before an item is drawn ; | $CDDS_SUBITEM - Combined with $CDDS_ITEMPREPAINT or $CDDS_ITEMPOSTPAINT if a subitem is being drawn ; DC - Handle to the control's device context ; RectL - Left postion of area being drawn ; RectT - Top position of area being drawn ; RectR - Right position of area being drawn ; RectB - Bottom position of area being drawn ; ItemSpec - The item number ; ItemState - The current item state. This value is a combination of the following flags: ; |$CDIS_CHECKED - The item is checked ; |$CDIS_DEFAULT - The item is in its default state ; |$CDIS_DISABLED - The item is disabled ; |$CDIS_FOCUS - The item is in focus ; |$CDIS_GRAYED - The item is grayed ; |$CDIS_HOT - The item is currently under the pointer ; |$CDIS_INDETERMINATE - The item is in an indeterminate state ; |$CDIS_MARKED - The item is marked ; |$CDIS_SELECTED - The item is selected ; |$CDIS_SHOWKEYBOARDCUES - The item is a keyboard cue ; |$CDIS_NEARHOT - The item is part of a control that is currently under the mouse pointer ; |$CDIS_OTHERSIDEHOT - The item is part of a splitbutton that is currently under the mouse pointer ; |$CDIS_DROPHILITED - The item is currently the drop target of a drag-and-drop operation ; ItemlParam - Application-defined item data ; ClrText - Color that will be used to display text foreground ; ClrTextBk - Color that will be used to display text background ; SubItem - Index of the subitem that is being drawn ; ItemType - The type of the item to draw: ; |$LVCDI_ITEM - An item is to be drawn ; |$LVCDI_GROUP - A group is to be drawn ; ClrFace - Color that will be used to display the face of an item ; IconEffect - Specifies the effect that is applied to an icon ; IconPhase - Specifies the phase of an icon ; PartID - Specifies the ID of the part of an item to draw ; StateID - Specifies the ID of the state of an item to draw ; rcTextL - Left position of area where text is to be drawn ; rcTextT - Top position of area where text is to be drawn ; rcTextR - Right position of area where text is to be drawn ; rcTextB - Bottom position of area where text is to be drawn ; Align - Specifies how a group should be aligned. This member can be one of the following values: ; |$LVGA_HEADER_CENTER - Center the group ; |$LVGA_HEADER_LEFT - Align the group on the left ; |$LVGA_HEADER_RIGHT - Align the group on the right ; Author ........: Paul Campbell (PaulIA) ; Remarks .......: ; =============================================================================================================================== Func _tagNMLVCUSTOMDRAW($pPointer=0) Local $aTag[2]=["tagNMLVCUSTOMDRAW_", _tagStruct("hwnd;int;int;dword;hwnd;int;int;int;int;dword;int;int;int;int;int;dword;int;" & _ "int;int;int;int;int;int;int;int;int", $pPointer)] Return _tagBuild($aTag, "WndFrom, IDFrom, Code, DrawStage, DC, RectL, RectT, RectR, RectB, ItemSpec, ItemState, ItemlParam, ClrText, " & _ "ClrTextBk, SubItem, ItemType, ClrFace, IconEffect, IconPhase, PartID, StateID, rcTextL, rcTextT, rcTextR, " & _ "rcTextB, Align") EndFunc Edited March 20, 2007 by PaulIA Auto3Lib: A library of over 1200 functions for AutoIt
gseller Posted March 18, 2007 Posted March 18, 2007 Hi All, So does anyone have the final compiled .au3 file to share? Thanx...
gseller Posted March 18, 2007 Posted March 18, 2007 Hi All, So does anyone have the final compiled .au3 file to share?Thanx...Sorry, I found the file.. Really nice!
RìggníX Posted March 18, 2007 Posted March 18, 2007 hi guys, i've got a problem with _NetShare_NetShareEnum()the problem is posted here: http://www.autoitscript.com/forum/index.php?showtopic=42825so, how can i log on to the server? and were is NetShare demo?thx for help!! greetz, RìggníXBiTrAtE.tk
PaulIA Posted March 18, 2007 Author Posted March 18, 2007 hi guys, i've got a problem with _NetShare_NetShareEnum()the problem is posted here: http://www.autoitscript.com/forum/index.php?showtopic=42825so, how can i log on to the server? and were is NetShare demo?thx for help!!The NetShare.au3 file is in the Auto3Lib Examples folder. Run it and type in the name of the server you want to query and optionally, the name of a share. It will list all of the shares on the server. You can not query the shares on a server for which you are not a member. So you need to log onto the server manually before running the script or map a drive to one of the shares on the server (which authenticates you with the server). Auto3Lib: A library of over 1200 functions for AutoIt
RìggníX Posted March 18, 2007 Posted March 18, 2007 hmm, ok... but how can i log on to the server in a autoit script? /signed greetz, RìggníXBiTrAtE.tk
PaulIA Posted March 18, 2007 Author Posted March 18, 2007 hmm, ok...but how can i log on to the server in a autoit script?/signedYou can use the _WNet_AddConnection and _WNet_ConnectionDialog UDFs in the A3LWNet.au3 module if you want to connect to a resource with username/password authentication. Auto3Lib: A library of over 1200 functions for AutoIt
Automan Empire Posted March 19, 2007 Posted March 19, 2007 Great job PaulIA. Is this heaven? "I've seen your work in the past, and it's novice at best..." SmOke_N
PaulIA Posted March 19, 2007 Author Posted March 19, 2007 Great job PaulIA. Is this heaven?Yes. Yes, it is... Auto3Lib: A library of over 1200 functions for AutoIt
Automan Empire Posted March 19, 2007 Posted March 19, 2007 From "Field of Dreams" Shoeless Joe Jackson: Is this heaven? Ray Kinsella: No, it's Iowa. "I've seen your work in the past, and it's novice at best..." SmOke_N
arcker Posted March 19, 2007 Posted March 19, 2007 paulIA, thx for the structure ! i release an example asap ! you're just THE man Heaven ? Yes it is -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
PaulIA Posted March 19, 2007 Author Posted March 19, 2007 From "Field of Dreams"Shoeless Joe Jackson: Is this heaven? Ray Kinsella: No, it's Iowa.Oh, I know the movie. You can't live in Iowa without seeing it at least once a year. I think it's a state law. However, after living in several large cities for different times of my life, my response to Shoeless Joe would have been "Yes. Yes, it is heaven". Auto3Lib: A library of over 1200 functions for AutoIt
arcker Posted March 20, 2007 Posted March 20, 2007 arhhhheaven is reserved to god i thinkbecause...i can't do anything with the structurebecause i don't understand how to trap the messagesi've something like this in my wm_notify :case _Lib_WM_NOTIFY_EX("NM_CUSTOMDRAW" , $hFrom, $iID, $iCode) local $tNMLVCUSTOMDRAW = _tagNMLVCUSTOMDRAW($ilParam) local $pNMLVCUSTOMDRAW = _taggetptr($tNMLVCUSTOMDRAW) _lib_ConsoleWrite(_tagGetData($tNMLVCUSTOMDRAW,"IDFrom"))i didn't finf any examplesfor those who ask what is possible to do with custom draw, just look this :http://www.codeproject.com/listctrl/quicklist.asp -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
PaulIA Posted March 20, 2007 Author Posted March 20, 2007 (edited) arhhh heaven is reserved to god i think because...i can't do anything with the structure because i don't understand how to trap the messages i've something like this in my wm_notify : case _Lib_WM_NOTIFY_EX("NM_CUSTOMDRAW" , $hFrom, $iID, $iCode) local $tNMLVCUSTOMDRAW = _tagNMLVCUSTOMDRAW($ilParam) local $pNMLVCUSTOMDRAW = _taggetptr($tNMLVCUSTOMDRAW) _lib_ConsoleWrite(_tagGetData($tNMLVCUSTOMDRAW,"IDFrom")) 2. Here is an article that shows how to use the custom draw message on a ListView. Edited March 20, 2007 by PaulIA Auto3Lib: A library of over 1200 functions for AutoIt
arcker Posted March 20, 2007 Posted March 20, 2007 mmmm wellit works thx !i don't understand you structure at allif i read thiscustom draw listviewi understand the it should be two differents structures, but...i don't knowanother point : how to get the drawstage ? it's the start of everything to get the drawstage and then play with this (if i understand well) -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Zedna Posted March 20, 2007 Posted March 20, 2007 (edited) Hi PaulIA I have question: Will you rewrite your library with new AutoIt syntax to use named struct items instead of your own _tag functions? From latest AutoIt beta 3.2.3.0 changelog: - Added: DllStruct...() can reference elements by name. - Added: Struct variables Edited March 20, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts