• Become a Power user Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2

Hotkeys for Pasting Images

Hotkeys for Pasting Images

A client wanted an easy way use a Hotkey for pasting images.  I remembered a script I worked on a while back that took an image and shoved it on the clipboard.  I borrowed from it and created this little gem which makes it super easy to have a hotkey to paste an image.  I went through and grabbed all of the functions used from the GDIP library so this is self-contained (and only 242 lines!)

Watch the video below

Hotkeys for Pasting Images: Easily paste images with this tool

The video covers various topics including the US government’s plan to invest $2 trillion in infrastructure, a new gdi library, SpaceX’s successful launch, and tips for keyboard shortcuts to improve efficiency.

  • 00:00 📰 Automate pasting pictures with a script that updates the function call to back up the clipboard.
  • 00:37 👨‍💻 A new gdi library was created with only 242 lines of code.
    • The speaker created a gdi library with only the necessary 242 lines of code.
  • 01:00 📰 The script creates a bitmap from a file path and uses a magic sauce to complete the task.
  • 01:20 🚀 Use the clipboard function to send and wait before restoring the clipboard to avoid pasting the wrong content.
  • 01:38 📚 Despite lacking technical knowledge, the speaker acknowledges the expertise of others in the field of webinars and podcasts.
    • The speaker admits to not understanding certain technical aspects of webinars and podcasts, comparing themselves to a driver while acknowledging the expertise of others in the field.
  • 02:02 🔑 Set up a hotkey to quickly reload scripts.
    • The speaker demonstrated how to set up a hotkey to reload a script quickly.
  • 02:23 💻 Learn how to quickly copy and paste file paths using keyboard shortcuts.
    • The speaker demonstrated how to copy and paste a file path using keyboard shortcuts.
  • 03:02 📋 Create a hotkey to easily paste images and their file paths for efficient uploading to social media or other platforms.
    • Create a hotkey to easily paste images and their file paths, which is useful for uploading to social media or other platforms.


hey it’s Joe glines and the other day i have a client who was working on something and she said she ends up pasting pictures in a lot of different places and could we do something to automate pasting pictures and so i remembered the script i wrote a while ago and i thought hey let’s bring that back a bit let’s make a little simpler too let’s jump into the code here i borrowed let’s see where’s down here this thishockey forum post where you could take an image and shove it into
your clipboard and what i did was i just kind of updated my function call here to say hey there’s first let’s back up our clipboard right always nice to do instead of overwriting the clipboard next we’re going to create the gdi now the other thing i should mention here is i took before when i made this i just included the gdi library and which has like 3 000 lines and so i said you know what i’m going to go through and painstakingly i might add go through and pull out just what we need so in this script if we
scroll to the bottom here you’ll see there’s it’s 242 lines currently i flattened a lot of stuff but this is everything you need which is nice it’s not you know you don’t have to include the library so this is a fully contained script that started up and then i actually flattened this one where we had two calls now we’re creating this h bit map from this gdi this other bitmap from the file path getting rid of after you should do that you can get rid of this clean that up then now here this is the magic sauce
right we set the clipboard that’s this function here which again if you care to go look at it i’ll try to remember to put that in the description but you’ll have this in the script if you download it so and then sending the paste and of course after you send a paste wait a bit because if you restore the clipboard too fast you’ll actually get was you’ll you’ll paste what was originally there and it’s really a screw-up yeah so i’m not going to go through the rest because honestly again i don’t understand it
right like some of these things in here they’re voodoo to me and it’s more because i’ve never really looked at it because i don’t care you know in a webinar or a podcast the other day jack and i were talking through stuff and i said you’re you’re the mechanic like you you study the engine you know and understand all the nicks and crannies of what every little thing does i’m like i’m the driver like i can turn the steering wheel and drive well meaning i don’t get in the nitty-gritty stuff
right it’s it’s why he’s a much better programmer than i am but you know i’m we both get the job done right so i borrow people’s stuff a lot more and just get back to work so here now we’re showing here thisthis will reload the script but you don’t need that let me comment that out down here control 1 right i set up a Hotkey to say hey anytime i hit control 1 take this path to this file and shove it into the clipboard and then paste it so let’s bring in i’m going to launch that and let’s bring over a blank
word doc if i hit actually hold on let’s say so i’m going to copy that to the-Automator has the original stuff right and if i get rid of all that and hit ctrl 2 it’s going to paste in this other picture so see you can see all you have to do is you know create a newHotkey shoving the path to the pictureand then justthat’s it i mean it’s that simple right
so control one grabs the first one control two grabs the second one and of cAutose the Hotkey is whatever you want but this this function right here image clip it grabs everything else so what’s nice is all you got to do is this right in order you know make sure you have this in your file but update theHotkey update this and you’re good to go so hope it helps youif you do paste a lot of images this is a great one of course you don’t have to you could just set it to go into your clipboard and then decide what you want
to do with it later i thought about saying let’s try to send the pace but also store the path of the file in the clipboard and that way in case the paste actually doesn’t take you already have the path to the file so that’s very simple to paste the path into the file which if you’re uploading like to facebook or something like that that’s a really great easy way to do this but what i’ve found is a lot of tools now even facebook you can paste in a picture directly into wherever you’re
going you don’t actually have to paste the path you know click upload file and do all that stuff it’s the same thing soyou know your mileage may vary just pinch how you want to go hope that helps and if you can please like this video helps me out a lot cheers have a great day

Comments are closed.