Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 09, 2016, 11:27:02 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: DropButton  (Read 3157 times)

JennyB

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 212
  • Test all things - hold fast to what is good
    • View Profile
    • Donate to Member
IDEA: DropButton
« on: January 22, 2007, 09:24:30 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.
If you don't see how it can fail -
you haven't understood it properly.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: DropButton
« Reply #1 on: January 22, 2007, 11:21:13 AM »
 :) Here's DrOpen, an AHK script I think does what you ask!
To run, save as DrOpen.ahk and install AutoHotkey.

;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
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
« Last Edit: January 22, 2007, 04:33:58 PM by skrommel »

JennyB

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 212
  • Test all things - hold fast to what is good
    • View Profile
    • Donate to Member
Re: IDEA: DropButton
« Reply #2 on: January 22, 2007, 04:26:43 PM »
:) Here's DrOpen, an AHK script I think does what you ask!
To run, save as DrOpen.ahk and install AutoHotkey.

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.


Quote
edited by jgpaiva: adding ]/quote[ tag
If you don't see how it can fail -
you haven't understood it properly.
« Last Edit: January 22, 2007, 04:40:07 PM by jgpaiva »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: DropButton
« Reply #3 on: January 22, 2007, 04:33:27 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
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.

JennyB

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 212
  • Test all things - hold fast to what is good
    • View Profile
    • Donate to Member
Re: IDEA: DropButton
« Reply #4 on: January 23, 2007, 08:54:43 AM »
Same problem. Reads the firstfilepath, ignores the second.
If you don't see how it can fail -
you haven't understood it properly.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: DropButton
« Reply #5 on: January 23, 2007, 12:27:14 PM »
 :tellme: If you just start DrOpen 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
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.