Jump to content

Autoitcombo Ve Listbox Harf Sıralaması


mustafakara

Recommended Posts

arkadaşlar aşağıdaki örnekte kan gurubu listesinden bir seçim

yaptığımda isim listesine o kan grubuna ait olan .ini dosyamdaki isimlerin gelmesini nasıl sağlarız

teşekkürler:

code:

_Main()

Func _Main()

Local $kan,$isim

GUICreate("kan grubuna göre sıralama", 400, 296)

$kan=GUICtrlCreateList("", 10,150, 100, 20)

GUICtrlSetData(-1 ,"a rh *|b rh -")

$isim=GUICtrlCreateList("", 200,150, 100, 60)

GUISetState()

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case -3

Exit

Case $kan

EndSwitch

WEnd

GUIDelete()

EndFunc;==>_Main

.ini dosyam

code

[kemal]

tur1=TELEFON NUMARASI

tel1=441 41 41

tur2=TELEFON NUMARASI

tel2=

tur3=

tel3=

kan gurubu=b rh -

[murat]

tur1=TELEFON NUMARASI

tel1=444 44 44

tur2=TELEFON NUMARASI

tel2=555 55 55

tur3=MÜDÜR TEL

tel3=666 66 66

kan gurubu=a rh *

[nalan]

tur1=TELEFON NUMARASI

tel1=123 45 45

tur2=MÜDÜR TEL

tel2=456 12 12

tur3=

tel3=654 65 65

kan gurubu=b rh -

[ahmet]

tur1=TELEFON NUMARASI

tel1=571 72 55

tur2=MÜDÜR TEL

tel2=571 72 53

tur3=

tel3=

kan gurubu=a rh *

Link to comment
Share on other sites

  • Replies 72
  • Created
  • Last Reply

sevgili arkadaşlar olayı çözdüm demiştim lakin aşağıdaki edit box a

numarik deyerlerin haricinde birde boşluk karekterlerinin girebilmek istiyorum

bunun için

code:

$es_number

kodunu nasıl kullanmam gerekiyor teşekkürler

code:

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

#include <EditConstants.au3>

Opt('MustDeclareVars', 1)

Example()

;RichEditExample()

Func Example()

Local $myedit, $msg,$yaz

GUICreate("numara ve boşluk",300,200)

$myedit = GUICtrlCreateEdit("", 116, 50, 121, 30, $es_number)

GUISetState()

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

WEnd

GUIDelete()

EndFunc ;==>Example

Link to comment
Share on other sites

@mustafakara

Öncelikle şu kod alanını biraz dikkat et.

Misal kod alanına alacağın yazıyı aşağıdaki gibi yazmalısın.

[code]Yazın buraya gelecek[/code]

Örnek[/CODE]

2yuac9f.png

Soruna gelirsek; Tam olarka boşluk karakterini nasıl kullanmak istiyorsun?

Tam olarak yapmak istedin nedir.

Misal yazılan telefon numarasına daha sonrada müdehale ederek boşluklar ekleyebilirsin...

Link to comment
Share on other sites

editbox a yazacağım rakamlar

aşağıdaki gibi olacaktır

1. örnek:

"0 542 542  42 42"[/CODE]

yada

2. örnek:

[CODE]"542 42 42"[/CODE]

yani edit box ta yanlızca sayılar ve boşluk karekterleri girilebilecek.

bunların haricinde karekter girilemeyecek

teşekkürler

Link to comment
Share on other sites

@mustafakara

Anlatmak istediğimi anlamadın ama neyse aşağıdaki örneği incele!

Yazdığım fonksiyon döngünün içinde olmak zorunda!

Kolay gelsin...

$Form1 = GUICreate("Form1", 182, 52, 192, 124)
$Input1 = GUICtrlCreateInput("", 16, 16, 153, 21)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case -3
            Exit

EndSwitch
_BL_NUMBER($Input1)
WEnd

