DonationCoder.com Forum

DonationCoder.com Software => Coding Snacks => Post New Requests Here => Topic started by: JennyB on January 22, 2007, 09:24 AM

Title: IDEA: DropButton
Post by: JennyB on January 22, 2007, 09:24 AM
This is Drag and Drop Robot for non-power users.
It gets invoked by in association with a batch file.

Shows a stay-on-top icon with the file name as title.
Executes the file whenever a suitable item is dropped on it.
Goes away when you click it.

That's all.
Title: Re: IDEA: DropButton
Post by: skrommel on January 22, 2007, 11:21 AM
 :) Here's DrOpen, an AHK script I think does what you ask!
To run, save as DrOpen.ahk and install AutoHotkey (http://www.autohotkey.com).

;DrOpen.ahk
; Drop files on a window to open the files in an associated program.
; Syntax: DrOpen "<command>"
; Example: DrOpen "c:\windows\notepad.exe"
;Skrommel @2007

xpos:=100
ypos:=0
width:=100
height:=0

#NoEnv
#SingleInstance,Off

SplitPath,1,name,dir,ext,name_no_ext,drive
Gui,+ToolWindow +AlwaysOnTop
Gui,Show,x%xpos% y%ypos% w%width% h%height%,%name_no_ext%
Return

GuiDropFiles:
ToolTip,%A_GuiControl%
Loop, parse, A_GuiControlEvent, `n
  Run,%1% %A_LoopField%
Return

GuiClose:
ExitApp
Title: Re: IDEA: DropButton
Post by: JennyB on January 22, 2007, 04:26 PM
:) Here's DrOpen, an AHK script I think does what you ask!
To run, save as DrOpen.ahk and install AutoHotkey (http://www.autohotkey.com).

How exactly are you invoking this?  I tested in a FARR alias "filepath1/DroPen.ahk filepath2/command" and it seems to read its own filepath1 and ignore filepath2. I get a window with the title "DroPen.ahk" when it should be the name of the command.


edited by jgpaiva: adding ]/quote[ tag
Title: Re: IDEA: DropButton
Post by: skrommel on January 22, 2007, 04:33 PM
 :tellme: Try creating a shortcut to DrOpen, right click it and select properties, and add the path to the program you want to run. You might want to enclose the path in "s.

Skrommel

;DrOpen.ahk
; Drop files on a window to open the files in an associated program.
; Syntax: DrOpen "<command>"
; Example: DrOpen "c:\windows\notepad.exe"
;Skrommel @2007
Title: Re: IDEA: DropButton
Post by: JennyB on January 23, 2007, 08:54 AM
Same problem. Reads the firstfilepath, ignores the second.
Title: Re: IDEA: DropButton
Post by: skrommel on January 23, 2007, 12:27 PM
 :tellme: If you just start DrOpen  (http://www.1HourSoftware.com) without any parameters, it will show a window with DrOpen, and start any dropped file in the associated application.

Anyone else get the same result as JennyB?

Skrommel