aggg63 Posted May 25, 2007 Posted May 25, 2007 Hello. I'm working in an utility to delete networks drive from a list. I have a problem with the list, i can't select the first element in list. What I'm doing wrong? Thanks a lot. This is the code: CODE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #include <GuiConstants.au3> #include <File.au3> #include <Array.au3> #Include <GuiList.au3> #include <Misc.au3> Opt("TrayIconDebug",1) Opt('MustDeclareVars',1) Opt('GUIOnEventMode',1) global $LlistaUnitatsXarxa,$lstUnitatsXarxa,$lblLlista,$lblUnitatsXarxa ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Programa principal FormulariSeleccio() LlistarUnitatsXarxa() GUISetOnEvent($GUI_EVENT_CLOSE,'Events') GUISetOnEvent($GUI_EVENT_MINIMIZE,'Events') GUISetOnEvent($GUI_EVENT_RESTORE,'Events') While 1 Sleep(100) WEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; FUNCIONS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; func FormulariSeleccio() ; Formulari de selecció GuiCreate('Servidor',450,350,(@DesktopWidth-450)/2,(@DesktopHeight-350)/2) $lblUnitatsXarxa=GuiCtrlCreateLabel("Unitats de xarxa",200,20,150,50) GUICtrlSetFont(-1,10,800) $lstUnitatsXarxa=GuiCtrlCreateList('',200,50,200,100,$LBS_SORT) GuiSetState() endfunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func LlistarUnitatsXarxa() $LlistaUnitatsXarxa=DriveGetDrive('NETWORK') _ArrayDisplay($LlistaUnitatsXarxa,'unitats') GUICtrlSetData($lstUnitatsXarxa,$LlistaUnitatsXarxa[1] & DriveMapGet($LlistaUnitatsXarxa[1])) for $i=1 to $LlistaUnitatsXarxa[0] _GUICtrlListAddItem($lstUnitatsXarxa,$LlistaUnitatsXarxa[$i] & DriveMapGet($LlistaUnitatsXarxa[$i])) next ;msgbox(0,'numero discos red en lista',_GUICtrlListCount($lstUnitatsXarxa)) EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func Events() Switch @GUI_CTRLID Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE ;;; Case $GUI_EVENT_RESTORE ;;; EndSwitch EndFunc
GaryFrost Posted May 25, 2007 Posted May 25, 2007 Overlapping controls Change the label height $lblUnitatsXarxa=GuiCtrlCreateLabel("Unitats de xarxa",200,20,150,25) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
aggg63 Posted May 25, 2007 Author Posted May 25, 2007 Overlapping controls Change the label height $lblUnitatsXarxa=GuiCtrlCreateLabel("Unitats de xarxa",200,20,150,25) OK, I'm :"> (I don't know the correct word in English, I'm Spanish). Thanks for the clue.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now