Jump to content

Alphabetical order (List)


Go to solution Solved by jguinch,

Recommended Posts

Is there any way to make this send data to the list and not have it set in alphabetical and numerical order?

It's really messing with the purpose of the project.

#include<misc.au3>
#include<guiconstants.au3>
#include<guilistbox.au3>
#include<windowsconstants.au3>
$gui = GUICreate("Example",300,200)
$input = GUICtrlCreateInput("",0,0,100,25)
$list = GUICtrlCreateList("",100,0,200,200)
$send = GUICtrlCreateButton("Send to list",0,25,100,25)
$input_2 = GUICtrlCreateInput("",0,125,100,50,$ES_MULTILINE)
$start = GUICtrlCreateButton("Start",0,50,100,25)
GUISetState()
while 1
   $msg = GUIGetMsg(1)
   Switch $msg[1]
   Case $gui
      Switch $msg[0]
      Case -3
         Exit
      Case $send
         $read_input = GUICtrlRead($input)
         GUICtrlSetData($list,$read_input)
         GUICtrlSetData($input,"")
      Case $start
        For $i = 1 to _GUICtrlListBox_GetCount($list)
           $count = _GUICtrlListBox_GetCount($list)
         GUICtrlSetData($input_2,GUICtrlRead($input_2)&" "&_GUICtrlListBox_GetText($list,$i-1))
      Next
         If _IsPressed("25") Then Exit
      EndSwitch
   EndSwitch
WEnd

Thanks.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...