Shadowpp Posted April 22, 2008 Share Posted April 22, 2008 Created a little utility which contains a dropdown: CODE#include <File.au3> #include <Constants.au3> #include <GuiConstants.au3> GUICreate("Utility", 320, 100, -1, -1) $Combo_1 = GUICtrlCreateCombo("", 10, 30, 300, 25) GUICtrlSetData(-1, "Item1|Item2") $Label_1 = GUICtrlCreateLabel("Pick the object you wish to replicate", 10, 10, 200, 20) $Button = GUICtrlCreateButton("Start Replication", 110, 70, 100, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button ; Check each field for a value and return an error if any vlaue is NULL $OBJECT = GUICtrlRead($COMBO_1) If $OBJECT = "" Then MsgBox(0, "Error", "You must select an object from the list.") ExitLoop EndSelect WEnd This seems to work fine until I fully populate all the drop down items (260 items) which brings the total character count to 5456. Unfortunately, the app errors when I try to run it. I think there is a limitation of some kind preventing the app from running correctly with my entire item list. Can anyone suggest an alternate way of displaying a large list of data in a GUI? Thanks Link to comment Share on other sites More sharing options...
smashly Posted April 22, 2008 Share Posted April 22, 2008 Hi, I could be wrong but I don't think it's a limit of the combobox that's causing the problem. I ran this code with 6000 items added to the combobox and if I select any item then it writes the item in scites console without fault for me.. I'm using autoit v 3.2.10.0 on an XP SP2 laptop. Maybe you could describe the error with a bit more detail.Unfortunately, the app errors when I try to run it.Or maybe provide a working example the error for better help. #include <GuiConstants.au3> GUICreate("Utility", 320, 100, -1, -1) $Combo = GUICtrlCreateCombo("", 10, 30, 300, 25) For $i = 1 To 6000 GUICtrlSetData($Combo, "Combo Item Yada Yada " & $i) Next GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Combo ConsoleWrite(GUICtrlRead($Combo) & @LF) EndSelect WEnd Cheers Link to comment Share on other sites More sharing options...
Shadowpp Posted April 22, 2008 Author Share Posted April 22, 2008 First off, thank you for your response. This is being run with Autoit ver 3.2.10.0 and ScITE ver 1.7.5.0 on an XP SP2 desktop. Here is my full code with all my item entries: CODE#include <File.au3> #include <Constants.au3> #include <GuiConstants.au3> GUICreate("Utility", 320, 100, -1, -1) $Combo_1 = GUICtrlCreateCombo("", 10, 30, 300, 25) GUICtrlSetData(-1, "1099Convey2006|Able2Extract3|Able2ExtractPro3|AccuWage2006|ACHBuilder|AddHPLJ4|AddLocalPrinters |Adobe_Acrobat_Reader_81|Adobe_PhotoDeluxe_20|Adobe_Photoshop_601|Adobe_Shockwave_1014020|Adobe_SVG_ Viewer_303|AdobeAcrobat5|AdobePhotoshopElements50|AdobePocketReader20|AdobePremiereElements30|Apple_ Quicktime_70480|ATGPollSites|Attachmate_KEA!_X_600187|Audacity126|AutoDeskMapGuideActiveXViewer65525|AveryWizard30|BatonRougeProperties|Beyo nd_Compare_241|BlackBerryDesktopSoftware3629|BMS_106|BNAInterActiveForms|Broderbund_MB_Typing|Center ed_Systems_Second_Copy_62041|CHUCK_GulfCoast|Chuck_Icon_Fix|CHUCK_Tempe|CircleK_DialUp|CircleK_Farm| CircleK_InnerCircle_Desktop_Icon_10|CircleK_Screen_Saver|Cisco_Aironet_Client|Citrix_Metaframe_Clien t_9150|Citrix_Metaframe_Client_9150_ICA|Closest GC|CommercialEstimator|CoreTech_21|CrimeyeRobberyCam5409|CrossformClient69|CSI_Charlotte|CSI_Corona| CSI_Tempe|CTAudit_4|D600AudioDrivers|DameWare_NTUtilities|Dameware_RemoteControl480|DataBase_Oasis_2 81|DB_Promo|DealCapture|DisableDesktopCleanup|Discounts_and_Rebates|DocLocator_Denver|DWFViewer65|EM C_WebXtender_Interactive_Client_ActiveX_Control|Enable_Access2003|Enform_Fix|EPropertyTax|ETV4010500 |EvoD510SFFDrivers|ExcelOpenDocInApp|Facts|FileZilla_2225|FrontPage2003|Gaim_2_Beta_31|GrantUserRigh tsToPowerCFG|GrantUserRightsToTimeCFG|Gross_Profit_Margin_Maintenance_102|GroupsUpdate|Guardian_View |GX260AudioDriver|GX260VideoDriver|GX270AudioDrivers|HiT_Software_ODBC_400_7005_RO|HiT_Software_ODBC _400_7005_RW|HiT_Software_OLE_DB_3005|HRSPro|HTML_Printing_Fix_Outlook2003|HyperTerminalPersonalEdit ion6300|HyperTerminalPersonalEdition6300_Fix|IBM_iSeries_Access_53|IBM_iSeries_Access_User_53|IBM_Re d_Brick_Admin_2202|IBM_RedBrick_Driver_562|IE_AllowWindowReUse|iFolder217|ImageVaultPlayback860|Imag eVaultPlayback92|InstallShield_InstallScriptMSIEngine_1050|InstallShield_InstallScriptMSIEngine_11|I nstallShield_InstallScriptMSIEngine_7|InstallShield_InstallScriptMSIEngine_8|InstallShield_InstallSc riptMSIEngine_9|InstallShield_InstallScriptMSIEngine_Pro|Intellex_Player|InTouchManager565|Invoice_A nalysis|iPrint411|J2SE_Runtime_Environment_142_Update_10|J2SE_Runtime_Environment_50_Update_6|Jitter bit_Client_120|KSS_Plugin|Legato_EmailXtender_481409|M52AudioDriver|M52DVDApps|Macromedia_Flash_Play er_80220|Mainstream_CrossForm_67021|Mannatec_MTran|MAPR|MARS_II_ICON|McAfee_Update|Microsoft_Access_ 97|Microsoft_Active_Sync_38|Microsoft_Active_Sync_42|Microsoft_CMS_HTML_Editor|Microsoft_GroupPolicy ManagementConsole|Microsoft_LiveMeeting_Console_2005|Microsoft_NET_20|Microsoft_SAPI_40|Microsoft_St reets_and_Trips_2005|Microsoft_VirtualEarth3D|Microsoft_VSS_2005|MSCompPack2007|MTE|NetCharts|NetMan age_Rumba_FTP_74|NetManage_Rumba_Telnet_74|NetMange_Rumba_AS400_73|NetMeeting|Novell_Client_491_SP2| Novell_ConsoleOne_136e|Octel_Visual_Messenger_2|Octel_Visual_Messenger_Fix|Offer_Remote_Assistance|O racle_734_Client_1|Oracle_734_Client_2|Oracle_734_Client_3|Oracle_8i_Client_UR|Oracle_JInitiator_118 14|Oracle_JInitiator_1183|Oracle_JInitiator_1187|Oracle_JInitiator_13126|Oracle_Jinitiator_1319|Orac le_JInitiator_Fix|OTTER2006|PalmOne_Desktop_414|PCA_Retail_ICAConnection|PCAnywhere_Full_115|PITS|Pl atteCanyon_Mastering_Toolbook|Print_Key|Project_2003_Pro|Project_2003_Std|ProphetX3138|ProWrite2005L TEN|Publisher_2003|Purchase_Analysis|Quest_Software_Toad_901|Quest_Software_Toad_Tuner_901|RealVisio nInternetImaging|RealVNC_Viewer_412|Recap_Maintenance_106|Recap_Maintenance_107|RemoteAccessDocument |RemoteDesktopActiveXControl|Restart_MCShield_Service|RMS_Host_ICAConnection|RoxioEasyMediaCreatorSu ite8|RPCHTTP|Sales_Tax_Maintenance_108|Scremer|SeagateReportViewer850385|Sequel_Viewpoint_55355|SetP roxy|Site_Repository_Image|SiteListTest|Snapshot_Viewer_10|SQL_Server_ODBC_DSNs_UR|SQLClientTools|Su mTotal_ToolBook_CircleKSBK|SumTotal_Toolbook_Hotfix1|SumTotal_ToolBook_Instructor_2004|System_Sentin el_31016|T43Drivers_Apps|T60_SoundMax_Audio|T60Drivers_Apps|T60WINDVD_RecordNow|T61Drivers_Apps|TDL_ Promotion|TDL_TouchButton|Tecra8200_Audio_Modem_Drivers1099Convey2006|Able2Extract3|Able2ExtractPro3 |AccuWage2006|ACHBuilder|AddHPLJ4|AddLocalPrinters|Adobe_Acrobat_Reader_81|Adobe_PhotoDeluxe_20|Adob e_Photoshop_601|Adobe_Shockwave_1014020|Adobe_SVG_Viewer_303|AdobeAcrobat5|AdobePhotoshopElements50| AdobePocketReader20|AdobePremiereElements30|Apple_Quicktime_70480|ATGPollSites|Attachmate_KEA!_X_600187|Audacity126|AutoDeskMapGuideActiveXViewer65525|AveryWizard30|BatonRougeProperties|Beyo nd_Compare_241|BlackBerryDesktopSoftware3629|BMS_106|BNAInterActiveForms|Broderbund_MB_Typing|Center ed_Systems_Second_Copy_62041|CHUCK_GulfCoast|Chuck_Icon_Fix|CHUCK_Tempe|CircleK_DialUp|CircleK_Farm| CircleK_InnerCircle_Desktop_Icon_10|CircleK_Screen_Saver|Cisco_Aironet_Client|Citrix_Metaframe_Clien t_9150|Citrix_Metaframe_Client_9150_ICA|Closest GC|CommercialEstimator|CoreTech_21|CrimeyeRobberyCam5409|CrossformClient69|CSI_Charlotte|CSI_Corona| CSI_Tempe|CTAudit_4|D600AudioDrivers|DameWare_NTUtilities|Dameware_RemoteControl480|DataBase_Oasis_2 81|DB_Promo|DealCapture|DisableDesktopCleanup|Discounts_and_Rebates|DocLocator_Denver|DWFViewer65|EM C_WebXtender_Interactive_Client_ActiveX_Control|Enable_Access2003|Enform_Fix|EPropertyTax|ETV4010500 |EvoD510SFFDrivers|ExcelOpenDocInApp|Facts|FileZilla_2225|FrontPage2003|Gaim_2_Beta_31|GrantUserRigh tsToPowerCFG|GrantUserRightsToTimeCFG|Gross_Profit_Margin_Maintenance_102|GroupsUpdate|Guardian_View |GX260AudioDriver|GX260VideoDriver|GX270AudioDrivers|HiT_Software_ODBC_400_7005_RO|HiT_Software_ODBC _400_7005_RW|HiT_Software_OLE_DB_3005|HRSPro|HTML_Printing_Fix_Outlook2003|HyperTerminalPersonalEdit ion6300|HyperTerminalPersonalEdition6300_Fix|IBM_iSeries_Access_53|IBM_iSeries_Access_User_53|IBM_Re d_Brick_Admin_2202|IBM_RedBrick_Driver_562|IE_AllowWindowReUse|iFolder217|ImageVaultPlayback860|Imag eVaultPlayback92|InstallShield_InstallScriptMSIEngine_1050|InstallShield_InstallScriptMSIEngine_11|I nstallShield_InstallScriptMSIEngine_7|InstallShield_InstallScriptMSIEngine_8|InstallShield_InstallSc riptMSIEngine_9|InstallShield_InstallScriptMSIEngine_Pro|Intellex_Player|InTouchManager565|Invoice_A nalysis|iPrint411|J2SE_Runtime_Environment_142_Update_10|J2SE_Runtime_Environment_50_Update_6|Jitter bit_Client_120|KSS_Plugin|Legato_EmailXtender_481409|M52AudioDriver|M52DVDApps|Macromedia_Flash_Play er_80220|Mainstream_CrossForm_67021|Mannatec_MTran|MAPR|MARS_II_ICON|McAfee_Update|Microsoft_Access_ 97|Microsoft_Active_Sync_38|Microsoft_Active_Sync_42|Microsoft_CMS_HTML_Editor|Microsoft_GroupPolicy ManagementConsole|Microsoft_LiveMeeting_Console_2005|Microsoft_NET_20|Microsoft_SAPI_40|Microsoft_St reets_and_Trips_2005|Microsoft_VirtualEarth3D|Microsoft_VSS_2005|MSCompPack2007|MTE|NetCharts|NetMan age_Rumba_FTP_74|NetManage_Rumba_Telnet_74|NetMange_Rumba_AS400_73|NetMeeting|Novell_Client_491_SP2| Novell_ConsoleOne_136e|Octel_Visual_Messenger_2|Octel_Visual_Messenger_Fix|Offer_Remote_Assistance|O racle_734_Client_1|Oracle_734_Client_2|Oracle_734_Client_3|Oracle_8i_Client_UR|Oracle_JInitiator_118 14|Oracle_JInitiator_1183|Oracle_JInitiator_1187|Oracle_JInitiator_13126|Oracle_Jinitiator_1319|Orac le_JInitiator_Fix|OTTER2006|PalmOne_Desktop_414|PCA_Retail_ICAConnection|PCAnywhere_Full_115|PITS|Pl atteCanyon_Mastering_Toolbook|Print_Key|Project_2003_Pro|Project_2003_Std|ProphetX3138|ProWrite2005L TEN|Publisher_2003|Purchase_Analysis|Quest_Software_Toad_901|Quest_Software_Toad_Tuner_901|RealVisio nInternetImaging|RealVNC_Viewer_412|Recap_Maintenance_106|Recap_Maintenance_107|RemoteAccessDocument |RemoteDesktopActiveXControl|Restart_MCShield_Service|RMS_Host_ICAConnection|RoxioEasyMediaCreatorSu ite8|RPCHTTP|Sales_Tax_Maintenance_108|Scremer|SeagateReportViewer850385|Sequel_Viewpoint_55355|SetP roxy|Site_Repository_Image|SiteListTest|Snapshot_Viewer_10|SQL_Server_ODBC_DSNs_UR|SQLClientTools|Su mTotal_ToolBook_CircleKSBK|SumTotal_Toolbook_Hotfix1|SumTotal_ToolBook_Instructor_2004|System_Sentin el_31016|T43Drivers_Apps|T60_SoundMax_Audio|T60Drivers_Apps|T60WINDVD_RecordNow|T61Drivers_Apps|TDL_ Promotion|TDL_TouchButton|Tecra8200_Audio_Modem_Drivers|TestPoint|Texas_Sales_Tax|TexasMotorFuelsETF DataEntrySystem4|TimeZoneRegistryUpdate|ToolBook_Preloader|ToolBook_Quiz_Randomizer|Toshiba2100Drive rs|TrustFileFL2007WorkStation|TrustFileFL2008Workstation|TrustFileFloridaFile2006|TrustFileSC2007Wor kstation|TrustFileSC2008Workstation|TrustFileSCFile2006WorkStation|TrustFileTN2007Workstation|TrustF ileTN2008Workstation|TSVExtension|Turbo_Data_Update|Turbo_SiteMaster_Sync|Turbo_UR|TW_ADHOC|TZMoveDS T2007|UIFastTax3165|Uninstall_Access2003|Uninstall_Adobe_Acrobat_5|Uninstall_Adobe_Photoshop_601|Uni nstall_Coretech_1402|Uninstall_Coretech_20|Uninstall_Dameware_RemoteControl480|Uninstall_HIT_Softwar e_ODBC_400_7005_Lite|Uninstall_HIT_Software_OLE_DB_3005|Uninstall_HyperTerminalPersonalEdition6300|U ninstall_MDBLauncher|Uninstall_Microsoft_Streets_and_Trips_2005|Uninstall_PCAnywhere_Full_115|Uninst all_Project_2003_Pro|Uninstall_RoxioEasyMediaCreatorSuite8|Uninstall_Visio_2003_Pro|Uninstall_Visio_ 2003_Std|Uninstall_Win2PDF_225|UninstallMSI|UpdateAccessConnectionsProfiles|UPS_OnLine_Office|Verizo n_Q_Broadband|Verizon_QuickLink_Mobile_Phonebook_341|VerizonPC5740|VerizonPC5750|Viewpoint_Media_Pla yer|Visio_2003_Pro|Visio_2003_Std|Visio_Viewer_2003|VoloView2|VPNClient48|VPNClient48_StandardCKSett ings|VPNClient48_VISADMZSettings|WaspBarCode|WaveReader3|WECCSupport|WestecViewerActiveXControl|Win2 PDF_225|WinZip11|WSUS_Fix|ZIPExtension|Zytax|Zytax_License_Update|Zytax35") $Label_1 = GUICtrlCreateLabel("Pick the object you wish to replicate", 10, 10, 200, 20) $Button = GUICtrlCreateButton("Start Replication", 110, 70, 100, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button ; Check each field for a value and return an error if any vlaue is NULL $OBJECT = GUICtrlRead($COMBO_1) If $OBJECT = "" Then MsgBox(0, "Error", "You must select an object from the list.") ExitLoop EndSelect WEnd And here is what appears in the Output window of ScITE after I attempt to run the code: CODE>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\test.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams +>13:21:22 Starting AutoIt3Wrapper v.1.10.1.7 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 2 CPU:X86) >Running AU3Check (1.54.10.0) from:C:\Program Files\AutoIt3 +>13:21:22 AU3Check ended.rc:0 >Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "C:\test.au3" C:\test.au3 (8) : ==> Unterminated string.: GUICtrlSetData(-1, "1099Convey2006|Able2Extract3|Able2ExtractPro3|AccuWage2006|ACHBuilder|AddHPLJ4|AddLocalPrinters |Adobe_Acrobat_Reader_81|Adobe_PhotoDeluxe_20|Adobe_Photoshop_601|Adobe_Shockwave_1014020|Adobe_SVG_ Viewer_303|AdobeAcrobat5|AdobePhotoshopElements50|AdobePocketReader20|AdobePremiereElements30|Apple_ Quicktime_70480|ATGPollSites|Attachmate_KEA!_X_600187|Audacity126|AutoDeskMapGuideActiveXViewer65525|AveryWizard30|BatonRougeProperties|Beyo nd_Compare_241|BlackBerryDesktopSoftware3629|BMS_106|BNAInterActiveForms|Broderbund_MB_Typing|Center ed_Systems_Second_Copy_62041|CHUCK_GulfCoast|Chuck_Icon_Fix|CHUCK_Tempe|CircleK_DialUp|CircleK_Farm| CircleK_InnerCircle_Desktop_Icon_10|CircleK_Screen_Saver|Cisco_Aironet_Client|Citrix_Metaframe_Clien t_9150|Citrix_Metaframe_Client_9150_ICA|Closest GC|CommercialEstimator|CoreTech_21|CrimeyeRobberyCam5409|CrossformClient69|CSI_Charlotte|CSI_Corona| CSI_Tempe|CTAudit_4|D600AudioDrivers|DameWare_NTUtilities|Dameware_RemoteControl480|DataBase_Oasis_2 81|DB_Promo|DealCapture|DisableDesktopCleanup|Discounts_and_Rebates|DocLocator_Denver|DWFViewer65|EM C_WebXtender_Interactive_Client_ActiveX_Control|Enable_Access2003|Enform_Fix|EPropertyTax|ETV4010500 |EvoD510SFFDrivers|ExcelOpenDocInApp|Facts|FileZilla_2225|FrontPage2003|Gaim_2_Beta_31|GrantUserRigh tsToPowerCFG|GrantUserRightsToTimeCFG|Gross_Profit_Margin_Maintenance_102|GroupsUpdate|Guardian_View |GX260AudioDriver|GX260VideoDriver|GX270AudioDrivers|HiT_Software_ODBC_400_7005_RO|HiT_Software_ODBC _400_7005_RW|HiT_Software_OLE_DB_3005|HRSPro|HTML_Printing_Fix_Outlook2003|HyperTerminalPersonalEdit ion6300|HyperTerminalPersonalEdition6300_Fix|IBM_iSeries_Access_53|IBM_iSeries_Access_User_53|IBM_Re d_Brick_Admin_2202|IBM_RedBrick_Driver_562|IE_AllowWindowReUse|iFolder217|ImageVaultPlayback860|Imag eVaultPlayback92|InstallShield_InstallScriptMSIEngine_1050|InstallShield_InstallScriptMSIEngine_11|I nstallShield_InstallScriptMSIEngine_7|InstallShield_InstallScriptMSIEngine_8|InstallShield_InstallSc riptMSIEngine_9|InstallShield_InstallScriptMSIEngine_Pro|Intellex_Player|InTouchManager565|Invoice_A nalysis|iPrint411|J2SE_Runtime_Environment_142_Update_10|J2SE_Runtime_Environment_50_Update_6|Jitter bit_Client_120|KSS_Plugin|Legato_EmailXtender_481409|M52AudioDriver|M52DVDApps|Macromedia_Flash_Play er_80220|Mainstream_CrossForm_67021|Mannatec_MTran|MAPR|MARS_II_ICON|McAfee_Update|Microsoft_Access_ 97|Microsoft_Active_Sync_38|Microsoft_Active_Sync_42|Microsoft_CMS_HTML_Editor|Microsoft_GroupPolicy ManagementConsole|Microsoft_LiveMeeting_Console_2005|Microsoft_NET_20|Microsoft_SAPI_40|Microsoft_St reets_and_Trips_2005|Microsoft_VirtualEarth3D|Microsoft_VSS_2005|MSCompPack2007|MTE|NetCharts|NetMan age_Rumba_FTP_74|NetManage_Rumba_Telnet_74|NetMange_Rumba_AS400_73|NetMeeting|Novell_Client_491_SP2| Novell_ConsoleOne_136e|Octel_Visual_Messenger_2|Octel_Visual_Messenger_Fix|Offer_Remote_Assistance|O racle_734_Client_1|Oracle_734_Client_2|Oracle_734_Client_3|Oracle_8i_Client_UR|Oracle_JInitiator_118 14|Oracle_JInitiator_1183|Oracle_JInitiator_1187|Oracle_JInitiator_13126|Oracle_Jinitiator_1319|Orac le_JInitiator_Fix|OTTER2006|PalmOne_Desktop_414|PCA_Retail_ICAConnection|PCAnywhere_Full_115|PITS|Pl atteCanyon_Mastering_Toolbook|Print_Key|Project_2003_Pro|Project_2003_Std|ProphetX3138|ProWrite2005L TEN|Publisher_2003|Purchase_Analysis|Quest_Software_Toad_901|Quest_Software_Toad_Tuner_901|RealVisio nInternetImaging|RealVNC_Viewer_412|Recap_Maintenance_106|Recap_Maintenance_107|RemoteAccessDocument |RemoteDesktopActiveXControl|Restart_MCShield_Service|RMS_Host_ICAConnection|RoxioEasyMediaCreatorSu ite8|RPCHTTP|Sales_Tax_Maintenance_108|Scremer|SeagateReportViewer850385|Sequel_Viewpoint_55355|SetP roxy|Site_Repository_Image|SiteListTest|Snapshot_Viewer_10|SQL_Server_ODBC_DSNs_UR|SQLClientTools|Su mTotal_ToolBook_CircleKSBK|SumTotal_Toolbook_Hotfix1|SumTotal_ToolBook_Instructor_2004|System_Sentin el_31016|T43Drivers_Apps|T60_SoundMax_Audio|T60Drivers_Apps|T60WINDVD_RecordNow|T61Drivers_Apps|TDL_ Promotion|TDL_TouchButton|Tecra8200_Audio_Modem_Drivers1099Convey2006|Able2Extract3|Able2Ex ->13:21:23 AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 2.076 Thank you again for your assistance. Link to comment Share on other sites More sharing options...
evilertoaster Posted April 22, 2008 Share Posted April 22, 2008 Your function parameters span multiple lines, you either need to put them on the same line or use a _ to seperate them. Look in the AutoIt help file under AutoIt->Language Reference->Comments Link to comment Share on other sites More sharing options...
Shadowpp Posted April 22, 2008 Author Share Posted April 22, 2008 Thank you for your assitance. I have checked and confirmed that in my code all the entries are on a single line. It seems that when I paste here it gets wrapped and appears as multiple lines. Link to comment Share on other sites More sharing options...
Bowmore Posted April 22, 2008 Share Posted April 22, 2008 Thank you for your assitance. I have checked and confirmed that in my code all the entries are on a single line. It seems that when I paste here it gets wrapped and appears as multiple lines. The problem you are running into is the maximum length for a line of code in AutoIt 4096 To work around this you need to split you list of values into more than 1 line Example: $Values = "item1|item2|item3" $Values &= "|item4|item5|item6" $Values &= "|item7|item8|item..." GUICtrlSetData(-1, $Values, "item1") "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
smashly Posted April 23, 2008 Share Posted April 23, 2008 (edited) Can anyone suggest an alternate way of displaying a large list of data in a GUI?For what your doing imo you'd be better off with the list of apps in a seperate txt file. This way you can just read the file when needed to load the data. It's handy if your intending on compiling the script and the list of apps may change over time, At least with a seperate list file you won't have to be recompiling or editing your script every time the apps list needs to be updated.expandcollapse popup#include <GuiConstants.au3> #Include <GuiListView.au3> Opt("GUIOnEventMode", 1) Global $Apps = @ScriptDir & "\apps.txt", $iCnt $Gui = GUICreate("Utility", 320, 240) GUISetOnEvent($GUI_EVENT_CLOSE, "Event", $Gui) $LV = GUICtrlCreateListView("Application Names", 5, 5, 310, 205, -1, BitOR($WS_EX_CLIENTEDGE,$LVS_EX_CHECKBOXES)) $All = GUICtrlCreateButton("Select All", 8, 215, 70, 20) GUICtrlSetOnEvent(-1, "Event") $None = GUICtrlCreateButton("Select None", 86, 215, 70, 20) GUICtrlSetOnEvent(-1, "Event") $Invert = GUICtrlCreateButton("Invert", 164, 215, 70, 20) GUICtrlSetOnEvent(-1, "Event") $Start = GUICtrlCreateButton("Replicate", 242, 215, 70, 20) GUICtrlSetOnEvent(-1, "Event") LoadApps() GUISetState(@SW_SHOW, $Gui) While 1 Sleep(100) WEnd Func Event() Switch @GUI_CtrlId Case $GUI_EVENT_CLOSE Exit Case $All Selection(True) Case $None Selection(False) Case $Invert For $i = 0 To _GUICtrlListView_GetItemCount($LV) -1 If _GUICtrlListView_GetItemChecked($LV, $i) Then _GUICtrlListView_SetItemChecked($LV, $i, False) Else _GUICtrlListView_SetItemChecked($LV, $i, True) EndIf Next WinSetTitle($Gui, "", "Utility: " & $iCnt & " - Selected: " & ChkCount() ) Case $Start ;;; Do replication TestOut(); Just a test to see output in Scite console. Case Else WinSetTitle($Gui, "", "Utility: " & $iCnt & " - Selected: " & ChkCount() ) EndSwitch EndFunc Func TestOut(); Just a test to see output in Scite console. Local $cnt For $t = 0 To _GUICtrlListView_GetItemCount($LV) -1 If _GUICtrlListView_GetItemChecked($LV, $t) Then $cnt += 1 ConsoleWrite($cnt & ": " & _GUICtrlListView_GetItemText($LV, $t) & @LF) EndIf Next EndFunc Func Selection($iSel) For $s = 0 To _GUICtrlListView_GetItemCount($LV) - 1 _GUICtrlListView_SetItemChecked($LV, $s, $iSel) Next WinSetTitle($Gui, "", "Utility: " & $iCnt & " - Selected: " & ChkCount() ) EndFunc Func ChkCount() Local $tcnt = 0 For $c = 0 To _GUICtrlListView_GetItemCount($LV) -1 If _GUICtrlListView_GetItemChecked($LV, $c) Then $tcnt += 1 Next Return $tcnt EndFunc Func LoadApps() If FileExists ($Apps) Then Local $SS = StringSplit(StringStripCR(FileRead($Apps)), @LF) For $i = 1 To $SS[0] GUICtrlCreateListViewItem($SS[$i], $LV) GUICtrlSetOnEvent(-1, "Event") Next $iCnt = $SS[0] _GUICtrlListView_SetColumnWidth($LV, 0, $LVSCW_AUTOSIZE) WinSetTitle($Gui, "", "Utility: " & $iCnt & " - Selected: 0" ) EndIf EndFunc Here's the apps.txt I used with the above code: Cheers Edited April 23, 2008 by smashly 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