Bo.SaQeR
زيزوومى متألق
- إنضم
- 16 أبريل 2009
- المشاركات
- 457
- مستوى التفاعل
- 5
- النقاط
- 470
غير متصل
من فضلك قم بتحديث الصفحة لمشاهدة المحتوى المخفي
هذا هو الذي تريده (يحتاج بعض التطوير ليصبح أداة كاملة) :
كود:#include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #Region ### START Koda GUI section ### Form= $Database = @ScriptDir & "\Contacts.txt" $Form1_1 = GUICreate("Contacts", 390, 275, 192, 124) $List = GUICtrlCreateListView("", 5, 5, 194, 262) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50) $Group1 = GUICtrlCreateGroup("Add Contact :", 208, 42, 175, 113) $NameEdit = GUICtrlCreateInput("", 272, 66, 105, 21) $NumberEdit = GUICtrlCreateInput("", 272, 94, 105, 21) GUICtrlCreateLabel("Name :", 216, 69, 38, 17) GUICtrlCreateLabel("Number :", 218, 95, 47, 17) $Save = GUICtrlCreateButton("Save", 256, 122, 75, 25, $WS_GROUP) GUICtrlCreateGroup("", -99, -99, 1, 1) $Copy = GUICtrlCreateButton("Copy Selected", 205, 168, 179, 25, $WS_GROUP) _GUICtrlListView_InsertColumn($List, 0, "Name", 70) _GUICtrlListView_InsertColumn($List, 1, "Number", 120) $Data = FileRead($Database) $Len = StringSplit($Data, @CR) $DataS = StringSplit($Data, "|") For $s = 1 To $DataS[0] - 1 Step 2 _GUICtrlListView_AddItem($List, $DataS[$s]) Next For $s = 1 To $Len[0] _GUICtrlListView_AddSubItem($List, $s - 1, $DataS[$s * 2], 1) Next GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Save FileWrite($Database, @CR & GUICtrlRead($NameEdit) & "|" & GUICtrlRead($NumberEdit) & "|") _GUICtrlListView_AddItem($List, GUICtrlRead($NameEdit)) _GUICtrlListView_AddSubItem($List, $s - 1, GUICtrlRead($NumberEdit), 1) $s = $s + 1 Case $Copy $Ind = _GUICtrlListView_GetSelectedIndices($List) $Copied = _GUICtrlListView_GetItemText($List, Int($Ind), 1) ClipPut($Copied) EndSwitch WEnd
أتعبني هذا المثال :d:
بالتوفيق
جزاك الله خير ..
لكن السكربت مو راضي يشتغل .. :er:
في خطأ حاولت أكتشفه بنفسي ما قدرت .. :b::f:
--
عند عمل كومبايل للسكربت وتنفيذهـ تظهر هالرساله ..

