ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

DONE: pastebin.com text uploader

(1/2) > >>

brotherS:
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? :)

skrommel:
:) 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

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

ps.
skrommel it's not on your 1 hour software page.

brotherS:
Wow, thanks a lot! Great work, again! :)

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 :D


--- ---; https://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

skrommel:
 :tellme: @mouser:  it's not on your 1 hour software page
--- End quote ---
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

Navigation

[0] Message Index

[#] Next page

Go to full version