Here's an early draft.
DropFolder - Drop files on a floating icon to move or copy files to user defined folders.
Press Ctrl while dropping to copy files
Skrommel
;DropFolder.ahk
; Drop files on a floating icon to move or copy files to user defined folders
; Press Ctrl while dropping to copy files
;Skrommel
#NoEnv
#SingleInstance,Force
SetWindelay,0
paths=C:\Archive\Work,C:\Archive\Games,C:\Archive\Photos
picture=C:\Windows\Web\Wallpaper\Wind.jpg
transparency=150
x=100
y=100
w=32
h=
location=AlwaysOnTop
Gosub,MENU
OnMessage(0x112,"WM_SYSCOMMAND")
If location=AlwaysOnTop
guioptions:="+" location
If w<>
pictureoptions:="H-1 W" w
Else
pictureoptions:="W-1 H" h
Gui,Margin,0,0
Gui,% "-Caption +ToolWindow +LastFound -Resize " guioptions
guiid:=WinExist()
Gui,Add,Picture,% pictureoptions " GMOVEWINDOW",% picture
Gui,Show,% "X" x " Y" y
WinSet,Transparent,% transparency
Return
GuiDropFiles:
GetKeyState,ctrl,Control,P
where:=A_GuiControl
filecount:=A_EventInfo
guix:=A_GuiX
guiy:=A_GuiY
files:=A_GuiEvent
Menu,menu,Show
Return
MENU:
Loop,Parse,paths,`,
Menu,menu,Add,% A_LoopField,COPY
Menu,menu,Add
Menu,menu,Add,&Browse...,BROWSE
Menu,menu,Add,&Cancel,CANCEL
Return
COPY:
FileCreateDir,%A_ThisMenuItem%
If ctrl=D
Loop,Parse,files,`n
FileCopy,%A_LoopField%,%A_ThisMenuItem%
Else
Loop,Parse,files,`n
FileMove,%A_LoopField%,%A_ThisMenuItem%
Return
BROWSE:
FileSelectFolder,target,,3
If target=
Return
FileCreateDir,%target%
If ctrl=D
Loop,Parse,files,`n
FileCopy,%A_LoopField%,%target%
Else
Loop,Parse,files,`n
FileMove,%A_LoopField%,%target%
Return
CANCEL:
Return
;Stolen from SKAN at http://www.autohotkey.com/forum/topic32768.html
MOVEWINDOW:
PostMessage,0xA1,2,,,A ;WM_NCLBUTTONDOWN=0x00A1 HTCAPTION=2
Return
;Stolen from Lexicos at http://www.autohotkey.com/forum/topic18260.html
WM_SYSCOMMAND(wParam)
{
Global guiid
If (A_Gui && wParam = 0xF020) ; SC_MINIMIZE
WinRestore,ahk_id %guiid%
}
GuiClose:
ExitApp