incepator Posted August 22, 2013 Share Posted August 22, 2013 Hello guys, I have a question, if you can help me ... I made this script, for testing: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> GUICreate("", 500, 550) $nr = GUICtrlCreateInput("80000", 10, 30, 320, 20) $button = GUICtrlCreateButton("Genereaza", 40, 50, 320, 20) $List = GUICtrlCreateListView("val1", 10, 90, 400, 450) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $button For $i = 1 To GUICtrlRead($nr) GUICtrlCreateListViewItem($i, $List) _GUICtrlListView_Scroll($List, 0, $i*50) Next EndSwitch WEnd the problem is ListViewItems limited to 65530 line, can solve this somehow? Link to comment Share on other sites More sharing options...
JohnOne Posted August 22, 2013 Share Posted August 22, 2013 Create another listview control. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
incepator Posted August 22, 2013 Author Share Posted August 22, 2013 there is no solution to this problem using a single ListView? Link to comment Share on other sites More sharing options...
Kidney Posted August 23, 2013 Share Posted August 23, 2013 i tested out your script but made some adjustments. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> GUICreate("", 500, 550) $nr = GUICtrlCreateInput("80000", 10, 30, 320, 20) $button = GUICtrlCreateButton("Genereaza", 40, 50, 320, 20) $List = GUICtrlCreateListView("val1", 10, 90, 400, 450) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $button $i = 1 Do GUICtrlCreateListViewItem($i, $List) $i = $i + 1 Until _GUICtrlListView_GetItemCount($List) = GUICtrlRead($nr) _GUICtrlListView_Scroll($List, 0, $i*50) EndSwitch WEnd since the _GUICtrlListView_Scroll is outside the loop, you can see when it exits the loop. with this script, it never leaves the loop. just confirms that there is something limiting the list. i think it has to do with memory tho. if its not, dont bite my head off. Link to comment Share on other sites More sharing options...
kylomas Posted August 23, 2013 Share Posted August 23, 2013 Per the Help File AutoIt3 Limits/defaults AutoIt3 limits Value Description MAX_LINESIZE 4095 Maximum size for a line of script. MAX_ENVSIZE 32767 Maximum size for an ENV variable. WINTEXTBUFFER 32767 GetWindowText fails under 95 if>65535, WM_GETTEXT randomly fails if > 32767. MAXCALLRECURSE 5100 Maximum number of times the Call() function can recurse to itself. MAXEXECUTERECURSE 5100 Maximum number of times the Execute() function can recurse to itself. GUI_MAXCONTROLS 65532 Maximum number of controls in GUI box. GUI_MAXPOINTS 256 Maximum number of points by graphic info page. COM_MAXEVENT 64 Maximum number of COM events that can be buffered. VAR_SUBSCRIPT_MAX 64 Maximum number of subscripts for an array. MAIN_TIMER_DELAY 750 ms Tray icon hiding/flashing/drawing is checked every 750ms. CMDLINEPARAM_MAXLEN 4096 Each parameter can be this many characters. TRAY_MAXITEMS 505 Maximum number of items in the tray menu. TRAY_MAXEVENT 32 Maximum number of events that can be buffered. TRAY_TOOLTIPWIDTH 64 Maximum number of characters displayed in a tray tooltip. Default Value Description ADLIB delay 250 ms Default delay in ms between ADLIB triggers. Can be defined in AdlibRegister(). Following defaults can be changed with Opt() MouseClickDelay 10 ms Time between mouse clicks. MouseClickDownDelay 10 ms Time the click is held down. MouseClickDragDelay 250 ms The delay at the start and end of a drag operation. TCPTimeout 100 ms Time after a TCP function is aborted. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
BrewManNH Posted August 23, 2013 Share Posted August 23, 2013 Use _GUICtrlListview_AddItem instead of the native function (GUICtrlCreateListViewItem), AutoIt control IDs are limited to 65532 Windows handles are not. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Kidney Posted August 23, 2013 Share Posted August 23, 2013 Use _GUICtrlListview_AddItem instead of the native function (GUICtrlCreateListViewItem), AutoIt control IDs are limited to 65532 Windows handles are not. hey would you look at that. worked just fine haha. Link to comment Share on other sites More sharing options...
incepator Posted August 23, 2013 Author Share Posted August 23, 2013 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> GUICreate("", 500, 550) $nr = GUICtrlCreateInput("100000", 10, 30, 320, 20) $button = GUICtrlCreateButton("Genereaza", 40, 50, 320, 20) $List = GUICtrlCreateListView("val1" &"|"& "val2" &"|"& "val3" &"|"& "val4", 10, 90, 400, 450) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $button $i = 1 Do _GUICtrlListView_AddItem($List, $i) _GUICtrlListView_AddSubItem($List, $i-1, "test", 1, 1) _GUICtrlListView_AddSubItem($List, $i-1, "test3", 2, 2) _GUICtrlListView_AddSubItem($List, $i-1, "test4", 3, 3) _GUICtrlListView_Scroll($List, 0, $i) $i = $i + 1 Until _GUICtrlListView_GetItemCount($List) = GUICtrlRead($nr) EndSwitch WEnd Thanks guys, solved this problem 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