nath118 Posted September 29, 2006 Share Posted September 29, 2006 Hi all, 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, $msgIf Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000GuiCreate("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 ;;; EndSelectWEndExit#endregion --- GuiBuilder generated code End ---#include <INet.au3>$one = (_INetGetSource($read)MsgBox ( 0, "firstest", $one)$len = StringLen($one)$somme = 0For $i = 1 to $len $var = StringMid($one, $i, 1) $asc = asc($var) $somme = $somme + $ascNextMsgBox(0, "C'est bon", $somme) Link to comment Share on other sites More sharing options...
GaryFrost Posted September 29, 2006 Share Posted September 29, 2006 (edited) Would help if you used a ListView instead of a List or Use GuiList.au3 and it's functions with the List Edited September 29, 2006 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. Link to comment Share on other sites More sharing options...
nath118 Posted September 29, 2006 Author Share Posted September 29, 2006 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 Link to comment Share on other sites More sharing options...
GaryFrost Posted September 29, 2006 Share Posted September 29, 2006 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 muchIf your going to use GuiListView.au3 then use GUICtrlCreateListViewIf 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. Link to comment Share on other sites More sharing options...
nath118 Posted October 1, 2006 Author Share Posted October 1, 2006 oh i see thank you very much i'll try GuiList.au3 see you Link to comment Share on other sites More sharing options...
nath118 Posted October 9, 2006 Author Share Posted October 9, 2006 hi, i really need help, almost 1week i work on this program (my first! ) 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 expandcollapse popup#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 --- Link to comment Share on other sites More sharing options...
GaryFrost Posted October 9, 2006 Share Posted October 9, 2006 (edited) hi, i really need help, almost 1week i work on this program (my first! ) 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 expandcollapse popup#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 October 9, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now