DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: SOLVED: Attach or upload to FTP utility  (Read 9,885 times)

huismus

  • Participant
  • Joined in 2012
  • *
  • Posts: 7
SOLVED: Attach or upload to FTP utility
« on: October 01, 2012, 06:31 AM »
Hello everyone,

I recently moved abroad and email is a huge part of staying in touch with friends and family back home. I'd like to more efficiently upload pictures (and other files) to them. I use AHK to create some keyboad shortcuts, but nothing you could call "programming". From searching the forum, I know that most components I think are needed to create this utility are available, but I have no idea how to put it together.

So here goes... The "Attach or upload to FTP utility" should do the following:
Whenever I drag and drop a file onto a MS Outlook message window, a window should pop-up giving me two options:
1. Upload file to FTP
2. Attach to email
If I choose 2, the file gets attached and nothing else happens.
If I choose 1, the following happens:
- A small FTP browser window opens a pre-determined FTP site
- I can browse to a desired folder or create a new one
- By clicking "upload", the file gets uploaded, and a link to the folder (i.e. the location of the file) gets pasted into the message body

That's it! Nice additions to this functionality would be:
- Drag and drop multiple files onto the MS Outlook message window
- A threshold for minimum filesize (so the utility doesn't pop up for small files)
- Checking the "To" field of the message to determine if the utility should pop-up (so you only send FTP uploaded attachment mails to recipients with FTP access).

I'm looking forward to your ideas!

Huismus
« Last Edit: October 01, 2012, 06:40 AM by huismus »

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Attach or upload to FTP utility
« Reply #1 on: October 05, 2012, 06:44 AM »
Welcome to the site, huismus.  The biggest obstacle in your idea is almost certainly going to be trying to capture that drag & drop event.  Personally, I don't think it can be done elegantly from outside of MS Outlook.

huismus

  • Participant
  • Joined in 2012
  • *
  • Posts: 7
Re: IDEA: Attach or upload to FTP utility
« Reply #2 on: October 12, 2012, 09:05 AM »
Thanks for the reply Skwire. I've been trial-and-erroring a lot with the drag-and-drop issue. I came up with the following workaround:
Quote
~LButton::
    KeyWait, LButton, T0.5
    if ErrorLevel ; timed-out (Button is not yet released after more then 0,5 s.)
{
Keywait,Lbutton ; Watch for buttonrelease
Sleep, 100 ; Wait for the message window to become active after drop (this might be unnescessary)
WinGetActiveTitle, Title
IfInString, Title, Message ; Check if active window is an outlookmessage
        MsgBox This is where an FTP GUI should appear
}
return

(Thanks to Lexikos)

I then found that this would also trigger when the message window was being dragged or resized. That's why I added a WinGetActiveTitle comparison as follows:
Quote
~LButton::
    KeyWait, LButton, T0.5
    if ErrorLevel ; timed-out (Button is not yet released after more then 0,5 s.)
{
WinGetActiveTitle, Prev_Title
Keywait,Lbutton ; Watch for buttonrelease
Sleep, 100 ; Wait for the message window to become active after drop (this might be unnescessary)
WinGetActiveTitle, Title
IfEqual Title, %Prev_Title%
Return
IfInString, Title, Message ; Check if active window is an outlookmessage
        MsgBox This is where an FTP GUI should appear
}
return

Now, this is just a workaround... It'd be great if I could somehow "see" there's a file hanging on the tip of the mousepointer. Especially if I want to drag&drop multiple files onto the message window. I appreciate any input you might have

huismus

  • Participant
  • Joined in 2012
  • *
  • Posts: 7
Re: IDEA: Attach or upload to FTP utility
« Reply #3 on: November 09, 2012, 09:32 AM »
I found a solution in OutDisk FTP

Which does what I want, in a slightly different way.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Attach or upload to FTP utility
« Reply #4 on: November 09, 2012, 02:59 PM »
Very nice.  Thanks for reporting back.    :Thmbsup:

wr975

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 369
    • Coding Snacks
Re: SOLVED: Attach or upload to FTP utility
« Reply #5 on: January 11, 2013, 09:40 AM »
A little late, but perhaps someone will find it useful.

Nowadays I just use Dropbox to exchange files with family/friends.

But before Dropbox I used "DropUpload". It allows to create "locked" versions of itself. Start the tool, drag files on it and they'll get uploaded to your FTP. Very easy for family or friends to upload files to your server.

dropuploadeng.gif

Original address: https://www.donationcoder.com/forum/index.php?topic=32393.0