topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Wednesday December 11, 2024, 3:22 am
  • Proudly celebrating 15+ 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: DONE: Hotkey copy filename then append it to a URL in clipboard for pasting  (Read 13008 times)

XpFMk

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
First off, I'd be very grateful to anyone who may do this. I've tried to read up some about how to do this using AHK but don't know where to begin.

What it would do: You select a file and press a hotkey (left winkey & C would be nice) it then copies the filename eg: image.jpg to clipboard and prefixes a set url to it.
End result would hopefully be hxxp://examplewebsite.info/image.jpg that you could use the normal ctrl+v to paste into an IM window.
It would be very nice for those who have a little web server off a home computer and send links to friends/family very often. It saves quite a bit of time in the long run. In the past year I've taken over 3,800 screenshots and linked every single one of them by typing out the full url and file name by hand.
Preferably in .ahk rather than .exe so the url can be easily edited.

I truly thank you for your time.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Here you go.  Adjust as necessary.

Code: Autohotkey [Select]
  1. #c::
  2. {
  3.     SendInput, ^c ; Copy image path to clipboard.
  4.     SplitPath, Clipboard, myFileName ; Get filename from the path.
  5.     Clipboard := "http://www.site.com/" . myFileName ; Concatenate string and copy it to the clipboard.
  6. }
  7. Return
« Last Edit: July 31, 2010, 11:22 PM by skwire »

XpFMk

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Thank you very much   :)