Jump to content
Sign in to follow this  
Juanola

Solution more fast?

Recommended Posts

Juanola

$numbers=GUICtrlCreateCombo("",25,$top,300,20,$CBS_DROPDOWNLIST)

$number_end=100000

$list_numbers="1|"

FOR $ini_number=2 to $number_end step 1

$list_numbers=$list_numbers & $ini_number & "|"

Next

GUICtrlSetData($numbers,$list_numbers,"330000")

I want add in the list combo the value range of number of 1-100000

Thank you!

Share this post


Link to post
Share on other sites
Mat

use an input?

a combo up to 100,000 is not clever.

edit: unless there is something specific you want it to do. if It's for inputting numbers, then It's not clever. elseIf Purpose = Special Then me = wrong EndIf

Edited by mdiesel

Share this post


Link to post
Share on other sites
ResNullius

$numbers=GUICtrlCreateCombo("",25,$top,300,20,$CBS_DROPDOWNLIST)

$number_end=100000

$list_numbers="1|"

FOR $ini_number=2 to $number_end step 1

$list_numbers=$list_numbers & $ini_number & "|"

Next

GUICtrlSetData($numbers,$list_numbers,"330000")

I want add in the list combo the value range of number of 1-100000

Thank you!

This method of building the numbers list appears to be faster:

#include <ComboConstants.au3>
GuiCreate("test")
$top = 10
$numbers=GUICtrlCreateCombo("",25,$top,300,20,$CBS_DROPDOWNLIST)

$number_end = 100000
$list_numbers=""
$tempcount = 1

$Start = TimerInit()

FOR $ini_number=1 to $number_end step 1
    $list_numbers &= $ini_number & "|"
Next

GUICtrlSetData($numbers,$list_numbers,"330000")
GUISetState()

ConsoleWrite(TimerDiff($start) & @crlf)
Do 
    Sleep(10)
Until Guigetmsg() = -3

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.