Sign in to follow this  
Followers 0
Ripper

help with list creation

15 posts in this topic

Hi

I'm a new user to autoit.I hav read through the doc of autoit but dint find a soln

neither in the forums.

I want to create a list with drag n drop support but without the need of an input

or edit box

All the examples i came so far alow drag n drop with the help of input or edit box

We hav to drop the file in the input box to put in the list

But is it possible to create the list without input or edit box just like that of

winamp or windows media player

please help

I use autoit 3.1.1.93 beta

Share this post


Link to post
Share on other sites



Hi

I'm a new user to autoit.I hav read through the doc of autoit but dint find a soln

neither in the forums.

I want to create a list with drag n drop support but without the need of an input

or edit box

All the examples i came so far alow drag n drop with the help of input or edit box

We hav to drop the file in the input box to put in the list

But is it possible to create the list without input or edit box just like that of

winamp or windows media player

please help

I use autoit 3.1.1.93 beta

couldn't you use an edit box like a list box? i mean one element per line, drag and drop functionality... just lock it so that the user can't type and they won't be able to tell the difference.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

its a gud idea.

can u explain me wid a script if u dont mind

Share this post


Link to post
Share on other sites

i managed to mak read only list but is there a way to hide blinkin character

#include <GUIConstants.au3>
GUICreate("Edit box",150,150)

GUICtrlCreateEdit("Edit list",20,20,100,100,$ES_READONLY,$WS_EX_ACCEPTFILES)
GUISetState(@SW_SHOW)

do
    $msg = GUIGetMsg()
    
until $msg = $GUI_EVENT_CLOSE

Share this post


Link to post
Share on other sites

i am stupid

how can i add files if the edit box is read only

so the above code is scrap

naybody help

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

maybe like this

#Include <GUIConstants.au3
#include <File.au3>


$loc = "C:\temp\"


GUICreate("MY GUI")
$edit = GUICtrlCreateEdit("", 25, 20, 350, 350)
GUISetState()

$list = _FileListToArray($loc, "*.*", 1)

for $x = 1 to $list[0]
    GUICtrlSetData( $edit, ($list[$x]) & @CRLF, 1 )
    GUICtrlSetData( $edit, " " & @CRLF, 1)
Next
    

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    
    EndSelect
WEnd

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

@Valuater

that script throws many error as follows

1>Subscript used with non-Array variable

2>for $x = 1 to $list[0]

for $x = 1 to $list^ ERROR

thnx for trying

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

just tested it again... it works... try a different folder

maybe this

$loc = "C:\"

that worked also

tested many times

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

As i siad i m stupid

i dint hav a path c:\temp

i tried it with c:\ and worked

but u dint understand my problem

I want 2 create list by drag n drop without using edit or input box

jus lik that of winamp or WMP

thnx for helping

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

what do you want to put the list in????

i dont have winamp... but in autoit there are

combobox

listbox

listview

editbox

????

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

ok but u'll hav Windows media player

u jus drag n drop files in the playlist the same way

i.e

I want to create a list usin box using GUIctrlcreatelist

and allow drag n drop on to it

without using guictrledit or guictrlinput

I hop i mad it clear if not plz ask again wat u dint understood

Thnx anyway u r the only 1 to reply me

Share this post


Link to post
Share on other sites

nope... i couldn't get it... this is as close as i could get "visual only"

#include <GUIConstants.au3>


GUICreate("My GUI list", 400, 400, -1, -1, -1, $WS_EX_ACCEPTFILES ); will create a dialog box that when displayed is centered

$mylist=GUICtrlCreateList ("First song", 100,30,200,150);, BitOR($WS_TABSTOP, $LBS_NOTIFY), $WS_EX_ACCEPTFILES )
GUICtrlSetState(-1, $GUI_ACCEPTFILES)
;GUICtrlSetState( -1, $GUI_DROPACCEPTED)

$add_line = GUICtrlCreateInput("", 100, 179, 200, 20);, -1,  $WS_EX_ACCEPTFILES )  
GUICtrlSetState(-1, $GUI_ACCEPTFILES)
;GUICtrlSetState( -1, $GUI_DROPACCEPTED)

$close=GUICtrlCreateButton ("my closing button", 110,260,175,25)

GUISetState ()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()

    Select
         
         Case $msg = $close
            MsgBox(0,"", "the closing button has been clicked",2)
            Exit
    EndSelect
Wend

sorry... i don't know how

good luck

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I knew that one

now u'l know wat I wanted with reference 2 ur code

I wanted drag n drop in the list box GUICtrlCreateList without using the GUICtrlCreateInput box u provided below

the filename shud appear in that list box

I searched deeper into the forum but all the code uses

either input or edit box for drag n drop

I think this request should go to the developers in the next version

as I dont think it is possible with any of the commands in the

help file

Thank u very much for sparing time for me

Share this post


Link to post
Share on other sites

No problem...

i wish i could have helped more

8)


NEWHeader1.png

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