Func _BL_NUMBER($BL_EDIT)
    If Not IsDeclared("BL_NUMBER") Then Global $BL_NUMBER
    Local $BL_VALUE = GUICtrlRead($BL_EDIT),$value1
    If Not StringIsDigit($BL_VALUE) Then
        $value1 = StringSplit($BL_VALUE,"")
        For $1 = 1 To $value1[0]
            If Not StringIsDigit($value1[$1]) And $value1[$1] <> chr(32) Then
                GUICtrlSetData($BL_EDIT,$BL_NUMBER)
                Return $BL_NUMBER
            EndIf
        Next
    EndIf
    $BL_NUMBER = $BL_VALUE
    Return $BL_NUMBER
EndFunc[/CODE]

Link to comment
Share on other sites

blue_life arkadaşım söylediğini anladım aslında o şekilde yazmıştım nedense çıkmamış

sizler bunu bir buton aracılığıyla yapıyorsunuz galiba

benim konuşan programım butonların çoğunu

okumuyor okusada yabancı olarak okuyor bazı butonların yerini ezberledim

o şekilde sizlere cevap yazıyorum

az görmem nedeniyle bazı sorunlar yaşıyorum

galiba bazen düzensiz yazıyorum

tamamen durumumdan kaynaklanıyor ona ramen sizler anlamaya çalışıp bana yardımcı olmaya çalışıyorsunuz hatta oluyorsunuzda başta sen olmak üzere herkezden allah razı olsun

elleriniz dert görmesin

bu arada yukarıdaki kodlar işimi gördü ayrıca onun içinde teşekkür ederim

Link to comment
Share on other sites

@mustafakara

Kusuruma bakma! Görme engelinin olduğunu bilmiyordum. Code alanını diyorsan son kullandığında düzgün çıktı. :good:

Neyse takıldığın yerlerde bilgili arkadaşlar ile beraber yardımcı olmaya çalışırız...

Kolay gelsin....

Link to comment
Share on other sites

arkadaşlar aşağıdaki listview örneğinde butona bastığımızda msgbox ta

liste kutusunda işaretli olanları nasıl görebiliriz

örnek

#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

Opt('MustDeclareVars', 1)

$Debug_LV = False

_Main()

Func _Main()
    Local $hListView,$var,$button
    
    GUICreate("ListView seçili olanlar", 400, 350)
    $hListView = GUICtrlCreateListView("", 2, 2, 394, 268)
    _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES))
    $button = GUICtrlCreateButton("seçili olanları göster",100,300,150,20)
    GUISetState()
    
    
    _GUICtrlListView_AddColumn($hListView, "adı soyadı", 394)

$var = IniReadSectionNames(@ScriptDir & "\rehber.ini")
For $i = 1 To $var[0]
_GUICtrlListView_AddItem($hListView, $var[$i], 0)
    Next    
    _GUICtrlListView_SetItemChecked($hListView, 1)

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc  ;==>_Main[/CODE]

Link to comment
Share on other sites

@mustafakara

Yardım dosyasındaki _GUICtrlListView_GetItemChecked seçeneğine bak!

MsgBox(4160, "Information", "Item 2 Checked: " & _GUICtrlListView_GetItemChecked($hListView, 1))[/CODE]

Link to comment
Share on other sites

blue_life arkadaşım örneği oradan almıştım o şekilde msgboxta sadece listeögesinin seçili olup olmadığı görünüyor ben bu örneği listview deki seçili isimleri ini dosyasından silmek amaçlı kullanacağım yani butona bastığımda bu listede seçtiyim isimler .ini dosyasından silinecekler.

daha sonra liste otomatik olarak yenilenecek

Link to comment
Share on other sites

@mustafakara

Senin örneğinden yola çıkarsak;

#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

Opt('MustDeclareVars', 1)

$Debug_LV = False

_Main()

