Sign in to follow this  
Followers 0
nath118

_GUICtrlListViewGetItemText Probleme - Help! ^^

7 posts in this topic

:D Hi all,

:P I'm new at AutoIT v3 and I need some help.

:) Well, i'm trying to read all the list at the same time, but i don't know why that doesn't want to do it.

I think I made some errors in my scripte... so let's see what i did:

#region --- GuiBuilder code Start ---

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

#include <INet.au3>

#Include <GuiListView.au3>

Local $add, $asc, $close,$i, $Input, $len, $List, $refresh, $somme, $var, $read, $two, $msg

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Verifieur de site", 529, 239,(@DesktopWidth-529)/2, (@DesktopHeight-239)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$add = GuiCtrlCreateButton("Ajouter", 20, 150, 110, 30)

$List = GuiCtrlCreateList("", 20, 20, 250, 110)

$refresh = GuiCtrlCreateButton("Vérifier", 150, 150, 100, 30)

$close = GuiCtrlCreateButton("Bye bye!", 420, 200, 100, 30)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

Exit

Case $msg = $close

Exit

Case $msg = $add

$Input = InputBox("Ajout d'un site", "Ajoutez un site")

GUICtrlSetData ( $List, $Input)

Case $msg = $refresh

$read = _GUICtrlListViewGetItemText ($List,0)

$one = (_INetGetSource($read))

$len = StringLen($one)

$somme = 0

For $i = 1 to $len

$var = StringMid($one, $i, 1)

$asc = asc($var)

$somme = $somme + $asc

Next

MsgBox(0, "C'est bon", $somme)

Case Else

;;;

EndSelect

WEnd

Exit

#endregion --- GuiBuilder generated code End ---

#include <INet.au3>

$one = (_INetGetSource($read)

MsgBox ( 0, "firstest", $one)

$len = StringLen($one)

$somme = 0

For $i = 1 to $len

$var = StringMid($one, $i, 1)

$asc = asc($var)

$somme = $somme + $asc

Next

MsgBox(0, "C'est bon", $somme)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Would help if you used a ListView instead of a List

or

Use GuiList.au3 and it's functions with the List

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

yes, i used GuiBuilder for make the all. And i think guibuilder used GuiList for make the list...

i did what you said i changed my $list to $listview.

but the result still 0 and i can't find the error... :)

thank you very much

Share this post


Link to post
Share on other sites

yes, i used GuiBuilder for make the all. And i think guibuilder used GuiList for make the list...

i did what you said i changed my $list to $listview.

but the result still 0 and i can't find the error... :)

thank you very much

If your going to use GuiListView.au3 then use GUICtrlCreateListView

If your going to use GuiList.au3 then use GUICtrlCreateList


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

oh i see

thank you very much i'll try GuiList.au3

see you

Share this post


Link to post
Share on other sites

hi, i really need help, almost 1week i work on this program (my first! :ph34r:)

and i don't know why the result is 0, i think the error is I make some mistakes by using GUICtrlListViewGetItemText and i'm trying to fix it. So if someone know why it doesn't work... just help me thank you :lmao:

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>
#include <INet.au3>
#Include <GuiListView.au3>

Local $add, $asc, $close,$i, $Input, $len, $listview, $refresh, $somme, $var, $read, $two, $msg

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Verifieur de site", 529, 239,(@DesktopWidth-529)/2, (@DesktopHeight-239)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)



$add = GuiCtrlCreateButton("Ajouter", 20, 150, 110, 30)
$list = GuiCtrlCreateList("", 20, 20, 250, 110)
$refresh = GuiCtrlCreateButton("Vérifier", 150, 150, 100, 30)
$close = GuiCtrlCreateButton("Bye bye!", 420, 200, 100, 30)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $close
        Exit
    Case $msg = $add
        $Input = InputBox("Ajout d'un site", "Ajoutez un site")
        GUICtrlSetData ($list, $Input)
    Case $msg = $refresh
        $read = _GUICtrlListViewGetItemText ($list,0)
        $one = (_INetGetSource($read))
        $len = StringLen($one)
        $somme = 0
        For $i = 1 to $len
            $var = StringMid($one, $i, 1)
            $asc = asc($var)
            $somme = $somme + $asc
        Next
        MsgBox(0, "C'est bon", $somme)

    Case Else
    ;;;
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

hi, i really need help, almost 1week i work on this program (my first! :ph34r:)

and i don't know why the result is 0, i think the error is I make some mistakes by using GUICtrlListViewGetItemText and i'm trying to fix it. So if someone know why it doesn't work... just help me thank you :lmao:

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>
#include <INet.au3>
#Include <GuiListView.au3>

Local $add, $asc, $close,$i, $Input, $len, $listview, $refresh, $somme, $var, $read, $two, $msg

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Verifieur de site", 529, 239,(@DesktopWidth-529)/2, (@DesktopHeight-239)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$add = GuiCtrlCreateButton("Ajouter", 20, 150, 110, 30)
$list = GuiCtrlCreateList("", 20, 20, 250, 110)
$refresh = GuiCtrlCreateButton("Vérifier", 150, 150, 100, 30)
$close = GuiCtrlCreateButton("Bye bye!", 420, 200, 100, 30)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $close
        Exit
    Case $msg = $add
        $Input = InputBox("Ajout d'un site", "Ajoutez un site")
        GUICtrlSetData ($list, $Input)
    Case $msg = $refresh
        $read = _GUICtrlListViewGetItemText ($list,0)
        $one = (_INetGetSource($read))
        $len = StringLen($one)
        $somme = 0
        For $i = 1 to $len
            $var = StringMid($one, $i, 1)
            $asc = asc($var)
            $somme = $somme + $asc
        Next
        MsgBox(0, "C'est bon", $somme)

    Case Else
;;;
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---
Use GuiList.au3 when using GuiCtrlCreateList

or

Use GuiListview.au3 when using GuiCtrlCreateListview

Look in the help for appropriate function calls

Edit: Same thing I told you last time.

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0