Jump to content
Sign in to follow this  

au3 Lib Listbox and doubleclick

Recommended Posts


it is possible on one doubleclicks to react with a Listbox ?

Share this post

Link to post
Share on other sites


#include <A3LListbox.au3>

Global $hGUI, $hList, $iI

; Create GUI

$hGUI = GUICreate("List Box", 400, 296)

$hList = _Listbox_Create($hGUI, 2, 2, 396, 294)


; Capture messages

GUIRegisterMsg($WM_COMMAND, "_Listbox_WM_COMMAND")

; Add strings


for $iI = 1 to 9

$sText = StringFormat("%03d : Random string", Random(1, 100, 1))

_Listbox_AddString($hList, $sText)



; Click the fourth item in the list

_Listbox_ClickItem($hList, 3)

; Loop until user exits


until GUIGetMsg() = $GUI_EVENT_CLOSE

Share this post

Link to post
Share on other sites

Try this, I got it from Alex Media Player by alexmadman.

$List1 = GUICtrlCreateList("", 248, 24, 241, 336,$LBS_STANDARD)
GUICtrlSetBkColor($List1 , 0x111199)

and dclick.au3 is:

Global Const $DebugIt = 1
Global Const $WM_COMMAND = 0x0111
Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam)
    Local $nNotifyCode = BitShift($wParam, 16)
    Local $nID = BitAND($wParam, 0xFFFF)
    Local $hCtrl = $lParam
    Local Const $LBN_DBLCLK = 2;

    If $nID=$list1 Then
        If $nNotifyCode=$LBN_DBLCLK Then dclick() 

It may work with a Listbox the same as a List. I could'nt find the include A3LListbox.au3 to try it out.

Edited by cyanidemonkey

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

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.