Dr7 Posted February 22, 2012 Share Posted February 22, 2012 Hey guys, I'm quite new to AutoIt and I want to code a simple script for files. I want to drag files with my mouse from the desktop/a folder and drop them in the programm on a list. The list should add the filenames as a item. Now I would like if someone could tell me with what functions I could do this. Thats all I guess for now. best regards. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 22, 2012 Moderators Share Posted February 22, 2012 Hi, Dr7, welcome to the forums. Check out the functions GUICreate, GUICreateList, and the GUI Control Styles page in the helpfile (specifically, $WS_EX_ACCEPTFILES). This is real quick, but should nudge you in the right direction. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $msg GUICreate("My Drag 'N Drop GUI", 200, 200) $mylist = GUICtrlCreateList("My List", 10, 10, 100, 100, Default, $WS_EX_ACCEPTFILES) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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