[Beta Release] RTF Tools 0.3.1 - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Beta Release] RTF Tools 0.3.1 (/showthread.php?tid=77267)
[Beta Release] RTF Tools 0.3.1 by Dempsey on 09-05-2007 at 04:30 PM
This is something that was requested that I decided to work on.
Basically:
- copy some RTF (Rich Text Format) text from eg word, wordpad or script editor
- goto a convo a type /rtf
Watch the magic
If you find any bugs etc, let me know, ideally sending me the rtf files which cause problems. I know there are problems atm, but for basic text colouring and formating it should work
Don't try sending an image as it will likely just kill WLM, I don't extract them out yet.
Changelog:
0.2 - First Public Release
0.3
- Fixed bug pointed out by Mattike
- Word rtf now doesn't cause script error, but still isn't perfect
- Remove alignment tags + font size tags
- Misc rtf cleanups
0.3.1 - Current Release
- Added menu item
- Fixed text ignoring default/first colour
- Word RTF isn't quite as messy now, but still not great
- Misc rtf cleanups
Known Issues
- Word RTF still includes mess
- New lines are stripped - see images below for example
- Not text object eg images etc aren't stripped, leaving loads of rubbish text.
Images:
Script Editor
RTF Tools
Its close!
Have fun!
Downloads of 0.2 : 10
Downloads of 0.3 : 8
Download RTF Tools 0.3.1
RE: [Beta Release] RTF Tools by Sunshine on 09-05-2007 at 04:44 PM
"The Script has been imported but failed to start."
Debug:
Error: '/' wordt verwacht (code: -2146827276)
File: RTF Tools.js. Line: 49.
wordt verwacht = is expected
When uncheckin, apply and restart the script in script preferences:
"Couldn't start script "RTF Tools 0.2". The script may be defective or you may not have the proper privileges to run scripts."
RE: [Beta Release] RTF Tools by Matti on 09-05-2007 at 05:39 PM
Seems like he forgot to end his RegExp's. Replace lines 49 and 50 with:
code: rtfData = rtfData.replace(/\\{/,"{");
rtfData = rtfData.replace(/\\}/,"}");
Wonderful work there, Dempsey! I tried it with some copied text from WordPad and the debugger doesn't lie: it works! However, my Office Word 2007 seems to make things a lot more difficult, it doesn't recognize it. (line 86 "var sColourTbl = rtfData.match(/\\colortbl(.+)\}/)[1];" fails).
I changed it so it actually returns the text, this is really useful!
Hint: add the command to Plus!' commands list!
RE: [Beta Release] RTF Tools by absorbation on 09-05-2007 at 05:56 PM
Yeh, it looks great:
RE: [Beta Release] RTF Tools by Dempsey on 09-06-2007 at 12:06 PM
Updated to RTF Tools 0.3 in first post
RE: [Beta Release] RTF Tools by Felu on 09-06-2007 at 02:03 PM
Just downloaded 0.3
quote: ---------------------------
Messenger Plus! Live
---------------------------
The script has been imported but failed to start.
---------------------------
OK
---------------------------
The script doesn't appear in the Debug window nor the Scripts List.
And i cba to restart wlm atm.
RE: [Beta Release] RTF Tools by Dempsey on 09-06-2007 at 02:16 PM
quote: Originally posted by Felu
Just downloaded 0.3
The script doesn't appear in the Debug window nor the Scripts List.
And i cba to restart wlm atm.
anyone else getting this?
RE: RE: [Beta Release] RTF Tools by felipEx on 09-06-2007 at 02:38 PM
quote: Originally posted by Dempsey
quote: Originally posted by Felu
Just downloaded 0.3
The script doesn't appear in the Debug window nor the Scripts List.
And i cba to restart wlm atm.
anyone else getting this?
me too
Edit:
i've opened RTF_Tools-6.plsc with WinRAR. 1 file?
RE: [Beta Release] RTF Tools by Mnjul on 09-06-2007 at 03:42 PM
No, it doesn't include any script files... doh dempsy
RE: [Beta Release] RTF Tools by Dempsey on 09-06-2007 at 03:51 PM
Whoops, updated the attachment now
RE: [Beta Release] RTF Tools 0.3 by Mnjul on 09-06-2007 at 04:01 PM
When I run /rtf, nothing happens
There's no error reported by Script Debugging window.
RE: [Beta Release] RTF Tools 0.3 by Dempsey on 09-06-2007 at 04:03 PM
quote: Originally posted by Mnjul
When I run /rtf, nothing happens
There's no error reported by Script Debugging window.
hmm, do you deff have some rtf text in clipboard?
RE: RE: [Beta Release] RTF Tools 0.3 by Mnjul on 09-06-2007 at 04:17 PM
oh, i thought when you copy html pages from firefox, it would be rtf. obviously i'm wrong.
But anyway, There's quite some problems for me regarding Chinese, Here's the screencast as attachment.
RE: [Beta Release] RTF Tools 0.3.1 by Dempsey on 09-07-2007 at 04:18 PM
Yea i just realised seem to have broken even simple rtf reading in 0.3, looking at it now
EDIT: Released RTF Tools 0.3.1 in first post.
RE: [Beta Release] RTF Tools 0.3.1 by Mnjul on 09-07-2007 at 04:24 PM
Does nothing when I
1 Copy some conversation history from a coversation window and paste it to Wordpad
2 Copy the conversation history from Wordpad
3 run /rtf
Debug window says:
Function called: OnEvent_ChatWndSendMessage
Before: {\rtf1\ansi\ansicpg950\deff0\deflang1033\deflangfe1028{\fonttbl{\f0\fnil\fcharset136 PMingLiU;}{\f1\froman\fprq1\fcharset128 MS PGothic;}{\f2\fswiss\fprq2\fcharset0 Verdana;}{\f3\fmodern\fprq6\fcharset136 \'b7\'73\'b2\'d3\'a9\'fa\'c5\'e9;}}
{\colortbl ;\red84\green84\blue84;\red82\green202\blue42;}
{\*\generator Msftedit 5.41.21.2507;}\viewkind4\uc1\pard\li72\ri18\sb72\tx720\cf1\lang1028\f0\fs20 [o] - [Mnjul] - [\lang1041\f1\fs22\'82\'be\'82\'c1\'82\'c4 \'8e\'9e\'8a\'d4\'82\'c6 \'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028\f0\fs20\'a4\'57\'a4\'c8 12:18):\par
\pard\li277\ri18\tx720\cf2\lang1033\f2 test.\par
\pard\li72\ri18\tx720\cf1\lang1028\f0 [o] - [Mnjul] - [\lang1041\f1\fs22\'82\'be\'82\'c1\'82\'c4 \'8e\'9e\'8a\'d4\'82\'c6 \'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028\f0\fs20\'a4\'57\'a4\'c8 12:18):\par
\pard\li277\ri18\tx720\cf2\lang1033\f2 test.\par
\pard\li72\ri18\tx720\cf1\lang1028\f0 [o] - [Mnjul] - [\lang1041\f1\fs22\'82\'be\'82\'c1\'82\'c4 \'8e\'9e\'8a\'d4\'82\'c6 \'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028\f0\fs20\'a4\'57\'a4\'c8 12:18):\par
\pard\cf2\lang1033\f2 test.\cf0\lang1028\f3\par
}
Here: [o] - [Mnjul] - [\lang1041\'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028:18):\par
\pardtest.\par
\pard[o] - [Mnjul] - [\lang1041\'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028:18):\par
\pardtest.\par
\pard[o] - [Mnjul] - [\lang1041\'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028:18):\par
\pard\cf2\lang1033 test.\cf0\lang1028\par
}
endTag: [/c]
After: [c=#000000][o] - [Mnjul] - [\lang1041\'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028:18):
test.
[o] - [Mnjul] - [\lang1041\'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028:18):
test.
[o] - [Mnjul] - [\lang1041\'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028:18):
[/c][c=#52CA2A]\lang1033 test.[/c][c=#000000]\lang1028
[/c]
Does nothing when I copy conversation history from a conversation window and directly run /rtf
Debug window says:
Function called: OnEvent_ChatWndSendMessage
Before: pK€
Here: €
endTag:
After: €
RE: [Beta Release] RTF Tools 0.3.1 by Dempsey on 09-07-2007 at 04:27 PM
Yea I just re-uploaded as I forgot to uncomment out the line to return the data.
Seems I need to work on unicode characters quite a bit
RE: [Beta Release] RTF Tools 0.3.1 by Mnjul on 09-07-2007 at 04:38 PM
quote: Originally posted by Mnjul
when I copy conversation history from a conversation window and directly run /rtf
send out only a question mark and a space, a new line (and appears to be unformatted)
quote: Originally posted by Mnjul
1 Copy some conversation history from a coversation window and paste it to Wordpad
2 Copy the conversation history from Wordpad
3 run /rtf
Gives me
[o] - [Mnjul] - [\lang1041\'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028:32):
test
[o] - [Mnjul] - [\lang1041\'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028:32):
test
[o] - [Mnjul] - [\lang1041\'90\'6c\'82\'e0\'97\'ac\'82\'ea\'82\'c4\'82\'ad\'82\'cc \'91\'66\'92\'bc\'82\'c9\'8e\'f3\'82\'af\'82\'c6\'82\'df\'82\'c4 \'82\'a2\'82\'c2\'82\'c5\'82\'e0\'94\'f7\'8f\'ce\'82\'dd\'82\'f0] says (\lang1028:32):
\lang1033 test \lang1028
RE: [Beta Release] RTF Tools 0.3.1 by Mnjul on 10-07-2007 at 05:41 PM
Any updates? It's been a month.
RE: [Beta Release] RTF Tools 0.3.1 by Dempsey on 10-07-2007 at 05:42 PM
Na haven't had a chance to do anymore to it yet, sorry
RE: [Beta Release] RTF Tools 0.3.1 by Mnjul on 10-08-2007 at 03:07 PM
Do you mind if I do it on my own (will create my own codes, not steal yours )
RE: [Beta Release] RTF Tools 0.3.1 by Dempsey on 10-08-2007 at 03:11 PM
quote: Originally posted by Mnjul
Do you mind if I do it on my own (will create my own codes, not steal yours )
Course don't mind Feel free to use any code from mine anyway if it can be of any use.
RE: [Beta Release] RTF Tools 0.3.1 by warmth on 10-08-2007 at 07:36 PM
works for me when I copied the text from wordpad only... doesn't work when I copied the same text from word...
look what the debug windows said in the txt...
|