Sign in to follow this  
Followers 0
ixxy

Executing through List

2 posts in this topic

Global $Filename = "C:\setm.m3u"
Dim $Array[1]
Dim $temp[1]

GUICreate("List GUI");

$list=GUICtrlCreateList ("", 25,10,350,97)
GUICtrlSetLimit(-1,200)

_FileReadToArray($Filename, $Array)
For $i=1 To $Array[0]
    _ArrayAdd($temp,GUICtrlSetData(-1,$Array[$i]))
Next

The text file I've loaded on to the list happens to have paths for other files. Is it possible that when its displayed, I could double click on it to have it executed? (Multiple-line execution would be perfection)

Thanks!

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

For double click on listbox, LBN_DBLCLK (search forum for that, there are many readymade examples).

Not sure what do you mean by "Multiple-line execution". Multiple selected items? Set listbox style $LBS_EXTENDEDSEL or $LBS_MULTIPLESEL, then get all selected items and do whatever with them in your LBN_DBLCLK handler. To get all selected items, see ListBox UDF which comes with AutoIt, function names may differ depending on which version of AutoIt you are using, but it's all there.

Edited by Siao

"be smart, drink your wine"

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  
Followers 0