ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: DropFolder

<< < (7/8) > >>

justice:
Would be great if skrommel updates his script with this feature and a png support.
.Net less applications are better
-apfel (February 06, 2009, 06:11 AM)
--- End quote ---
All operating systems support GIF, JPG, BMP, ICO, CUR, and ANI images. On Windows XP or later, additional image formats such as PNG, TIF, Exif, WMF, and EMF are supported. Operating systems older than XP can be given support by copying Microsoft's free GDI+ DLL into the AutoHotkey.exe folder (but in the case of a compiled script, copy the DLL into the script's folder). To download the DLL, search for the following phrase at www.microsoft.com: gdi redistributable

Due to an OS bug, animated cursors scaled to a size greater than 90x90 on Windows 95/98/Me might crash the script-autohotkey help
--- End quote ---

justice:
Added the option to quickly navigate to the folder using the context menu on the icon, also made the icon abit bigger.

--- ---;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+Justice

#NoEnv
#SingleInstance,Force
SetWindelay,0

paths=C:\temp,C:
picture=icon.jpg
transparency=150
x=100
y=100
w=64
h=64
location=AlwaysOnTop

Gosub,EXPLOREMENU
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

GuiContextMenu:
where:=A_GuiControl
filecount:=A_EventInfo
guix:=A_GuiX
guiy:=A_GuiY
files:=A_GuiEvent
Menu,Explore,Show
Return

EXPLOREMENU:
Loop,Parse,paths,`,
Menu,Explore,Add,% A_LoopField,EXPLORE
Menu,Explore,Add
Menu,Explore,Add,&Browse...,EXPLOREBROWSE
Menu,Explore,Add,&Cancel,CANCEL
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

EXPLORE:
run,%A_ThisMenuItem%
return

EXPLOREBROWSE:
FileSelectFolder,target,,3
If target=
  Return
Run,%target%
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 edit: fixed seperator

apfel:
I meant alpha-transparency support for the png's.

(How to add a seperator to the new menu?)

justice:
sorry I see what the problem is, I'll fix the code. Don't know about transparent pngs I think AHK scripts are limited by support from AHK

apfel:
Hm, small false behavior. When I drop a Folder on the icon only the content of the folder is moved, but not the folder to the new destination.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version