Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[AHK 1.1] Upload a screen capture to Imgur


  • Please log in to reply
15 replies to this topic
maestrith
  • Members
  • 786 posts
  • Last active: Mar 14 2019 12:36 PM
  • Joined: 17 Sep 2005

This script requires an imgur api.  You can sign up for an imgur api here

 

To use this script: 
1. Right click on the systray icon and then click on "Grab" 
2. Left click and drag around what you want captured 
    a. Left click and move the selection if you need to adjust it
    b. Right click and drag to resize the selection.

 

 

or click here to see the code

Raw Link here

Let me know what you think.

 

Code requested by ozzii:

A small box will appear and you can drag your files (one at a time) and it will upload them.  If you place the script in the same directory you will not have to add your API code again.

 

Download the DropSend Script here



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Amazing. Works flawlessly.
Another thing I was looking for in the last few days . You are making some amazing uses of HttpRequest.
What's next ?? grin.png


Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


maestrith
  • Members
  • 786 posts
  • Last active: Mar 14 2019 12:36 PM
  • Joined: 17 Sep 2005

Amazing. Works flawlessly.
Another thing I was looking for in the last few days . You are making some amazing uses of HttpRequest.
What's next ?? 

LOL.

Well, I am not completely sure...I am working on adding some features to my AHK Studio beta...other than that I am not too sure.  Thank you for the kind words.



iDrug
  • Members
  • 389 posts
  • Last active: Oct 11 2015 09:24 PM
  • Joined: 13 Oct 2009
Code?

maestrith
  • Members
  • 786 posts
  • Last active: Mar 14 2019 12:36 PM
  • Joined: 17 Sep 2005

Code?

The code should be at the top of the page as a Gist.  If you do not see it try to refresh the page.  it sometimes messes up.  If you still can not see it let me know.



Rijul Ahuja
  • Members
  • 763 posts
  • Last active: Nov 25 2013 10:16 AM
  • Joined: 14 Mar 2012

A raw link for anyone who can't see it. Sometimes, ad blockers cause problems.


Abandon the forum. The community has decided in a democratic vote to leave this website because of inactive and perverse administration.

Very few of the contributing members remain here.


maestrith
  • Members
  • 786 posts
  • Last active: Mar 14 2019 12:36 PM
  • Joined: 17 Sep 2005

A raw link for anyone who can't see it. Sometimes, ad blockers cause problems.

Added a link Also in the main post and also added a raw link as well :)



iDrug
  • Members
  • 389 posts
  • Last active: Oct 11 2015 09:24 PM
  • Joined: 13 Oct 2009
Strange, but earlier I didn't see the links. But now I do.
maestrith,
1. your code is comentless, that's not so awesome for learning users like me. Please, do leave comments in the code.
2. In your "how to use script" guide you forgot to write step 3: hit Ctrl+F1.
3. Your code is not optimized (it uses *.bmp instead of a cheaper *.png, it saves the screenshot of the whole screen to the file, instead of just the specific area), yet still works.

Thanks for that script, gonna steal the ComObj part into my own script.
You seem to know ComObj and httpRequests, could you tell - is that possible to not save a bitmap to a file before sending it to the server?

maestrith
  • Members
  • 786 posts
  • Last active: Mar 14 2019 12:36 PM
  • Joined: 17 Sep 2005

Strange, but earlier I didn't see the links. But now I do.
maestrith,
1. your code is comentless, that's not so awesome for learning users like me. Please, do leave comments in the code.
2. In your "how to use script" guide you forgot to write step 3: hit Ctrl+F1.
3. Your code is not optimized (it uses *.bmp instead of a cheaper *.png, it saves the screenshot of the whole screen to the file, instead of just the specific area), yet still works.

Thanks for that script, gonna steal the ComObj part into my own script.
You seem to know ComObj and httpRequests, could you tell - is that possible to not save a bitmap to a file before sending it to the server?

1. Yea, I do not comment...sorry, but I am more than happy to answer any question that you may have.

2. I will have to update that at some point.

3. The file that is saved is just a temporary file.  It actually converts it to a JPG file with a quality value of 85.

 

Take what you like :) I do not require any mention but they are always appreciated :)

I was not able to get it working without the temporary file, but I did not have as much time to devote to it as usual.  I am currently working on another project (the Basic GUI Creator that is in my signature)



ozzii
  • Members
  • 167 posts
  • Last active: Oct 30 2015 04:54 PM
  • Joined: 23 Mar 2011

What about having an option when I drop a png on the exe the script send it to Imgur.

I prefer to use my snapshot app.

Or maybe if you can just do this little modification for me, and post it here ?



maestrith
  • Members
  • 786 posts
  • Last active: Mar 14 2019 12:36 PM
  • Joined: 17 Sep 2005

Code requested by ozzii:

A small box will appear and you can drag your files (one at a time) and it will upload them.  If you place the script in the same directory you will not have to add your API code again.

 

Download the DropSend Script here



ozzii
  • Members
  • 167 posts
  • Last active: Oct 30 2015 04:54 PM
  • Joined: 23 Mar 2011

Thanks a lot maestrith



iDrug
  • Members
  • 389 posts
  • Last active: Oct 11 2015 09:24 PM
  • Joined: 13 Oct 2009
ozzii,
thanks for a nice request! added that to my script too.

maestrith,
you gave me an even more awesome and sick idea! The idea is to let the user draw a rectangle (like he's going to screenshot that area) and let him drag'n'drop files there.

p.s.: why does your code has m() function? it's not used anywhere.

maestrith
  • Members
  • 786 posts
  • Last active: Mar 14 2019 12:36 PM
  • Joined: 17 Sep 2005

ozzii,
thanks for a nice request! added that to my script too.

maestrith,
you gave me an even more awesome and sick idea! The idea is to let the user draw a rectangle (like he's going to screenshot that area) and let him drag'n'drop files there.
p.s.: why does your code has m() function? it's not used anywhere.

 

the m() function is just a msgbox function m("this is a msgbox) but if you place commas inside m(myvar1,myvar2,myvar3) it separates the msgbox into lines.  it is my debugging function.  makes it WAY easier than trying to type in msgbox,%myvar1%`n%myvar2%`n%myvar3%...etc

Thanks a lot maestrith

Not a problem.  it has issues uploading large files though.  I am going to see if I can fix that.



iDrug
  • Members
  • 389 posts
  • Last active: Oct 11 2015 09:24 PM
  • Joined: 13 Oct 2009
nvm