Login Register






People Base 1.0 filter_list
Author
Message
People Base 1.0 #1
It is just a software to store information about people and view them later. I remember someone here was planning to make something called DOX BOX. It can be used for some similar purpose if you wish so.
I tried my best to fix the bugs. If you find anymore bugs, please report them here in this thread.

Screen Shots:
[Image: Screen_7.jpg]
[Image: Screen_8.jpg]
[Image: Screen_9.jpg]

Source
Code:
#include<WindowsConstants.au3> #include<GUIConstants.au3> #include<StaticConstants.au3> #include<ComboConstants.au3> #include<EditConstants.au3> #include <GUIConstantsEx.au3> #include<ListViewConstants.au3> Opt("GUIOnEventMode",1) $hWnd=GUICreate("People Base 1.0",@DesktopWidth,@DesktopHeight,0,0) Global $picCtrl Global $face=0 $color1=0x000 $color2=0xff6666 $color3=0x6666ff GUISetOnEvent($GUI_EVENT_CLOSE,"quit") GUICtrlSetDefBkColor($color1,$hWnd) GUICtrlSetDefColor($color2,$hWnd) GUISetBkColor($color1,$hWnd) GUISetFont(10) Global $titleLabel=GUICtrlCreateLabel("People Base",@DesktopWidth/2-170,@DesktopHeight/2-140,500,100) GUICtrlSetFont($titleLabel,30,1000,8,"Comic Sans MS",5) $peopleMenu=GUICtrlCreateMenu("Options") $addMenuItem=GUICtrlCreateMenuItem("Make New Entry",$peopleMenu) GUICtrlSetOnEvent($addMenuItem,"newentry") $editMenuItem=GUICtrlCreateMenuItem("Edit Existing Entry",$peopleMenu) GUICtrlSetOnEvent($editMenuItem,"editentry") $searchMenuItem=GUICtrlCreateMenuItem("Search Entry",$peopleMenu) GUICtrlSetOnEvent($searchMenuItem,"searchentry") $aboutMenuItem=GUICtrlCreateMenuItem("About",$peopleMenu) GUICtrlSetOnEvent($aboutMenuItem,"about") $exitMenuItem=GUICtrlCreateMenuItem("Exit",$peopleMenu) GUICtrlSetOnEvent($exitMenuItem,"quit") GUISetState(@SW_SHOW,$hWnd) While 1 WEnd Func quit() Exit EndFunc Func about() MsgBox(64,"About","People Base 1.0" & @CRLF & "Made By : Solixious Klein" & @CRLF & "www.hackcommunity.com") EndFunc Func searchentry() clearscr() $face=3 Global $searchLabel=GUICtrlCreateLabel("Keyword",30,30,100,20) Global $searchInput=GUICtrlCreateInput("",130,30,300,20) GUICtrlSetOnEvent($searchInput,"search") Global $searchButton=GUICtrlCreateButton("Search",440,30,60,20) GUICtrlSetOnEvent($searchButton,"search") Global $cancelSearch=GUICtrlCreateButton("Cancel",510,30,60,20) GUICtrlSetOnEvent($cancelSearch,"cancelsearch") Global $searchList=GUICtrlCreateListView("Name |Address 1 |Address 2 |Town/City |Country |Phone |Email |Gender|Interests |Close Ones |Behaviour |Occupation |Activities",0,60,@DesktopWidth,@DesktopHeight-120,$LVS_NOSORTHEADER,$LVS_EX_FLATSB) EndFunc Func search() GUICtrlDelete($searchList) Global $searchList=GUICtrlCreateListView("Name |Address 1 |Address 2 |Town/City |Country |Phone |Email |Gender|Interests |Close Ones |Behaviour |Occupation |Activities",0,60,@DesktopWidth,@DesktopHeight-120,$LVS_NOSORTHEADER,$LVS_EX_FLATSB) $query=GUICtrlRead($searchInput) $list=load() For $i=1 To $list[0]-1 Step +1 $temp=StringSplit($list[$i],"~") $flag=0 For $j=1 To $temp[0] Step +1 If $temp[$j]=$query Or StringReplace($temp[$j],$query,"qq35")<>$temp[$j] Then $flag=1 EndIf Next If $flag=1 Then GUICtrlCreatelistViewItem($temp[1] & "|" & $temp[2] & "|" & $temp[3] & "|" & $temp[4] & "|" & $temp[5] & "|" & $temp[6] & "|" & $temp[7] & "|" & $temp[8] & "|" & $temp[9] & "|" & $temp[10] & "|" & $temp[11] & "|" & $temp[12] & "|" & $temp[13],$searchList) EndIf Next EndFunc Func cancelsearch() GUICtrlDelete($searchLabel) GUICtrlDelete($searchInput) GUICtrlDelete($searchButton) GUICtrlDelete($cancelSearch) GUICtrlDelete($searchList) $titleLabel=GUICtrlCreateLabel("People Base",@DesktopWidth/2-170,@DesktopHeight/2-140,500,100) GUICtrlSetFont($titleLabel,30,1000,8,"Comic Sans MS",5) EndFunc Func editentry() clearscr() $face=2 Global $nameLabel=GUICtrlCreateLabel("Name",30,30,100,20) Global $address1Label=GUIctrlCreateLabel("Address 1",30,60,100,20) Global $address2Label=GUICtrlCreatelabel("Address 2",30,90,100,20) Global $cityLabel=GUICtrlCreateLabel("Town/City",30,120,100,20) Global $countryLabel=GUICtrlCreateLabel("Country",30,150,100,20) Global $phoneLabel=GUICtrlCreateLabel("Phone Number",30,180,100,20) Global $emailLabel=GUICtrlCreateLabel("Email Address",30,210,100,20) Global $genderLabel=GUICtrlCreateLabel("Gender",30,240,100,20) Global $interestsLabel=GUICtrlCreateLabel("Interests",30,270,100,20) Global $closeOnesLabel=GUICtrlCreateLabel("Close Ones",30,300,100,20) Global $behaviourLabel=GUICtrlCreateLabel("Behaviour",30,330,100,20) Global $occupationLabel=GUICtrlCreateLabel("Occupation",30,360,100,20) Global $activityLabel=GUICtrlCreateLabel("Activities",30,390,100,20) Global $pictureLabel=GUICtrlCreateLabel("Picture",30,420,100,20) Global $nameInput=GUICtrlCreateInput("",130,30,300,20) ;GUICtrlSetOnEvent($nameInput,"searchupdate") Global $searchUpdate=GUICtrlCreateButton("Load Data",440,30,70,20) GUICtrlSetOnEvent($searchUpdate,"searchupdate") Global $address1Input=GUICtrlCreateInput("",130,60,300,20) Global $address2Input=GUICtrlCreateInput("",130,90,300,20) Global $cityInput=GUICtrlCreateInput("",130,120,300,20) Global $countryInput=GUICtrlCreateInput("",130,150,300,20) Global $phoneInput=GUICtrlCreateInput("",130,180,300,20) Global $emailInput=GUICtrlCreateInput("",130,210,300,20) Global $genderInput=GUICtrlCreateCombo("",130,240,300,20,$CBS_DROPDOWNLIST) GUICtrlSetData($genderInput,"Male|Female|Others","Male") Global $interestsInput=GUICtrlCreateInput("",130,270,300,20) Global $closeOnesInput=GUICtrlCreateInput("",130,300,300,20) Global $behaviourInput=GUICtrlCreateInput("",130,330,300,20) Global $occupationInput=GUICtrlCreateInput("",130,360,300,20) Global $activityInput=GUICtrlCreateInput("",130,390,300,20) Global $pictureInput=GUICtrlCreateInput("",130,420,300,20) Global $browsePictureButton=GUICtrlCreateButton("Browse",440,420,50,20) GUICtrlSetOnEvent($browsePictureButton,"browsepic") Global $extraInfoLabel=GUIctrlCreateLabel("Extra Information",630,30,100,20) Global $extraInfoInput=GUICtrlCreateInput("",730,30,500,400,$ES_MULTILINE+$ES_WANTRETURN) Global $updateEdit=GUICtrlCreateButton("Update Data",530,640,100,25) GUICtrlSetOnEvent($updateEdit,"updateedit") Global $cancelEdit=GUICtrlCreateButton("Cancel",630,640,100,25) GUICtrlSetOnEvent($cancelEdit,"canceledit") Global $deleteEdit=GUICtrlCreateButton("Delete",730,640,100,25) GUICtrlSetOnEvent($deleteEdit,"deleteedit") EndFunc Func deleteedit() $name=GUICtrlRead($nameInput) If $name="" Then MsgBox(48,"Alert","Enter name of the person before trying to delete!!") Return EndIf $flag=0 Global $list=load() For $i=1 To $list[0] Step +1 $temp=StringSplit($list[$i],"~") If $temp[1]=$name Then $flag=1 If $i<$list[0] Then $list[$i]=$list[$i+1] Else $list[$i]=" " EndIf $list[0]=$list[0]-1 EndIf If $flag=1 And $i<$list[0] Then $list[$i]=$list[$i+1] EndIf Next If $flag=1 Then update($list) Else MsgBox(48,"Alert","Person not found!!") EndIf EndFunc Func updateedit() $flag=0 $name=GUICtrlRead($nameInput) If $name="" Then MsgBox(48,"Alert","Enter name of the person before trying to update!!") Return EndIf Global $list=load() For $i=1 To $list[0] Step +1 $temp=StringSplit($list[$i],"~") If $temp[1]=$name Then $flag=1 If GUICtrlRead($pictureInput)<>"" Then $path=getname() FileCopy(GUICtrlRead($pictureInput),$path) $list[$i]=GUICtrlRead($nameInput) & "~" & GUICtrlRead($address1Input) & "~" & GUICtrlRead($address2Input) & "~" & GUICtrlRead($cityInput) & "~" & GUICtrlRead($countryInput) & "~" & GUICtrlRead($phoneInput) & "~" & GUICtrlRead($emailInput) & "~" & GUICtrlRead($genderInput) & "~" & GUICtrlRead($interestsInput) & "~" & GUICtrlRead($closeOnesInput) & "~" & GUICtrlRead($behaviourInput) & "~" & GUICtrlRead($occupationInput) & "~" & GUICtrlRead($activityInput) & "~" & GUICtrlRead($extraInfoInput) & "~" & $path Else $list[$i]=GUICtrlRead($nameInput) & "~" & GUICtrlRead($address1Input) & "~" & GUICtrlRead($address2Input) & "~" & GUICtrlRead($cityInput) & "~" & GUICtrlRead($countryInput) & "~" & GUICtrlRead($phoneInput) & "~" & GUICtrlRead($emailInput) & "~" & GUICtrlRead($genderInput) & "~" & GUICtrlRead($interestsInput) & "~" & GUICtrlRead($closeOnesInput) & "~" & GUICtrlRead($behaviourInput) & "~" & GUICtrlRead($occupationInput) & "~" & GUICtrlRead($activityInput) & "~" & GUICtrlRead($extraInfoInput) & "~" & $temp[15] EndIf MsgBox(0,"","Updating") update($list) EndIf Next If $flag=0 Then MsgBox(48,"Alert","Entry not found!!") EndIf EndFunc Func update($d) $data=$d[1] & "`" For $i=2 To $d[0] Step +1 $data=$data & $d[$i] & "`" Next For $i=0 To 20 step +1 $data=StringReplace($data,"``","`") Next $file=FileOpen(@ScriptDir & "\data.bs",2+8) FileWrite($file,$data) FileClose($file) EndFunc Func canceledit() GUICtrlDelete($picCtrl) GUICtrlDelete($nameLabel) GUICtrlDelete($address1Label) GUICtrlDelete($address2Label) GUICtrlDelete($cityLabel) GUICtrlDelete($countryLabel) GUICtrlDelete($phoneLabel) GUICtrlDelete($genderLabel) GUICtrlDelete($interestsLabel) GUICtrlDelete($closeOnesLabel) GUICtrlDelete($behaviourLabel) GUICtrlDelete($occupationLabel) GUICtrlDelete($activityLabel) GUICtrlDelete($pictureLabel) GUICtrlDelete($emailLabel) GUICtrlDelete($extraInfoLabel) GUICtrlDelete($nameInput) GUICtrlDelete($searchUpdate) GUICtrlDelete($address1Input) GUICtrlDelete($address2Input) GUICtrlDelete($cityInput) GUICtrlDelete($countryInput) GUICtrlDelete($phoneInput) GUICtrlDelete($genderInput) GUICtrlDelete($interestsInput) GUICtrlDelete($closeOnesInput) GUICtrlDelete($behaviourInput) GUICtrlDelete($occupationInput) GUICtrlDelete($activityInput) GUICtrlDelete($pictureInput) GUICtrlDelete($emailInput) GUICtrlDelete($extraInfoInput) GUICtrlDelete($browsePictureButton) GUIctrlDelete($updateEdit) GUICtrlDelete($cancelEdit) GUICtrlDelete($deleteEdit) $titleLabel=GUICtrlCreateLabel("People Base",@DesktopWidth/2-170,@DesktopHeight/2-140,500,100) GUICtrlSetFont($titleLabel,30,1000,8,"Comic Sans MS",5) EndFunc Func searchupdate() Global $list=load() $flag=0 $name=GUICtrlRead($nameInput) For $i=0 To $list[0] Step +1 $temp=StringSplit($list[$i],"~") If $temp[1]=$name Then $flag=1 GUICtrlSetData($nameInput,$temp[1]) GUICtrlSetData($address1Input,$temp[2]) GUICtrlSetData($address2Input,$temp[3]) GUICtrlSetData($cityInput,$temp[4]) GUICtrlSetData($countryInput,$temp[5]) GUICtrlSetData($phoneInput,$temp[6]) GUICtrlSetData($emailInput,$temp[7]) GUICtrlSetData($genderInput,$temp[8]) GUICtrlSetData($interestsInput,$temp[9]) GUICtrlSetData($closeOnesInput,$temp[10]) GUICtrlSetData($behaviourInput,$temp[11]) GUICtrlSetData($occupationInput,$temp[12]) GUICtrlSetData($activityInput,$temp[13]) GUICtrlSetData($extraInfoInput,$temp[14]) GUICtrlDelete($picCtrl) Global $picCtrl=GUICtrlCreatePic($temp[15],130,450,200,200) EndIf Next If $flag=0 Then MsgBox(48,"Alert","Entry not found!!") EndIf EndFunc Func newentry() clearscr() $face=1 Global $nameLabel=GUICtrlCreateLabel("Name",30,30,100,20) Global $address1Label=GUIctrlCreateLabel("Address 1",30,60,100,20) Global $address2Label=GUICtrlCreatelabel("Address 2",30,90,100,20) Global $cityLabel=GUICtrlCreateLabel("Town/City",30,120,100,20) Global $countryLabel=GUICtrlCreateLabel("Country",30,150,100,20) Global $phoneLabel=GUICtrlCreateLabel("Phone Number",30,180,100,20) Global $emailLabel=GUICtrlCreateLabel("Email Address",30,210,100,20) Global $genderLabel=GUICtrlCreateLabel("Gender",30,240,100,20) Global $interestsLabel=GUICtrlCreateLabel("Interests",30,270,100,20) Global $closeOnesLabel=GUICtrlCreateLabel("Close Ones",30,300,100,20) Global $behaviourLabel=GUICtrlCreateLabel("Behaviour",30,330,100,20) Global $occupationLabel=GUICtrlCreateLabel("Occupation",30,360,100,20) Global $activityLabel=GUICtrlCreateLabel("Activities",30,390,100,20) Global $pictureLabel=GUICtrlCreateLabel("Picture",30,420,100,20) Global $nameInput=GUICtrlCreateInput("",130,30,300,20) Global $address1Input=GUICtrlCreateInput("",130,60,300,20) Global $address2Input=GUICtrlCreateInput("",130,90,300,20) Global $cityInput=GUICtrlCreateInput("",130,120,300,20) Global $countryInput=GUICtrlCreateInput("",130,150,300,20) Global $phoneInput=GUICtrlCreateInput("",130,180,300,20) Global $emailInput=GUICtrlCreateInput("",130,210,300,20) Global $genderInput=GUICtrlCreateCombo("",130,240,300,20,$CBS_DROPDOWNLIST) GUICtrlSetData($genderInput,"Male|Female|Others","Male") Global $interestsInput=GUICtrlCreateInput("",130,270,300,20) Global $closeOnesInput=GUICtrlCreateInput("",130,300,300,20) Global $behaviourInput=GUICtrlCreateInput("",130,330,300,20) Global $occupationInput=GUICtrlCreateInput("",130,360,300,20) Global $activityInput=GUICtrlCreateInput("",130,390,300,20) Global $pictureInput=GUICtrlCreateInput("",130,420,300,20) Global $browsePictureButton=GUICtrlCreateButton("Browse",440,420,50,20) GUICtrlSetOnEvent($browsePictureButton,"browsepic") Global $extraInfoLabel=GUIctrlCreateLabel("Extra Information",630,30,100,20) Global $extraInfoInput=GUICtrlCreateInput("",730,30,500,400,$ES_MULTILINE+$ES_WANTRETURN) Global $confirmAdd=GUICtrlCreateButton("Add Data",530,640,100,25) GUICtrlSetOnEvent($confirmAdd,"addnew") Global $cancelAdd=GUICtrlCreateButton("Cancel",630,640,100,25) GUICtrlSetOnEvent($cancelAdd,"canceladd") EndFunc Func browsepic() $file=FileOpenDialog("Open Picture File",@MyDocumentsDir,"Image Files (*.jpg)") GUICtrlSetData($pictureInput,$file) GUICtrlDelete($picCtrl) Global $picCtrl=GUICtrlCreatePic($file,130,450,200,200) EndFunc Func addnew() $path=getname() $name=GUICtrlRead($nameInput) If $name="" Then MsgBox(48,"Alert","Enter name of the person before trying to create!!") Return EndIf FileCopy(GUICtrlRead($pictureInput),$path) $file=FileOpen(@ScriptDir & "\data.bs",0+8) $data=FileRead($file) FileClose($file) $data=$data & GUICtrlRead($nameInput) & "~" & GUICtrlRead($address1Input) & "~" & GUICtrlRead($address2Input) & "~" & GUICtrlRead($cityInput) & "~" & GUICtrlRead($countryInput) & "~" & GUICtrlRead($phoneInput) & "~" & GUICtrlRead($emailInput) & "~" & GUICtrlRead($genderInput) & "~" & GUICtrlRead($interestsInput) & "~" & GUICtrlRead($closeOnesInput) & "~" & GUICtrlRead($behaviourInput) & "~" & GUICtrlRead($occupationInput) & "~" & GUICtrlRead($activityInput) & "~" & GUICtrlRead($extraInfoInput) & "~" & $path & "`" $file=Fileopen(@ScriptDir & "\data.bs",2+8) FileWrite($file,$data) FileClose($file) GUICtrlSetData($nameInput,"") GUICtrlSetData($address1Input,"") GUICtrlSetData($address2Input,"") GUICtrlSetData($cityInput,"") GUICtrlSetData($countryInput,"") GUICtrlSetData($phoneInput,"") GUICtrlSetData($interestsInput,"") GUICtrlSetData($closeOnesInput,"") GUICtrlSetData($behaviourInput,"") GUICtrlSetData($occupationInput,"") GUICtrlSetData($activityInput,"") GUICtrlSetData($pictureInput,"") GUICtrlSetData($emailInput,"") GUICtrlSetData($extraInfoInput,"") GUICtrlDelete($picCtrl) EndFunc Func load() $file=FileOpen(@ScriptDir & "\data.bs",0+8) $data=FileRead($file) FileClose($file) Return StringSplit($data,"`") EndFunc Func getname() $i=1 While FileExists(@ScriptDir & "\images\" & $i & ".jpg") $i=$i+1 WEnd Return @ScriptDir & "\images\" & $i & ".jpg" EndFunc Func canceladd() GUICtrlDelete($picCtrl) GUICtrlDelete($nameLabel) GUICtrlDelete($address1Label) GUICtrlDelete($address2Label) GUICtrlDelete($cityLabel) GUICtrlDelete($countryLabel) GUICtrlDelete($phoneLabel) GUICtrlDelete($genderLabel) GUICtrlDelete($interestsLabel) GUICtrlDelete($closeOnesLabel) GUICtrlDelete($behaviourLabel) GUICtrlDelete($occupationLabel) GUICtrlDelete($activityLabel) GUICtrlDelete($pictureLabel) GUICtrlDelete($emailLabel) GUICtrlDelete($extraInfoLabel) GUICtrlDelete($nameInput) GUICtrlDelete($address1Input) GUICtrlDelete($address2Input) GUICtrlDelete($cityInput) GUICtrlDelete($countryInput) GUICtrlDelete($phoneInput) GUICtrlDelete($genderInput) GUICtrlDelete($interestsInput) GUICtrlDelete($closeOnesInput) GUICtrlDelete($behaviourInput) GUICtrlDelete($occupationInput) GUICtrlDelete($activityInput) GUICtrlDelete($pictureInput) GUICtrlDelete($emailInput) GUICtrlDelete($extraInfoInput) GUICtrlDelete($browsePictureButton) GUIctrlDelete($confirmAdd) GUICtrlDelete($cancelAdd) $titleLabel=GUICtrlCreateLabel("People Base",@DesktopWidth/2-170,@DesktopHeight/2-140,500,100) GUICtrlSetFont($titleLabel,30,1000,8,"Comic Sans MS",5) EndFunc Func clearscr() If $face=1 Then canceladd() ElseIf $face=2 Then canceledit() ElseIf $face=3 Then cancelsearch() EndIf GUICtrlDelete($titleLabel) EndFunc

Download Link : People Base 1.0.rar
Folow me on My YouTube Channel if you're into art.

Reply

RE: People Base 1.0 #2
Oh I like this too bad it doesn't use SQLite it woulda been easier Biggrin
Pierce the life fibers with your drill.

Reply

RE: People Base 1.0 #3
So People Base is like an electronic rolodex, huh? Can you add additional fields to it for custom data?

Reply