#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <GUIListview.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$List1 = GUICtrlCreateListView("", 72, 56, 105, 188)
_GUICtrlListView_AddItem($List1,"test1",0)
_GUICtrlListView_AddItem($List1,"test2",1)
_GUICtrlListView_AddItem($List1,"test3",2)
_GUICtrlListView_AddItem($List1,"test4",3)
_GUICtrlListView_AddItem($List1,"test5",4)
_GUICtrlListView_AddItem($List1,"test6",5)
_GUICtrlListView_AddItem($List1,"test7",6)
_GUICtrlListView_AddItem($List1,"test8",7)
GUICtrlSetStyle($List1,BitOR($lvs_list,$lvs_showselalways))
$Button1 = GUICtrlCreateButton(">", 216, 64, 89, 33)
$Button2 = GUICtrlCreateButton("<", 216, 112, 89, 33)
$Button3 = GUICtrlCreateButton(">>", 216, 160, 89, 41)
$List2 = GUICtrlCreateListView("", 344, 64, 113, 175)
GUICtrlSetStyle($List2,BitOR($lvs_list,$lvs_showselalways))
$Button4 = GUICtrlCreateButton("<<", 216, 208, 89, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_GUICtrlListView_CopyItems(GUICtrlGetHandle($List1),GUICtrlGetHandle($List2),True)
Case $Button2
_GUICtrlListView_CopyItems(GUICtrlGetHandle($List2),GUICtrlGetHandle($List1),True)
Case $Button3
$dd=""
$dd=_GUICtrlListView_GetItemCount(GUICtrlGetHandle($List1))
For $i=0 To $dd-1
_GUICtrlListView_SetItemSelected(GUICtrlGetHandle($List1),$i,True)
Next
_GUICtrlListView_CopyItems(GUICtrlGetHandle($List1),GUICtrlGetHandle($List2),True)
Case $Button4
$dd=""
$dd=_GUICtrlListView_GetItemCount(GUICtrlGetHandle($List2))
For $i=0 To $dd-1
_GUICtrlListView_SetItemSelected(GUICtrlGetHandle($List2),$i,True)
Next
_GUICtrlListView_CopyItems(GUICtrlGetHandle($List2),GUICtrlGetHandle($List1),True)
EndSwitch
WEnd