Ripper Posted December 20, 2005 Share Posted December 20, 2005 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 Link to comment Share on other sites More sharing options...
seandisanti Posted December 20, 2005 Share Posted December 20, 2005 HiI'm a new user to autoit.I hav read through the doc of autoit but dint find a solnneither in the forums.I want to create a list with drag n drop support but without the need of an inputor edit boxAll the examples i came so far alow drag n drop with the help of input or edit boxWe hav to drop the file in the input box to put in the listBut is it possible to create the list without input or edit box just like that of winamp or windows media playerplease helpI use autoit 3.1.1.93 betacouldn'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. Link to comment Share on other sites More sharing options...
Ripper Posted December 21, 2005 Author Share Posted December 21, 2005 its a gud idea. can u explain me wid a script if u dont mind Link to comment Share on other sites More sharing options...
Ripper Posted December 21, 2005 Author Share Posted December 21, 2005 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 Link to comment Share on other sites More sharing options...
Ripper Posted December 21, 2005 Author Share Posted December 21, 2005 i am stupid how can i add files if the edit box is read only so the above code is scrap naybody help Link to comment Share on other sites More sharing options...
Valuater Posted December 21, 2005 Share Posted December 21, 2005 (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 December 21, 2005 by Valuater Link to comment Share on other sites More sharing options...
Ripper Posted December 21, 2005 Author Share Posted December 21, 2005 @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 Link to comment Share on other sites More sharing options...
Valuater Posted December 21, 2005 Share Posted December 21, 2005 (edited) just tested it again... it works... try a different folder maybe this $loc = "C:\" that worked also tested many times 8) Edited December 21, 2005 by Valuater Link to comment Share on other sites More sharing options...
Ripper Posted December 21, 2005 Author Share Posted December 21, 2005 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 Link to comment Share on other sites More sharing options...
Valuater Posted December 21, 2005 Share Posted December 21, 2005 (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 December 21, 2005 by Valuater Link to comment Share on other sites More sharing options...
Ripper Posted December 21, 2005 Author Share Posted December 21, 2005 ok but u'll hav Windows media playeru jus drag n drop files in the playlist the same wayi.eI want to create a list usin box using GUIctrlcreatelistand allow drag n drop on to it without using guictrledit or guictrlinputI hop i mad it clear if not plz ask again wat u dint understoodThnx anyway u r the only 1 to reply me Link to comment Share on other sites More sharing options...
Valuater Posted December 21, 2005 Share Posted December 21, 2005 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) Link to comment Share on other sites More sharing options...
Ripper Posted December 21, 2005 Author Share Posted December 21, 2005 I knew that onenow u'l know wat I wanted with reference 2 ur codeI wanted drag n drop in the list box GUICtrlCreateList without using the GUICtrlCreateInput box u provided belowthe filename shud appear in that list boxI searched deeper into the forum but all the code useseither input or edit box for drag n dropI think this request should go to the developers in the next versionas I dont think it is possible with any of the commands in thehelp fileThank u very much for sparing time for me Link to comment Share on other sites More sharing options...
Valuater Posted December 21, 2005 Share Posted December 21, 2005 No problem... i wish i could have helped more 8) Link to comment Share on other sites More sharing options...
Valuater Posted December 21, 2005 Share Posted December 21, 2005 take a look herehttp://www.autoitscript.com/forum/index.ph...opic=19355&hl=#8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now