What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [WIP] Pastebin for Messenger Plus!

Pages: (3): « First [ 1 ] 2 3 » Last »
[WIP] Pastebin for Messenger Plus!
Author: Message:
Horseboy
Junior Member
**

Avatar
You can run and tell THAT - Horseboy

Posts: 40
Joined: Apr 2011
O.P. [WIP] Pastebin for Messenger Plus!
Pastebin for Messenger Plus!
Easily post code to Pastebin!

[Image: 2011-04-15_1315.png]

The Pastebin for Messenger Plus! script will allow you to easily paste long code/long text to Pastebin's free service using the new version of their API. Simply type "/paste" in a chat window, type the title of the paste, the type of code (almost 150 languages supported!) and then what you want to paste.

Features:
  • Type "/paste" in a chat window, fill in paste details, it'll paste it and copy the link to your chat window.
  • Change almost everything; name of the paste, programming language and much more!


Roadmap:
  • Post pastes using your account, easy but I'm not going to implement it yet.
  • Allow more configuration via an editable txt file.

If you have any suggestions on what I should add, feel free to make a post on this thread :)

This post was edited on 04-15-2011 at 12:17 PM by Horseboy.
Amateur Script Developer.
Current project(s) - TooLong Script
04-13-2011 01:01 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [WIP] Pastebin for Messenger Plus!
quote:
Originally posted by Horseboy
Pastebin for Messenger Plus!
Easily post code to Pastebin!


The Pastebin for Messenger Plus! script will allow you to easily paste long code/long text to Pastebin's free service using the new version of their API. Simply type "/paste" in a chat window, type the title of the paste, the type of code (almost 150 languages supported!) and then what you want to paste. Screenshots coming soon!

Features:
  • Type "/paste" in a chat window, fill in paste details, it'll paste it and copy the link to your chat window.
  • Type "/pquick" followed by text to paste it on-the-fly without changing parameters. Pastes in plain text by default.

If you have any suggestions on what I should add, feel free to make a post on this thread :)
You're going to run into a problem where Messenger Plus! will create a text file of the data and send it when it is too large.

You could consider trying to catch the paste event.
04-13-2011 06:01 PM
Profile E-Mail PM Find Quote Report
Horseboy
Junior Member
**

Avatar
You can run and tell THAT - Horseboy

Posts: 40
Joined: Apr 2011
O.P. RE: RE: [WIP] Pastebin for Messenger Plus!
quote:
Originally posted by matty
quote:
Originally posted by Horseboy
Pastebin for Messenger Plus!
Easily post code to Pastebin!


The Pastebin for Messenger Plus! script will allow you to easily paste long code/long text to Pastebin's free service using the new version of their API. Simply type "/paste" in a chat window, type the title of the paste, the type of code (almost 150 languages supported!) and then what you want to paste. Screenshots coming soon!

Features:
  • Type "/paste" in a chat window, fill in paste details, it'll paste it and copy the link to your chat window.
  • Type "/pquick" followed by text to paste it on-the-fly without changing parameters. Pastes in plain text by default.

If you have any suggestions on what I should add, feel free to make a post on this thread :)
You're going to run into a problem where Messenger Plus! will create a text file of the data and send it when it is too large.

You could consider trying to catch the paste event.

Sorry, could you explain that again? :/

Oh, do you mean when I said I'td paste it? I plan to  make it put the URL in the text box using

code:
return sMessage.replace(Output);

