i hv this 1000+ list
possible?
thanks
how to make the combobox limitless
- smorgasbord
- Posts: 493
- Joined: 30 Sep 2013, 09:34
how to make the combobox limitless
John ... you working ?
Re: how to make the combobox limitless
You can use the r(row option), e.g.: Gui Add, ComboBox, r%SomeHighValue%
- smorgasbord
- Posts: 493
- Joined: 30 Sep 2013, 09:34
Re: how to make the combobox limitless
please elaborate
PS:
Gui, Add, ComboBox, r101010 vTo, A|B|C|D..............................
did not work
PS:
Gui, Add, ComboBox, r101010 vTo, A|B|C|D..............................
did not work
John ... you working ?
Re: how to make the combobox limitless
not sure what you want
an example combobox with 2100 lines to select
an example combobox with 2100 lines to select
Code: Select all
/*
e4x =
(LTrim Join|
Janvier
Fevrier
Mars
Avril
Mai
June
Juli
August
September
October
Novembre
Decembre
)
*/
loop,2100
{
i++
e4x .= i "|"
}
Gui, Add, ComboBox, x10 y10 w150 h20 r12 vCCx, %e4x%
Gui,add,button, gGO,GO
Gui,show
GuiControl, Choose,ccx,2098
return
GO:
GuiControlGet,ccx
msgbox, 262144, Test,You selected=`n%ccx%
return
guiclose:
exitapp
- smorgasbord
- Posts: 493
- Joined: 30 Sep 2013, 09:34
Re: how to make the combobox limitless
Still says continuation section too long.
John ... you working ?
Re: how to make the combobox limitless
e4x =
(LTrim Join|
Janvier
Fevrier
Mars
)
the above is called a continuation section
Within this section
http://ahkscript.org/docs/Scripts.htm#continuation
And specfically read the example after this line of text
--> A continuation section cannot produce a line whose total length is greater than 16,383 characters
(LTrim Join|
Janvier
Fevrier
Mars
)
the above is called a continuation section
Within this section
http://ahkscript.org/docs/Scripts.htm#continuation
And specfically read the example after this line of text
--> A continuation section cannot produce a line whose total length is greater than 16,383 characters
- smorgasbord
- Posts: 493
- Joined: 30 Sep 2013, 09:34
Re: how to make the combobox limitless
@leefme
it seems that is what is intended, to break the limit 16,383.
possible?
thanks
it seems that is what is intended, to break the limit 16,383.
possible?
thanks
John ... you working ?
Re: how to make the combobox limitless
Leefme I posted a fix for him in IRC which I think will work. He had a huge list, so I broke it up into 3 variables, and GuiControl appended the 2nd and 3rd vars to the list after its initial creation.
- smorgasbord
- Posts: 493
- Joined: 30 Sep 2013, 09:34
Re: how to make the combobox limitless
@Bkid
Yep it works like a Charm.
million Thanks.
All hail ahkscript
Yep it works like a Charm.
million Thanks.
All hail ahkscript
John ... you working ?
Re: how to make the combobox limitless
( can you show the script ? )
EDIT ; I think I'll understand
EDIT ; I think I'll understand
@Leefme :
A continuation section cannot produce a line whose total length is greater than 16,383 characters
@Bkid :
Leefme, I posted a fix for him in IRC which I think will work.
He had a huge list, so I broke it up into 3 variables, and GuiControl appended the 2nd and 3rd vars to the list after its initial creation.
Last edited by garry on 08 Nov 2014, 09:40, edited 1 time in total.
- smorgasbord
- Posts: 493
- Joined: 30 Sep 2013, 09:34
Re: how to make the combobox limitless
@garry
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
e4x =
(LTrim Join|
bla bla bla bla more bla bla bla
bla bla bla bla more bla bla bla
)
e4xtemp =
(LTrim Join|
bla bla bla bla more bla bla bla
bla bla bla bla more bla bla bla
)
e4xtemp2 =
(LTrim Join|
bla bla bla bla more bla bla bla
bla bla bla bla more bla bla bla
)
;~ loop,2100
;~ {
;~ i++
;~ e4x .= i "|"
;~ }
Gui, Add, ComboBox, x10 y10 w1050 h20 r12 vCCx, %e4x%
Gui,add,button, gGO,GO
Gui,show
GuiControl,, CCx, %e4xtemp%
GuiControl,, CCx, %e4xtemp2%
GuiControl, Choose,ccx,2098
return
GO:
GuiControlGet,ccx
msgbox, 262144, Test,You selected=`n%ccx%
return
guiclose:
exitapp
John ... you working ?
Re: how to make the combobox limitless
thank you users
smorgasbord , Bkid , Leefme
smorgasbord , Bkid , Leefme
Last edited by garry on 08 Nov 2014, 09:45, edited 1 time in total.
Re: how to make the combobox limitless
A more basic example, if needed:
Code: Select all
hugelist =
(LTrim Join|
item1
item2
item3
)
hugelist2 =
(LTrim Join|
item4
item5
item6
)
hugelist3 =
(LTrim Join|
item7
item8
item9
)
Gui, Add, ComboBox, x10 y10 w100 h20 r12 vComboBox, %hugelist%
Gui,show
GuiControl,, ComboBox, %hugelist2%
GuiControl,, ComboBox, %hugelist3%
Return
GuiClose:
ExitApp
Re: how to make the combobox limitless
@Bkid
I have one nit to pick.
>>Gui, Add, ComboBox, x10 y10 w100 h20 r12 vComboBox, %hugelist%
Don't use a keyword >by itself< as the name of an associated variable
While it is "legal" to do, imo this does not clarify the distinction between keywords and variables.
I have one nit to pick.
>>Gui, Add, ComboBox, x10 y10 w100 h20 r12 vComboBox, %hugelist%
Don't use a keyword >by itself< as the name of an associated variable
While it is "legal" to do, imo this does not clarify the distinction between keywords and variables.
- smorgasbord
- Posts: 493
- Joined: 30 Sep 2013, 09:34
Re: how to make the combobox limitless
hmm..
what to do if the whole list is to be assigned to a particular array field, let say file_lines[10]
possible still?
thanks
what to do if the whole list is to be assigned to a particular array field, let say file_lines[10]
possible still?
thanks
John ... you working ?
Re: how to make the combobox limitless
The problem with "continuation section" only applies to the limits on its length.
You should be able to assign a value (or in this case string of characters) to a variable by whatever mean needed.
ex: store the string in a file and use Fileread,
or use multiple continuation sections to >append data<
You should be able to assign a value (or in this case string of characters) to a variable by whatever mean needed.
ex: store the string in a file and use Fileread,
or use multiple continuation sections to >append data<
- smorgasbord
- Posts: 493
- Joined: 30 Sep 2013, 09:34