Jump to content

Recommended Posts

Posted

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.

Posted (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 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]
Posted

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
This 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
Posted

you'll need to handle custom draw messages

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 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]
Posted (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 answer

Your structure definition is a tad off:

CODE
; #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 by PaulIA
Auto3Lib: A library of over 1200 functions for AutoIt
Posted

hi guys, i've got a problem with _NetShare_NetShareEnum()

the problem is posted here: http://www.autoitscript.com/forum/index.php?showtopic=42825

so, 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
Posted

hmm, ok...

but how can i log on to the server in a autoit script?

/signed

You 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
Posted

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]
Posted

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. :whistle: 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". :P
Auto3Lib: A library of over 1200 functions for AutoIt
Posted

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"))

i didn't finf any examples

for 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]
Posted (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 by PaulIA
Auto3Lib: A library of over 1200 functions for AutoIt
Posted

mmmm well

it works thx !

i don't understand you structure at all

if i read this

custom draw listview

i understand the it should be two differents structures, but...i don't know

another 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]
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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