Class RichEdit - update on 2015-04-14 (v0.1.05.00)

Post your working scripts, libraries and tools
User avatar
Xtra
Posts: 1338
Joined: 02 Oct 2015, 12:15

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

24 Jan 2019, 13:55

Im only using the class nothing else. If you look at the class code you can see how it works. (or should work)
SetSel() will move the caret anywhere you want.
Im more interested in automating a hidden control not manually interacting with a control / gui / editor.
burque505
Posts: 961
Joined: 22 Jan 2017, 19:37

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

24 Jan 2019, 14:19

Ah, I see. I've never changed any of just me's code in either Class_RichEdit or Class_RichEditDlgs, just code in the sample app. I do see what you refer to in Class_RichEdit.
Thanks for the tip.
Regards,
burque505
m3user
Posts: 129
Joined: 17 Jan 2014, 18:11

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

03 Apr 2019, 12:09

Great class, thank you!

Question: I have difficulties with copying image from the edit field and paste it into Gmail. Try this:
- open RichEdit sample
- paste the image in plus some text
- select image and text and copy it to clipboard (Ctrl+C)
- open Gmail, Compose new mail, paste the image (Ctrl+V) --- it doesn't work, the image is not pasted, only text
- open Word and paste ihe image --- it works.

Any idea? Thanks.
burque505
Posts: 961
Joined: 22 Jan 2017, 19:37

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

03 Apr 2019, 18:29

@m3user, that's interesting. I just tried it with GMail also, and all that pasted was text. So I tried opening an RTF file with WordPad, copied an image and text, same problem.
I'm betting GMail just doesn't accept RTF, but I haven't checked into it any further.
m3user
Posts: 129
Joined: 17 Jan 2014, 18:11

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

04 Apr 2019, 07:48

Yes, copying from WordPad to Gmail is also an issue. I tried simply to copy anything (Ctrl+C) in WordPad and paste it (Ctrl+V) to Gmail - no rich text, no images.

I wonder if would it be possible to update the RichEdit dll control to a newer version?
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

19 Apr 2019, 12:12

I would also guess Gmail does not accept Rtf which would explain. Word can copy both HTML and Rtf formatting.
You could use a more recent dll but that would not change this. Only some advanced functionalities have been added but the class is using the most advanced version compatible with Windows 7.
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic
Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates
burque505
Posts: 961
Joined: 22 Jan 2017, 19:37

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

19 Apr 2019, 12:19

@DigiDon, good to see you back! Hope things are well.
Regards,
burque505
m3user
Posts: 129
Joined: 17 Jan 2014, 18:11

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

19 Apr 2019, 13:07

@DigiDon
I tried to save Word file as rtf and this pastes well into Gmail. The file saved from RichEdit (or WordPad) does not. The same is with simple copy and paste.
Is there anything I could try? What should be changed to try the most recent dll?
burque505
Posts: 961
Joined: 22 Jan 2017, 19:37

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

19 Apr 2019, 13:33

@m3user, I get the same result. However, you might try copying and pasting from that rtf file saved by Word into RichEdit or WordPad. Try copying just the image, then try Ctrl-A, Ctrl-C before pasting. I think the results will surprise you. Bottom line is that Word seems to add data to the clipboard that neither WordPad or RichEdit do - at least that's been my experience.
Regards,
burque505
User avatar
kczx3
Posts: 823
Joined: 06 Oct 2015, 21:39

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

19 Apr 2019, 18:50

The reason is that I bet word puts multiple formats onto the clipboard including plain text, rtf, and html
burque505
Posts: 961
Joined: 22 Jan 2017, 19:37

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

20 Apr 2019, 08:34

@kczx3, I'm sure that's it too. Using Word's RichEdit's riched20.dll, which is quite a bit larger, can do the trick may get us closer. But then of course you have to have Word :). For the attached script, I'm using the riched20.dll that's found in "C:\Program Files\Common Files\Microsoft Shared\OFFICE16\RICHED20.DLL", just substitute your version number. (It needs to go in the script directory as I've written it.)

Try copying and pasting from Word - it works.

Test files in archive. You'll notice that if you open the Document2.rtf file in WordPad, it won't show the image, but in Word it does.That's because it was saved as RTF from Word! Try the same test with Document 2 (2).rtf - it was never corrupted by Word. Try pasting back and forth among a Word .docx, a Word .rtf, the script, and WordPad.

This gets me no closer to pasting into Gmail. All that pastes out of the script is text.
re-office.PNG
re-office.PNG (51.17 KiB) Viewed 335 times
Attachments
RichEdit problems.zip
(85.5 KiB) Downloaded 14 times
m3user
Posts: 129
Joined: 17 Jan 2014, 18:11

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

04 Jun 2019, 12:33

So do I understand correctly that this is not possible in AutoHotkey i.e. there is no rich text control compatible with Gmail?
burque505
Posts: 961
Joined: 22 Jan 2017, 19:37

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

04 Jun 2019, 13:24

@m3user, I'm still thinking it's possible, but I haven't found the answer yet. Best of luck.
Regards,
burque505
burque505
Posts: 961
Joined: 22 Jan 2017, 19:37

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

08 Jun 2019, 12:21

@m3user, just to return to this, please look at this link, it's a blurb for a mass mailer, but has good info. The images are apparently NOT going in your Gmail message unless they are hosted online, or you insert them manually . If you can do without images (which seems unlikely), I have got an RTF-to-HTML solution working (images and all), based on code here, but it doesn't help with the Gmail problem.
Regards,
burque505

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 30 guests