Func _Main()
    Local $hListView,$var,$button
    Local $nMsg,$GetCount,$GetName

    GUICreate("ListView seçili olanlar", 400, 350)
    $hListView = GUICtrlCreateListView("", 2, 2, 394, 268)
    _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES))
    $button = GUICtrlCreateButton("seçili olanları göster",100,300,150,20)
    GUISetState()


    _GUICtrlListView_AddColumn($hListView, "adı soyadı", 394)

    $var = IniReadSectionNames(@ScriptDir & "\rehber.ini")
    For $i = 1 To $var[0]
        _GUICtrlListView_AddItem($hListView, $var[$i], 0)
    Next
    _GUICtrlListView_SetItemChecked($hListView, 1)

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case -3
                ExitLoop
            Case $button
                $GetCount = _GUICtrlListView_GetItemCount($hListView)
                For $I = 0 To $GetCount
                    If _GUICtrlListView_GetItemChecked($hListView, $I) Then
                        $GetName = _GUICtrlListView_GetItemText($hListView, $I)
                        MsgBox(4160,  $I & " - Seçili olanlar", $GetName)
                        IniDelete(@ScriptDir & "\rehber.ini",$GetName)
                    EndIf
                Next
        EndSwitch
    WEnd
    GUIDelete()
EndFunc ;==>_Main[/CODE]

Link to comment
Share on other sites

blue_life arkadaşım sana çok teşekkür ediyorum gerçekten sorduğum sorulara

örnekleriyle cevap verdin ellerine sağlık allah senden razı olsun herşey gönlüne göre olsun

daha ne diyeyim bilmiyorum örnek müthiş olmuş

Link to comment
Share on other sites

merhaba arkadaşlar aşağıdaki örnekte listeden öğe seçipte sil butonuna tıkladığımda işaretlediklerimi bana msgbox ta listeliyor buraya kadar olan normal lakin evet yada hayır cevabı verip te listeden seçili öğelerde deyişiklik yaptığımda başta seçipte sonradan iptal ettiğim öğeleride bana seçiliymiş gibi gösteriyor yani 2. msgbox a 1. msgbox un bilgilerinide ekliyor aynı öğeyi 2 adet gösteriyor

msgbox un güncellenmesi için ne yapmam gerekir

teşekkürler

#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

Opt('MustDeclareVars', 1)

$Debug_LV = False

Global  $hListView
Global  $var
Global  $var2
Global  $button
Global  $nMsg
Global  $GetCount
Global  $GetName
Global  $sItems
Global  $say


_Main()

Func _Main()
    Local $hListView,$var,$var2,$button,$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",300,550,200,30)
    
    GUISetState()
    
_GUICtrlListView_AddColumn($hListView, "adı soyadı", 150)

$var = IniReadSectionNames(@ScriptDir & "\rehber.ini")
For $i = 1 To $var[0]
_GUICtrlListView_InsertItem($hListView,$var[$i], 0)
Next
    
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit

Case $button
mode($hListView)
EndSwitch
WEnd
GUIDelete()
EndFunc;==>_Main

Func mode($hListView)
$GetCount = _GUICtrlListView_GetItemCount($hListView)
For $I = 0 To $GetCount
If _GUICtrlListView_GetItemChecked($hListView, $I) Then
$GetName = _GUICtrlListView_GetItemText($hListView, $I)
;IniDelete(@ScriptDir & "\rehber.ini",$GetName)
$say = $I
$sItems &= @LF & $GetName
    EndIf
    Next
If $sItems = "" Then
MsgBox(0, "hata" , "listeden bir öğe seçin.")
Else
MsgBox(4,"siliniyor...","rehberde bulunan" & $sItems & @LF & "silinecektir silmek istediğinizden eminmisiniz?")
EndIf
EndFunc[/CODE]

Link to comment
Share on other sites

@mustafakara

Umarım anlatmak istediğini anlamıştırım. Senin örneğin üzerinden gidersek;

#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

_Main()

Func _Main()
    Local $hListView, $var, $var2, $button, $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", 300, 550, 200, 30)
