Welcome Guest.   Make a donation to an author on the site September 02, 2014, 12:01:25 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2012! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: pastebin.com text uploader  (Read 14157 times)
brotherS
Master of Good Ideas
Honorary Member
**
Posts: 2,105


To make a difference, be different.

View Profile Give some DonationCredits to this forum member
« on: March 16, 2006, 03:04:24 PM »

Hi,

I just thought that it would be helpful to have a little script upload the text you have in the clipbaord to http://pastebin.com/ - it 'just' needs to set the syntax highlighting to "No", paste the text, click the Send button (no need for a name) and retrieve the resulting URL, which it could copy to the clipboard then.

Being able to trigger that all with a hotkey would possibly be the best solution.

Anyone willing/able to do it? smiley

« Last Edit: March 17, 2006, 01:47:47 PM by brotherS » Logged

Thank you.
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: March 16, 2006, 08:08:44 PM »

smiley This turned out to be a bit more complicated than I had thought, but here's it is!

PasteBinPost - Press Win+S to post your clipboard contents to PasteBin.com and return the URL.

Features:
- Press Win+S to post.
- Option to change the hotkey.



You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel
« Last Edit: April 21, 2006, 07:31:16 PM by skrommel » Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
mouser
First Author
Administrator
*****
Posts: 33,294



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: March 17, 2006, 05:07:35 AM »

im about to test this - it woudl be extremely useful.

ps.
skrommel it's not on your 1 hour software page.
Logged
brotherS
Master of Good Ideas
Honorary Member
**
Posts: 2,105


To make a difference, be different.

View Profile Give some DonationCredits to this forum member
« Reply #3 on: March 17, 2006, 06:39:24 AM »

Wow, thanks a lot! Great work, again! smiley

I modified it slightly so it could be added to the main AHK script, and now you could use ESC to close the GUI showing the URL - I'm a keyboard user cheesy

[copy or print]
; http://www.donationcoder.com/forum/index.php?topic=2811.new;topicseen#new
; PasteBinPost.ahk
; Press Win+S to post your clipboard contents to PasteBin.com and return the URL
;Installation:
; Download and install AutoHotkey from http://www.autohotkey.com
; Add this code to your script by right-clicking the tray icon --> Edit This Script
; Then save and --> Reload This Script
; Download WGet.exe from http://users.ugent.be/~bpuype/wget/#download
;Skrommel @2006

;#SingleInstance,Force
;SetBatchLines,-1
;SetFormat,Integer,Hex
;Return

#s::  ;Hotkey Win+S
SetBatchLines,-1
SetFormat,Integer,Hex
TrayTip,PasteBinPost,Posting to PasteBin.com...
in:=Clipboard
out=
Loop,Parse,in
{
  Transform,char,Asc,%A_LoopField%
  StringRight,char,char,2
  out=%out%`%%char%
}
StringReplace,out,out,x,0,All

time:=A_Now
RunWait,WGET.exe --directory-prefix=%time%/ --post-data 'parent_pid=&format=text&code2=%out%&poster=&paste=Send' http://pastebin.com/
Loop,%time%\*.*
  file:=A_LoopFileName
Gui,Add,Edit,,http://pastebin.com/%file%
Gui,Add,Button,GCOPY,&Copy
Gui,Show,,PasteBinPost
TrayTip,
Return

COPY:
Gui,Submit
Clipboard=http://pastebin.com/%file%

GuiEscape:
GuiClose:
FileRemoveDir,%time%,1
Gui, Destroy
Return
Logged

Thank you.
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: March 17, 2006, 11:51:20 AM »

 tellme @mouser: 
Quote
it's not on your 1 hour software page
I didn't think it would have general interest...

@brotherS: Watch that SetFormat command, it can disrupt the rest of your script.

Maybe a generic post utility is needed?

But getting the proper post parameters could be a problem... Either the html page must be parsed, or a test post must be intercepted... I used the latter for PasteBinPost, but automating it is a different matter...

Skrommel
« Last Edit: March 17, 2006, 11:56:02 AM by skrommel » Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
brotherS
Master of Good Ideas
Honorary Member
**
Posts: 2,105


To make a difference, be different.

View Profile Give some DonationCredits to this forum member
« Reply #5 on: March 17, 2006, 01:16:21 PM »

@brotherS: Watch that SetFormat command, it can disrupt the rest of your script.
Oh, could there be a problem? I thought it was save when I read this:

Quote
Every newly launched thread (such as a hotkey, custom menu item, or timed subroutine) starts off fresh with the default setting for [SetFormat]
Logged

Thank you.
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: March 17, 2006, 03:11:03 PM »

 embarassed Sorry! I never argue with Chris!

Skrommel
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: April 21, 2006, 07:32:23 PM »

 smiley Finally uploaded a compiled version of PasteBinPost!

Skrommel
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
CrawlerBrinx
Participant
*
Posts: 17

View Profile Give some DonationCredits to this forum member
« Reply #8 on: October 08, 2012, 03:59:49 AM »

Should it work out of box or it needs some settings first? It doesn't work for me:
whenever I hit Win+S I get a prompt with the following text:
[copy or print]
200 OK
Server: nginx
Date: Mon, 08 Oct 2012 08:57:01 GMT
Content-Type: text/html; charset=utf-8
As far as I understand - instead of this text I should get just an URL, and I don't get it.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.04s | Server load: 0.12 ]