Output is the variable which contains the API response (which should be http://pastebin.com/0000000 if it runs properly).

This post was edited on 04-13-2011 at 06:21 PM by Horseboy.
Amateur Script Developer.
Current project(s) - TooLong Script
04-13-2011 06:11 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [WIP] Pastebin for Messenger Plus!
No no, if you paste a large amount of data Messenger Plus! automatically puts it in a text file and sends the file. This is the problem you will run into.
04-13-2011 06:32 PM
Profile E-Mail PM Find Quote Report
Horseboy
Junior Member
**

Avatar
You can run and tell THAT - Horseboy

Posts: 40
Joined: Apr 2011
O.P. RE: [WIP] Pastebin for Messenger Plus!
I'm not sure what you mean, so I'll explain it more clearly. What it will do is, there'll be a window and a text box for you to paste/write things in. After you've completed that part you name your paste, what type of code it is etc. After that, it'll do a POST request to pastebin's API with that information and it'll then paste the resulting link into the text box. If that's what you're referring to, please tell me how to fix whatever problem I'll encounter.
Amateur Script Developer.
Current project(s) - TooLong Script
04-13-2011 06:45 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [WIP] Pastebin for Messenger Plus!
quote:
Originally posted by Horseboy
I'm not sure what you mean, so I'll explain it more clearly. What it will do is, there'll be a window and a text box for you to paste/write things in. After you've completed that part you name your paste, what type of code it is etc. After that, it'll do a POST request to pastebin's API with that information and it'll then paste the resulting link into the text box. If that's what you're referring to, please tell me how to fix whatever problem I'll encounter.
Ok that makes more sense. I thought the script would have you type /paste <blob of text> but if you open a window then that is good.
04-13-2011 06:58 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [WIP] Pastebin for Messenger Plus!
quote:
Originally posted by matty
Ok that makes more sense. I thought the script would have you type /paste <blob of text> but if you open a window then that is good.

Would Plus! still send the data as a txt file if it's a command? That would sound like a bug to me... :s

eg. /paste <blob of text>
<Eljay> "Problems encountered: shit blew up" :zippy:
04-13-2011 07:35 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [WIP] Pastebin for Messenger Plus!
quote:
Originally posted by Spunky
Would Plus! still send the data as a txt file if it's a command? That would sound like a bug to me... :s

eg. /paste <blob of text>
If I am not mistaken the moment you paste an excessive amount of large text it automatically sends it as a file to the contact. I would have to check but not at home obviously.
04-13-2011 07:56 PM
Profile E-Mail PM Find Quote Report
prashker
Veteran Member
*****


Posts: 5109
Reputation: 104
– / Male / –
Joined: Mar 2005
Status: Away
RE: [WIP] Pastebin for Messenger Plus!
quote:
Originally posted by matty
Ok that makes more sense. I thought the script would have you type /paste <blob of text> but if you open a window then that is good.

The option is disable-able, but the actual limit the text box can hold will still apply (truncating the paste if it passes the limit).
04-13-2011 08:07 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [WIP] Pastebin for Messenger Plus!
What happens when you paste a large amount of text (and "Improve pasting operations for large text" is enabled) depends on if you already have typed something in the typing area or not:

- If the typing area is empty: the pasted blob will be send as a text file. No parsing is done on the pasted blob, not even if it starts with a command or if it contains tags or whatever.

- If the typing area is not empty: the pasted blob will be pasted at the cursor's location. It will be cropped to the maximum allowed amount of characters in the typing area (depends on your status and the Plus! setting "increase max size of messages you can send") minus what was already in the edit box.

eg: If the text "hello world" was entered in the edit box, and the cursor is at the space and you paste a massive amount of text, the output will be: "helloblobblobblobblobblobblob<...>blo World"

quote:
Originally posted by Spunky
Would Plus! still send the data as a txt file if it's a command? That would sound like a bug to me... :s
Depends on how you look at it I think. Imho it would be a bug if it does parse the blob in that case*.
Because if you paste a large amount of text, it is safely to assume imho that it wasn't meant to be a command but rather a copy of a document. If that document happens to start with a "/" and then the blob was parsed it would result in an error message (or even unexpected results). So, not good in that case.

*not to mention how large needs the internal buffers be then that Plus! uses to handle commands etc? You could well paste 200MB worth of text or more or whatever....The internal buffers would be rediculus big and parsing would be dead slow, scripts would choke, etc... probably resulting in a complete freeze of Messenger for a long while.


------------------


So, knowing this, the feature of this script is a bit redundant imho (not completely though. But it might not be as usefull as it seems to be at first sight).

Because if the text you want to paste to your contact is small enough to fit in the typing area, then there is not much reason to first copy it to pastebin, then send a link back. Simply send it directly.

If the text you want to paste to your contact is larger than the allowed amount, Plus! will already make a textfile out of it and send it that way (if that option is enabled).

The only added benefit of this script, as far as I can see, would be the language highlighting in case of source code. So, for people pasting source code all the time, it might be usefull I guess. Either way, it would be a good scripting practice for sure.

PS: Horseboy, What does the 'W' stand for in 'WIP'? And I assume 'IP' is 'In Progress'?

This post was edited on 04-13-2011 at 11:59 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
04-13-2011 11:35 PM
Profile PM Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On