_GUICtrlListView_AddColumn($hListView, "Adı Soyadı", 150)
    GUISetState()
    _BL_LW_Update($hListView,@ScriptDir & "\rehber.ini")
    _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")
        EndSwitch
    WEnd
    GUIDelete()
EndFunc  ;==>_Main

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 = 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], $INDEX)
    Next
EndFunc[/CODE]

Link to comment
Share on other sites

evet arkadaşım gayet iyi olmuş eline salık sen düz yazı yazar gibi

scrip yazıyorsun galiba inşallah birgün bizde senin gibi oluruz.

tekrar teşekkürler

pardon peki tümünü seçmek için nasıl bir işlem yapmak lazım

butona bastığımızda tümünü seçsin.

Link to comment
Share on other sites

@mustafakara

Yokya bende acemiyim. Hobi olarak ilgileniyorum işte!

#include <GuiConstantsEx.au3>
#include <GuiListView.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 = 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], $INDEX)
    Next
EndFunc[/CODE]

Link to comment
Share on other sites

_GUICtrlListView_SortItems Kullanabilirsin...

#include <GuiConstantsEx.au3>
#include <GuiListView.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 = 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], $INDEX)
    Next
    _GUICtrlListView_SortItems($hwnd_ListView,$INDEX)
EndFunc[/CODE]

Link to comment
Share on other sites

_GUICtrlListView_SortItems($hwnd_ListView,0)[/CODE]

bu kodu çeşitli şekillerde denememe rağmen malesef hata raporu oluşuyor

sizin yaptığınız şekildede hata raporu oluşuyor sanıyorum farklı şekilde kullanılıyor

teşekkürler

Link to comment
Share on other sites

@mustafakara

Yukarıda verdiğim örnek çalışmıyor mu?

Şimdi tekrar baktım bende herangi bir sorun yok!

Eğer sorun yaşıyorsan autoit versiyonunu güncellemeni öneririm.

Ben AutoIt v3.3.6.1 kullanıyorum...

http://www.autoitscript.com/autoit3/downloads.shtml[/CODE]

Link to comment
Share on other sites

arkadaşlar merhabalar aşağıdaki örnekteki listview

üzerinde harf sıralaması yapmak istemiştim ancak a dan z ye yerine z den a ya yapıyor

harf sıralamasına göre yapmak için ne yapmak gerekir.

teşekkürler

#Include <Array.au3>
#include <GUIListBox.au3>
#include <GuiListView.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)


_Main()

Func _Main()
Local $hListView, $var, $var2, $button, $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", 300, 550, 200, 30)

_GUICtrlListView_AddColumn($hListView, "adı soyadı", 150)
GUISetState()
_Update_listview($hListView,_Read_Section_Names(@ScriptDir & "\rehber.ini"))    


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit


EndSwitch
WEnd
GUIDelete()
EndFunc


Func _Read_Section_Names($INI_FILE)
Local $RETUR_VALUE[1],$1,$2 = 0,$3 = 0,$4 = 0
Local $READ_VALUE1,$READ_VALUE2,$READ_VALUE3,$1,$2 = 0
$READ_VALUE1 = IniReadSectionNames($INI_FILE)
If Not @error Then
For $1 = 1 To $READ_VALUE1[0]
If $2 > 0 Then ReDim $RETUR_VALUE[$2 + 1]
$RETUR_VALUE[$2] = $READ_VALUE1[$1]
$2 += 1
Next
EndIf
If $RETUR_VALUE[$2-1] = "" Then ReDim $RETUR_VALUE[$2 -1]
_ArraySort($RETUR_VALUE)
Return $RETUR_VALUE
EndFunc

Func _Update_listview(ByRef $list_ID,$GET_ARRAY)
Local $1,$Value
If not UBound($GET_ARRAY) Then Return SetError(1)
For $1 = 0 To UBound($GET_ARRAY) -1
$Value = $GET_ARRAY[$1]
_GUICtrlListView_InsertItem($list_ID, $Value, False)
Next
EndFunc[/CODE]

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...