mustafakara Posted May 7, 2010 Author Share Posted May 7, 2010 malesef çalışmıyor hata raporu gönder diyor farklı scrip lerdede denedim ama sonuç aynı benden kaynaklandığını düşünüyorum autoit çok yeni deyilbende senin verdiyin combo örneğinden faydalanmaya çalıştım malesef herzamanki gibi beceremedim teşekkürler auto iti yükseltirim pazartesi inş. malüm tatil başladı ozaman tekrar denerim Link to comment Share on other sites More sharing options...
blue_life Posted May 7, 2010 Share Posted May 7, 2010 @mustafakara Tmm neyse o ilgili komut ile ilgili sorun yaşıyorsan _ArraySort kullanırsın! Örnek aşağıda. #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <Array.au3> _Main() Func _Main() Local $hListView, $var, $var2, $button,$button2, $nMsg, $GetCount, $GetName, $sItems, $say GUICreate("ListView Get Item Checked State", 800, 600) $hListView = GUICtrlCreateListView("", 20, 2, 750, 500) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) $button = GUICtrlCreateButton("seçili öğeleri sil", 100, 550, 200, 30) $button2 = GUICtrlCreateButton("Hepsini seç!", 400, 550, 200, 30) _GUICtrlListView_AddColumn($hListView, "Adı Soyadı", 150) GUISetState() _BL_LW_Update($hListView,@ScriptDir & "\rehber.ini") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $button _BL_LW_DEL($hListView,@ScriptDir & "\rehber.ini") Case $button2 _BL_LW_SLECT_ALL($hListView) EndSwitch WEnd GUIDelete() EndFunc;==>_Main Func _BL_LW_SLECT_ALL($hwnd_ListView) Local $GetCount = _GUICtrlListView_GetItemCount($hwnd_ListView),$1 For $1 = 0 To $GetCount _GUICtrlListView_SetItemChecked($hwnd_ListView, $1) Next EndFunc Func _BL_LW_DEL($hwnd_ListView,$INI_FILE) Local $GetName = _BL_LW_SELECTED($hwnd_ListView) If not UBound($GetName) OR $GetName[0] = "" Then MsgBox(0, "hata", "listeden bir öğe seçin.") Return EndIf If not FileExists($INI_FILE) Then Return If MsgBox(36,"siliniyor...","rehberde bulunan" & @crlf & $GetName[0] & @crlf & "silinecektir silmek istediğinizden eminmisiniz?") = 6 Then; Evet ise If StringInStr(FileGetAttrib($INI_FILE),"R") Then FileSetAttrib($INI_FILE,"-R") Local $1 For $1 = 1 to UBound($GetName) -1 IniDelete($INI_FILE,$GetName[$1]) Next _BL_LW_Update($hwnd_ListView,$INI_FILE) EndIf EndFunc Func _BL_LW_SELECTED($hwnd_ListView) Local $GetCount = _GUICtrlListView_GetItemCount($hwnd_ListView),$GetName[1],$1,$2 = 0 For $1 = 0 To $GetCount If _GUICtrlListView_GetItemChecked($hwnd_ListView, $1) Then $2 += 1 Redim $GetName[$2 + 1] $GetName[$2] = _GUICtrlListView_GetItemText($hwnd_ListView, $1) $GetName[0] &= $GetName[$2] & @CRLF EndIf Next Return $GetName EndFunc Func _BL_LW_Update($hwnd_ListView,$INI_FILE ,$INDEX = 0) _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hwnd_ListView)) If not FileExists($INI_FILE) Then Return SetError(1) Local $1,$BL_READ_ISEC = _BL_INIREAD_SNAME($INI_FILE) If @error Then Return SetError(1) For $1 = 0 To UBound($BL_READ_ISEC) -1 _GUICtrlListView_InsertItem($hwnd_ListView, $BL_READ_ISEC[$1], $INDEX) Next EndFunc Func _BL_INIREAD_SNAME($INI_FILE) If not FileExists($INI_FILE) Then Return SetError(1) Local $1,$INI_RSN[1] Local $BL_READ_ISEC = IniReadSectionNames($INI_FILE) If @error Then Return SetError(1) If $BL_READ_ISEC[0] > 1 Then ReDim $INI_RSN[$BL_READ_ISEC[0]] For $1 = 1 To $BL_READ_ISEC[0] $INI_RSN[$1-1] = $BL_READ_ISEC[$1] Next _ArraySort($INI_RSN,1) ;~ _ArrayDisplay($INI_RSN) Return $INI_RSN EndFunc[/CODE] Link to comment Share on other sites More sharing options...
mustafakara Posted May 10, 2010 Author Share Posted May 10, 2010 blue_life arkadaşım benim kullandığım autoit "autoit-v3.2.2.0" dı şimdi söylediğin gibi güncelledim ve senin örneğin sorunsuz çalıştı birkez daha çok teşekkür ederim aslına bakarsanız benim en çok merak ettiğim noktalardan birisi yaptığımız .exe dosyalarının çalışma görevlerinin sona erdirildiğinde yardımcı dosyalarını içine alabilmeleridir yani "rehber.exe" dosyası durdurulduğu anda "rehber.ini" dosyasını içine alıcak yada rehbere bilgi eklerken kaydet dediğimizde kendi içerisinde bulunan dosyayı güncelleyebilecek. böyle birşey mümkünmüdür? çünki hiç duymadım. bunu şu yüzden olabilmesini çok istiyorum rehberimizin şifreli olarak açılmasını istediğimizde başkaları belki "rehber.exe" dosyamızı çalıştıramayacaklar ancak "rehber.ini" dosyamızı inceleyerek bilgilerimizi yinede okuyabilecekler yada herhangibirşekilde bu "rehber.ini" dosyasını saklamanın yöntemi varmı? teşekkürler Link to comment Share on other sites More sharing options...
blue_life Posted May 10, 2010 Share Posted May 10, 2010 @mustafakara Yaptığımız autoit.exe si sonlandığında başka bir dosyayı içine alabilir. Bu mümkün. Hiç duymamanın nedeni ise büyük ihtimal bunu riskli olmasıdır. Misal ilgili program her kapandığında ilgili exe dosyan değişecek ve antivirüs yazılımları uyarı verecektir (Dikkat! ) Diğer yandan diyelim sen programı kullanıyorsun ama bende beğendi ve senden aldım. Seni içinde gömülü dosyanada bana gelecektir. vs vs. vs.... Tavsiye etmiyorum. Diğer yandan, sen kolaylık olsun diye ini dosyasından faydalandın. İlgili ini dosyasına bir şey kaydederken şifreleyerek kaydedebilrisin. Misal Erhan = dsa_?)? Tabi salladım. yani ini dosyasında dsa_?)? yazar ama senin program bunun Erhan olduğu anlar! Yardım dosyasından _StringEncrypt fonksiyonu sana fikirler verecektir... Kolay gelsin....... Link to comment Share on other sites More sharing options...
mustafakara Posted May 10, 2010 Author Share Posted May 10, 2010 blue_life arkadaşım söylemek istediğini anladım ancak şöyle birşey yapsam yinede olmazmı "rehber.exe" çalışınca "rehber.ini" dosyamı gizli dosya olarak yanına yada herhangibir yere çıkartsa ben kaydet yada sil butonlarından birine tıklarsam oan mevcut olan dosyayla "rehber.exe" içerisindeki dosyayı değiştirse kapat butonuna bastığımda da gizli dosyayı silse böyle mümkün olmazmı? bilgilerin başkalarına gitmesinde sorun yok çünki genel rehber olarak hazırlıyorum resmi kurumlar dernekler vs... özel bilgilerinide kişi başkasına vermeden silsin Link to comment Share on other sites More sharing options...
mustafakara Posted May 10, 2010 Author Share Posted May 10, 2010 Crypt_EncryptFile[/CODE] bu kod benim işimi görmezmi Link to comment Share on other sites More sharing options...
blue_life Posted May 11, 2010 Share Posted May 11, 2010 @mustafakara Sen biraz kurcala, senin işine yarayacak bilgiye ulaşabileceğni ümit ediyorum. Takıldığın yerlerde sorarsın... Kolay gelsin... Link to comment Share on other sites More sharing options...
mustafakara Posted May 11, 2010 Author Share Posted May 11, 2010 blue_life arkadaşım sabahtan beri birkaç kod denedim ancak malesef dün bulduğum kodlarla kaldım onuda aşağıdaki örnekte kullandım örnekteki "rehber.lst" dosyasını "rehber.tmp"" dosyasına çevirmeden şifreli halde nasıl okutabilirim, içerisinden nasıl bilgi silebilirim yada nasıl bilgi girişi sağlayabilirim? peki bu şekilde kullanırsam ne gibi dezavantajları olur? bilgi verirsen sevinirim. inşallah seni sıkmıyorumdur çok teşekkürler #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <Crypt.au3> Global $hKey=_Crypt_DeriveKey("1",$CALG_RC4) _Main() Func _Main() Local $hListView, $var, $var2, $button, $nMsg, $GetCount, $GetName, $sItems, $say _Crypt_EncryptFile(@ScriptDir & "\rehber.lst",@ScriptDir & "\rehber.tmp",$hKey,$CALG_USERKEY) GUICreate("ListView Get Item Checked State", 800, 600) $hListView = GUICtrlCreateListView("", 20, 2, 750, 500) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) $button = GUICtrlCreateButton("seçili öğeleri sil", 300, 550, 200, 30) _GUICtrlListView_AddColumn($hListView, "adı soyadı", 150) GUISetState() _BL_LW_Update($hListView,@ScriptDir & "\rehber.tmp") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 FileDelete(@ScriptDir & "\rehber.tmp") Exit Case $button _BL_LW_DEL($hListView,@ScriptDir & "\rehber.tmp") _Crypt_DecryptFile(@ScriptDir & "\rehber.tmp",@ScriptDir & "\rehber.lst",$hKey,$CALG_USERKEY) EndSwitch WEnd GUIDelete() EndFunc Func _BL_LW_SELECTED($hwnd_ListView) Local $GetCount = _GUICtrlListView_GetItemCount($hwnd_ListView),$GetName[1],$1,$2 = 0 For $1 = 0 To $GetCount If _GUICtrlListView_GetItemChecked($hwnd_ListView, $1) Then $2 += 1 Redim $GetName[$2 + 1] $GetName[$2] = _GUICtrlListView_GetItemText($hwnd_ListView, $1) $GetName[0] &= $GetName[$2] & @CRLF EndIf Next Return $GetName EndFunc Func _BL_LW_DEL($hwnd_ListView,$INI_FILE) Local $GetName = _BL_LW_SELECTED($hwnd_ListView) If not UBound($GetName) OR $GetName[0] = "" Then MsgBox(0, "hata", "listeden bir öğe seçin.") Return EndIf If not FileExists($INI_FILE) Then Return If MsgBox(36,"siliniyor...","rehberde bulunan" & @crlf & $GetName[0] & @crlf & "silinecektir silmek istediğinizden eminmisiniz?") = 6 Then; Evet ise If StringInStr(FileGetAttrib($INI_FILE),"R") Then FileSetAttrib($INI_FILE,"-R") Local $1 For $1 = 1 to UBound($GetName) -1 IniDelete($INI_FILE,$GetName[$1]) Next _BL_LW_Update($hwnd_ListView,$INI_FILE) EndIf EndFunc Func _BL_LW_Update($hwnd_ListView,$INI_FILE ) _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hwnd_ListView)) If not FileExists($INI_FILE) Then Return SetError(1) Local $1,$BL_READ_ISEC = IniReadSectionNames($INI_FILE) If @error Then Return SetError(1) For $1 = 1 To $BL_READ_ISEC[0] _GUICtrlListView_InsertItem($hwnd_ListView, $BL_READ_ISEC[$1], 0) Next _GUICtrlListView_SortItems($hwnd_ListView,0) EndFunc[/CODE] Link to comment Share on other sites More sharing options...
blue_life Posted May 11, 2010 Share Posted May 11, 2010 @mustafakara Ben senin yerinde olsam, başta bir ini dosyası kullandığım için ini dosyasından devam ederdim. Yani ini dosyasına ilgili isimleri şifreleyerek yazardım.... Al sana basit bir örnek! Örneğin başında önce şifreleme yaparak bir kaç section yazdırdım. Yani sende şifreleyerek bu şekilde yazdırmalısın. Sonra program ini dosyasını okurken şifreyi çözer. Bu kadar basit... Kolay gelsin... #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <Array.au3> #include <String.au3> Global $Sifrem = "Selam" Global $Rehber = @ScriptDir & "\rehber.ini" ;======================================================== IniWrite($Rehber,_BL_StringEncrypt("Eczane",$Sifrem,1),"Tel",_BL_StringEncrypt("0212 000 0000",$Sifrem,1)) IniWrite($Rehber,_BL_StringEncrypt("Hastahane",$Sifrem,1),"Tel",_BL_StringEncrypt("0212 000 0000",$Sifrem,1)) IniWrite($Rehber,_BL_StringEncrypt("Banka",$Sifrem,1),"Tel",_BL_StringEncrypt("0212 000 0000",$Sifrem,1)) IniWrite($Rehber,_BL_StringEncrypt("BlueLife :)",$Sifrem,1),"Tel",_BL_StringEncrypt("0212 000 0000",$Sifrem,1)) ;======================================================== _Main() Func _Main() Local $hListView, $var, $var2, $button,$button2, $nMsg, $GetCount, $GetName, $sItems, $say GUICreate("ListView Get Item Checked State", 800, 600) $hListView = GUICtrlCreateListView("", 20, 2, 750, 500) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) $button = GUICtrlCreateButton("seçili öğeleri sil", 100, 550, 200, 30) $button2 = GUICtrlCreateButton("Hepsini seç!", 400, 550, 200, 30) _GUICtrlListView_AddColumn($hListView, "Adı Soyadı", 150) GUISetState() _BL_LW_Update($hListView,$Rehber) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $button _BL_LW_DEL($hListView,$Rehber) Case $button2 _BL_LW_SLECT_ALL($hListView) EndSwitch WEnd GUIDelete() EndFunc;==>_Main Func _BL_LW_SLECT_ALL($hwnd_ListView) Local $GetCount = _GUICtrlListView_GetItemCount($hwnd_ListView),$1 For $1 = 0 To $GetCount _GUICtrlListView_SetItemChecked($hwnd_ListView, $1) Next EndFunc Func _BL_LW_DEL($hwnd_ListView,$INI_FILE) Local $GetName = _BL_LW_SELECTED($hwnd_ListView) If not UBound($GetName) OR $GetName[0] = "" Then MsgBox(0, "hata", "listeden bir öğe seçin.") Return EndIf If not FileExists($INI_FILE) Then Return If MsgBox(36,"siliniyor...","rehberde bulunan" & @crlf & $GetName[0] & @crlf & "silinecektir silmek istediğinizden eminmisiniz?") = 6 Then; Evet ise If StringInStr(FileGetAttrib($INI_FILE),"R") Then FileSetAttrib($INI_FILE,"-R") Local $1 For $1 = 1 to UBound($GetName) -1 IniDelete($INI_FILE,_BL_StringEncrypt($GetName[$1],$Sifrem,1)) Next _BL_LW_Update($hwnd_ListView,$INI_FILE) EndIf EndFunc Func _BL_LW_SELECTED($hwnd_ListView) Local $GetCount = _GUICtrlListView_GetItemCount($hwnd_ListView),$GetName[1],$1,$2 = 0 For $1 = 0 To $GetCount If _GUICtrlListView_GetItemChecked($hwnd_ListView, $1) Then $2 += 1 Redim $GetName[$2 + 1] $GetName[$2] = _GUICtrlListView_GetItemText($hwnd_ListView, $1) $GetName[0] &= $GetName[$2] & @CRLF EndIf Next Return $GetName EndFunc Func _BL_LW_Update($hwnd_ListView,$INI_FILE ,$INDEX = 0) _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hwnd_ListView)) If not FileExists($INI_FILE) Then Return SetError(1) Local $1,$BL_READ_ISEC = _BL_INIREAD_SNAME($INI_FILE) If @error Then Return SetError(1) For $1 = 0 To UBound($BL_READ_ISEC) -1 _GUICtrlListView_InsertItem($hwnd_ListView, $BL_READ_ISEC[$1], $INDEX) Next EndFunc Func _BL_INIREAD_SNAME($INI_FILE) If not FileExists($INI_FILE) Then Return SetError(1) Local $1,$INI_RSN[1] Local $BL_READ_ISEC = IniReadSectionNames($INI_FILE) If @error Then Return SetError(1) If $BL_READ_ISEC[0] > 1 Then ReDim $INI_RSN[$BL_READ_ISEC[0]] For $1 = 1 To $BL_READ_ISEC[0] $INI_RSN[$1-1] = _BL_StringEncrypt($BL_READ_ISEC[$1],$Sifrem) Next _ArraySort($INI_RSN,1) ;~ _ArrayDisplay($INI_RSN) Return $INI_RSN EndFunc Func _BL_StringEncrypt($BL_Text,$Bl_Pass,$BL_Style = 0,$BL_Level = 1) If $BL_Style <> 0 Then $BL_Style = 1 If $BL_Text = "" Or $Bl_Pass = "" Then Return SetError(1,0,"") If Not StringIsDigit($BL_Level) Then $BL_Level = 1 Local $BL_Encrypt = _StringEncrypt($BL_Style, $BL_Text, $Bl_Pass, $BL_Level) If @error Then $BL_Encrypt = $BL_Text SetError(2) EndIf Return $BL_Encrypt EndFunc[/CODE] Link to comment Share on other sites More sharing options...
mustafakara Posted May 11, 2010 Author Share Posted May 11, 2010 @blue_life haklısın bu şekilde gayetiyi biraz çalışalım bakalım seni yoruyoruz be kusurumuza bakma desteğin için çok çok sağol teşekkürler ellerine sağlık umarım verdiğin emekleri boşa çıkartmam inşallah. Link to comment Share on other sites More sharing options...
blue_life Posted May 11, 2010 Share Posted May 11, 2010 @mustafakara Bak aslında belirlediğin şifreyi programa da verip, daha güvenli hale getirebilirsin. Misal; #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <Array.au3> #include <String.au3> Global $Sifrem = InputBox("Şifre", "Şifrenizi giriniz...", "", "*") If @error = 1 Then Exit If StringToBinary($Sifrem) <> StringToBinary("Selam") Then MsgBox(16,"","Şifre hatalı") Exit EndIf Global $Rehber = @ScriptDir & "\rehber.ini" ;======================================================== IniWrite($Rehber,_BL_StringEncrypt("Eczane",$Sifrem,1),"Tel",_BL_StringEncrypt("0212 000 0000",$Sifrem,1)) IniWrite($Rehber,_BL_StringEncrypt("Hastahane",$Sifrem,1),"Tel",_BL_StringEncrypt("0212 000 0000",$Sifrem,1)) IniWrite($Rehber,_BL_StringEncrypt("Banka",$Sifrem,1),"Tel",_BL_StringEncrypt("0212 000 0000",$Sifrem,1)) IniWrite($Rehber,_BL_StringEncrypt("BlueLife :)",$Sifrem,1),"Tel",_BL_StringEncrypt("0212 000 0000",$Sifrem,1)) ;======================================================== _Main() Func _Main() Local $hListView, $var, $var2, $button,$button2, $nMsg, $GetCount, $GetName, $sItems, $say GUICreate("ListView Get Item Checked State", 800, 600) $hListView = GUICtrlCreateListView("", 20, 2, 750, 500) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) $button = GUICtrlCreateButton("seçili öğeleri sil", 100, 550, 200, 30) $button2 = GUICtrlCreateButton("Hepsini seç!", 400, 550, 200, 30) _GUICtrlListView_AddColumn($hListView, "Adı Soyadı", 150) GUISetState() _BL_LW_Update($hListView,$Rehber) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $button _BL_LW_DEL($hListView,$Rehber) Case $button2 _BL_LW_SLECT_ALL($hListView) EndSwitch WEnd GUIDelete() EndFunc;==>_Main Func _BL_LW_SLECT_ALL($hwnd_ListView) Local $GetCount = _GUICtrlListView_GetItemCount($hwnd_ListView),$1 For $1 = 0 To $GetCount _GUICtrlListView_SetItemChecked($hwnd_ListView, $1) Next EndFunc Func _BL_LW_DEL($hwnd_ListView,$INI_FILE) Local $GetName = _BL_LW_SELECTED($hwnd_ListView) If not UBound($GetName) OR $GetName[0] = "" Then MsgBox(0, "hata", "listeden bir öğe seçin.") Return EndIf If not FileExists($INI_FILE) Then Return If MsgBox(36,"siliniyor...","rehberde bulunan" & @crlf & $GetName[0] & @crlf & "silinecektir silmek istediğinizden eminmisiniz?") = 6 Then; Evet ise If StringInStr(FileGetAttrib($INI_FILE),"R") Then FileSetAttrib($INI_FILE,"-R") Local $1 For $1 = 1 to UBound($GetName) -1 IniDelete($INI_FILE,_BL_StringEncrypt($GetName[$1],$Sifrem,1)) Next _BL_LW_Update($hwnd_ListView,$INI_FILE) EndIf EndFunc Func _BL_LW_SELECTED($hwnd_ListView) Local $GetCount = _GUICtrlListView_GetItemCount($hwnd_ListView),$GetName[1],$1,$2 = 0 For $1 = 0 To $GetCount If _GUICtrlListView_GetItemChecked($hwnd_ListView, $1) Then $2 += 1 Redim $GetName[$2 + 1] $GetName[$2] = _GUICtrlListView_GetItemText($hwnd_ListView, $1) $GetName[0] &= $GetName[$2] & @CRLF EndIf Next Return $GetName EndFunc Func _BL_LW_Update($hwnd_ListView,$INI_FILE ,$INDEX = 0) _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hwnd_ListView)) If not FileExists($INI_FILE) Then Return SetError(1) Local $1,$BL_READ_ISEC = _BL_INIREAD_SNAME($INI_FILE) If @error Then Return SetError(1) For $1 = 0 To UBound($BL_READ_ISEC) -1 _GUICtrlListView_InsertItem($hwnd_ListView, $BL_READ_ISEC[$1], $INDEX) Next EndFunc Func _BL_INIREAD_SNAME($INI_FILE) If not FileExists($INI_FILE) Then Return SetError(1) Local $1,$INI_RSN[1] Local $BL_READ_ISEC = IniReadSectionNames($INI_FILE) If @error Then Return SetError(1) If $BL_READ_ISEC[0] > 1 Then ReDim $INI_RSN[$BL_READ_ISEC[0]] For $1 = 1 To $BL_READ_ISEC[0] $INI_RSN[$1-1] = _BL_StringEncrypt($BL_READ_ISEC[$1],$Sifrem) Next _ArraySort($INI_RSN,1) ;~ _ArrayDisplay($INI_RSN) Return $INI_RSN EndFunc Func _BL_StringEncrypt($BL_Text,$Bl_Pass,$BL_Style = 0,$BL_Level = 1) If $BL_Style <> 0 Then $BL_Style = 1 If $BL_Text = "" Or $Bl_Pass = "" Then Return SetError(1,0,"") If Not StringIsDigit($BL_Level) Then $BL_Level = 1 Local $BL_Encrypt = _StringEncrypt($BL_Style, $BL_Text, $Bl_Pass, $BL_Level) If @error Then $BL_Encrypt = $BL_Text SetError(2) EndIf Return $BL_Encrypt EndFunc[/CODE] Link to comment Share on other sites More sharing options...
mustafakara Posted May 18, 2010 Author Share Posted May 18, 2010 arkadaşlar tekrar merhabalar elimde 2 tane ".ini" dosyam var bu ".ini" dosyalarından birini diyerine kopyalatacağım kopyalama işlemi sırasında isim ve il ismi birlikte aynı ise beni uyaracak örnekler: [code} "1.ini" [mustafa] tel=444 444 44 44 il=ankara [mehmet] tel=212 55 55 il=ankara [mustafa] tel=212 12 12 il=izmir "2.ini" [ismail] tel=222 256 55 55 il=ankara [mustafa] tel= 444 444 44 44 il=ankara [mustafa] tel=255 55 55 il=adana [/code] yani buradaki isim ve il adı aynı ise sadece onları deyiştirip deyiştirmemek istediğimi soracak yukarıdaki ini dosyalarından birini diyerine kopyalattığımızda yani "1.ini" dosyasını "2.ini" ye kopyalattığımızda msgbox şu şekilde olacak "mustafa ankara zaten var yinede kopyalamak istermisiniz" evetdersek "2.ini" dekini silip "1.ini" dekini yazacak teşekkürler Link to comment Share on other sites More sharing options...
blue_life Posted May 18, 2010 Share Posted May 18, 2010 Kurcala! _BL_INI_COMPARE("2.ini","1.ini") Func _BL_INI_COMPARE($INI_1,$INI_2) Local $1,$2,$Read_SName Local $Value1,$Value2 Local $SEC_NAME = IniReadSectionNames($INI_1) If Not @error Then For $1 = 1 To $SEC_NAME[0] $Read_SName = IniReadSection($INI_1, $SEC_NAME[$1]) If Not @error Then For $2 = 1 To $Read_SName[0][0] $Value1 = IniRead($INI_2,$SEC_NAME[$1],$Read_SName[$2][0],"") If $Value1 <> "" Then If MsgBox(36,$SEC_NAME[$1],$Read_SName[$2][0] & " zaten var yinede kopyalamak istermisiniz") = 6 Then If IniWrite($INI_2,$SEC_NAME[$1],$Read_SName[$2][0],$Read_SName[$2][1]) = 1 Then IniDelete($INI_1,$SEC_NAME[$1],$Read_SName[$2][0]) EndIf Else If IniWrite($INI_2,$SEC_NAME[$1],$Read_SName[$2][0],$Read_SName[$2][1]) = 1 Then IniDelete($INI_1,$SEC_NAME[$1],$Read_SName[$2][0]) EndIf Next EndIf Next EndIf EndFunc[/CODE] Link to comment Share on other sites More sharing options...
mustafakara Posted November 1, 2010 Author Share Posted November 1, 2010 arkadaşlar aşağıdaki örnekte tab tuşuna bastığımda benim yaptığım sıralamaya göre gitmiyor bu sayfaya geldiğimde tab tuşuna bastığımda sırayla şu şekilde gitmesini istiyorum ilk tab tuşunda : $tab3list üzerine gelmeli 2. tab tuşuna bastığımda combo üzerine gelmeli 3. tab tuşuna bastığımda $tab3ListView üzerine gelmeli 4. defa tab tuşuna bastığımda düzenle butonu üzerine gelmeliyim burada ise düzenle butonu listview den önce geliyor sıralamayı istediğimgibi nasıl yapabilirim $tab3 = GUICtrlCreateTabItem("KAYIT DÜZENLE") $tab3LAB = GUICtrlCreateLabel("BUL :", 25, 40,250,20) GUICtrlSetFont($tab3LAB, 16) $tab3LAB1 = GUICtrlCreateLabel("İL :", 505, 40,250,20) GUICtrlSetFont($tab3LAB1, 16) $tab3list = GUICtrlCreateList("", 500, 60, 250, 40) $tab3Combo = GUICtrlCreateCombo("", 20, 60, 460, 24) $tab3ListView = GUICtrlCreateListView("", 20, 84, 750, 440) _GUICtrlListView_AddColumn($tab3ListView, "adı soyadı", 150) _GUICtrlListView_AddColumn($tab3ListView, "türü:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi", 100) _GUICtrlListView_AddColumn($tab3ListView, "türü 1:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi 1:", 100) _GUICtrlListView_AddColumn($tab3ListView, "türü 2:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi 2:", 100) $tab3button= GUICtrlCreateButton("DÜZENLE!", 50, 550, 200, 30) Link to comment Share on other sites More sharing options...
blue_life Posted November 1, 2010 Share Posted November 1, 2010 @mustafakara Kodlamadaki yerlerini değiştirebilirsin... #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 800, 600, 192, 124) $tab = GUICtrlCreateTab(10, 10, 790, 590) $tab3 = GUICtrlCreateTabItem("KAYIT DÜZENLE") $tab3Combo = GUICtrlCreateCombo("", 20, 60, 460, 24) $tab3LAB = GUICtrlCreateLabel("BUL :", 25, 40, 250, 20) GUICtrlSetFont($tab3LAB, 16) $tab3LAB1 = GUICtrlCreateLabel("İL :", 505, 40, 250, 20) GUICtrlSetFont($tab3LAB1, 16) $tab3list = GUICtrlCreateList("", 500, 60, 250, 40) $tab3ListView = GUICtrlCreateListView("", 20, 84, 750, 440) _GUICtrlListView_AddColumn($tab3ListView, "adı soyadı", 150) _GUICtrlListView_AddColumn($tab3ListView, "türü:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi", 100) _GUICtrlListView_AddColumn($tab3ListView, "türü 1:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi 1:", 100) _GUICtrlListView_AddColumn($tab3ListView, "türü 2:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi 2:", 100) $tab3button = GUICtrlCreateButton("DÜZENLE!", 50, 550, 200, 30) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
mustafakara Posted November 2, 2010 Author Share Posted November 2, 2010 blue_life bende öyle düşünüp birkaç şekilde denedim ama olmuyor senin yaptığın da aynı şekilde oluyor tab tuşuna bastığımızda button listview den önce geliyor benim yapmaya çalıştığım sıralamada combo listview button olmalı ancak bu mümkün olmuyor bizler mause kullanmadan bilgisayar kullanıyoruz yada çok az görebildiğimiz kadar mause kullanıyoruz genel anlamda tab tuşu ile hareket ediyoruz o yüzden sıralama önemli hani bazı arkadaşlara basit ve gereksiz gelebilir teşekkürler Link to comment Share on other sites More sharing options...
blue_life Posted November 2, 2010 Share Posted November 2, 2010 @mustafakara GUICtrlSetState($ID,256) komutuyla istediğin açılır açılmaz istediğin elamanı focus yapabilirsin! Yani sen ilk sırada combonun focus olmasını istiyorsan, kısaca; #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 800, 600, 192, 124) $tab = GUICtrlCreateTab(10, 10, 790, 590) $tab3 = GUICtrlCreateTabItem("KAYIT DÜZENLE") $tab3Combo = GUICtrlCreateCombo("", 20, 60, 460, 24) $tab3LAB = GUICtrlCreateLabel("BUL :", 25, 40, 250, 20) GUICtrlSetFont($tab3LAB, 16) $tab3LAB1 = GUICtrlCreateLabel("İL :", 505, 40, 250, 20) GUICtrlSetFont($tab3LAB1, 16) $tab3list = GUICtrlCreateList("", 500, 60, 250, 40) $tab3ListView = GUICtrlCreateListView("", 20, 84, 750, 440) _GUICtrlListView_AddColumn($tab3ListView, "adı soyadı", 150) _GUICtrlListView_AddColumn($tab3ListView, "türü:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi", 100) _GUICtrlListView_AddColumn($tab3ListView, "türü 1:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi 1:", 100) _GUICtrlListView_AddColumn($tab3ListView, "türü 2:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi 2:", 100) $tab3button = GUICtrlCreateButton("DÜZENLE!", 50, 550, 200, 30) GUICtrlSetState($tab3Combo,256) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
mustafakara Posted November 2, 2010 Author Share Posted November 2, 2010 sevgili blue_life hayır anlatmak istediğim o deyil scriptimizi çalıştırdık form karşımıza geldi klavyeden tab tuşuna 1. basışımızda listbox, 2. tab tuşuna basışımızda combobox, 3. tab tuşuna basışımızda listview ve 4. basışımızda butona erişebilmeliyiz Link to comment Share on other sites More sharing options...
blue_life Posted November 2, 2010 Share Posted November 2, 2010 @mustafakara Evet GUICtrlCreateListView ile alakalı bir sorun varmış Neyse o zaman tab tuşu için hotkey belirleyerek (GUISetAccelerators) tab tuşunu yönetebilirsin. Örneği incele... #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 800, 600, 192, 124) $tab = GUICtrlCreateTab(10, 10, 790, 590) $tab3 = GUICtrlCreateTabItem("KAYIT DÜZENLE") $tab3LAB = GUICtrlCreateLabel("BUL :", 25, 40, 250, 20) GUICtrlSetFont($tab3LAB, 16) $tab3LAB1 = GUICtrlCreateLabel("İL :", 505, 40, 250, 20) GUICtrlSetFont($tab3LAB1, 16) $tab3list = GUICtrlCreateList("GUICtrlCreateList", 500, 60, 250, 40) GUICtrlSetData(-1, "GUICtrlCreateList|") $tab3Combo = GUICtrlCreateCombo("", 20, 60, 460, 24) $tab3ListView = GUICtrlCreateListView("", 20, 84, 750, 440) _GUICtrlListView_AddColumn($tab3ListView, "adı soyadı", 150) _GUICtrlListView_AddColumn($tab3ListView, "türü:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi", 100) _GUICtrlListView_AddColumn($tab3ListView, "türü 1:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi 1:", 100) _GUICtrlListView_AddColumn($tab3ListView, "türü 2:", 100) _GUICtrlListView_AddColumn($tab3ListView, "bilgi 2:", 100) GUICtrlCreateListViewItem("item3|col32|col33", $tab3ListView) $tab3button = GUICtrlCreateButton("DÜZENLE!", 50, 550, 200, 30) ; ------------------------ Global $TAB = 0 $BL_LABEL = GUICtrlCreateLabel("", -5,-5, 1, 1) Global $AccelKeys[1][2]=[["{TAB}", $BL_LABEL]] GUISetAccelerators($AccelKeys) ; ------------------------ GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $tab3list MsgBox(64,"","") Case $BL_LABEL Switch $TAB Case 0 GUICtrlSetState($tab3list,256) Case 1 GUICtrlSetState($tab3Combo,256) Case 2 GUICtrlSetState($tab3ListView,256) Case 3 GUICtrlSetState($tab3button,256) EndSwitch $TAB += 1 ;Bir ekler If $TAB > 3 Then $TAB = 0 EndSwitch WEnd Link to comment Share on other sites More sharing options...
mustafakara Posted November 2, 2010 Author Share Posted November 2, 2010 sevgili blue_life sizdede aynı sorun oluyor anladığım kadarıyla bu olay sadece listview de yaşanan bir sorun şu an autoit 3.6 sürümünü kullanıyorum daha öncede geri sürümler kullanırken arraysort ile alakalı bir sorun yaşıyordum bunda düzeltilmiş o acaba daha ileri bir sürüm varmı belki onda düzeltilmiştir. bu arada genel anlamda yardımlarını esirgemediğin için teşekkür ediyorum her tarafa yetişiyorsun maşallah. Link to comment Share on other sites More sharing options...
blue_life Posted November 2, 2010 Share Posted November 2, 2010 @mustafakara Şuanki mevcut güncel sürüm v3.3.6.1 ve ben bunu kullanıyorum. Benden de aynen yazdığın sorun mevcut. Kısacası senle alakalı bir sorun yok! Kolay gelsin... Link to comment Share on other sites More sharing options...
mustafakara Posted November 3, 2010 Author Share Posted November 3, 2010 anlıyorum sizi zaten konuşan program kullanıyorum o buttonu nasıl bulacağım yazdığım metni bile yeniden düzenlemek istersem dünya kadar uğraşıyorum kimi zaman ekranın içerisine gireceğim sizde haklısınız tabiki ama siteyi görmeyenlere yönelik biraz kolaylaştırırsanız sevinirim Link to comment Share on other sites More sharing options...
KintaRo Posted November 3, 2010 Share Posted November 3, 2010 Tam anlayamadım, gözlerinizde problem olduğu için mi bu şekilde yapıyorsunuz? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.