Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Drag&Drop and List


  • Please log in to reply
1 reply to this topic

#1 Dr7

Dr7

    Seeker

  • New Members
  • 1 posts

Posted 22 February 2012 - 06:26 PM

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.







#2 JLogan3o13

JLogan3o13

    115 and holding

  • MVPs
  • 3,502 posts

Posted 22 February 2012 - 06:56 PM

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()

Programming is like sex...one mistake and you have to support it for a lifetime.

My Scripts:Include Source with Compiled Script, Disk Maintenance for Windows XP, "Deal-A-Day" Sites, Windows Firewall UDF





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users