Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

cRichEdit - Standard RichEdit control for AutoHotkey scripts


  • Please log in to reply
110 replies to this topic
ABCYourWay
  • Guests
  • Last active:
  • Joined: --
Thank you Corrup for the script.

Can you add [ Get RTF Code and Load RTF Code ] functions?
For some reason I want to save several RTF codes in one text file.
But without the Load-Get RTF code functions I have to save each code to as many rtf files 'cause we only have a load RTF File function.

I don't know if it's technically possible.
As you know, IEcontrol allows us directly to load html code(not html file) but Iecontrol is not a htmledit control so we can't edit html code in a WYSIWYG way.

And you already got a hang of richedit control, is htmledit control a tough one for to tackle? I'm sorry if I'm asking too much. :lol:
I like your Richedit control!. Thanks.

Supercalifragilistic
  • Guests
  • Last active:
  • Joined: --
Splendid control !!!
Do you think you can add a ruler with margin (right, left, indent) and tab stops (right, left, center, decimal point) ?
Thanks

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
ABCYourWay - Thanks :) . I'll add retrieving rtf code to the list.

Supercalifragilistic - Thanks :) . The next minor version (available soon) should contain a few paragraph options (left, center, right) and possibly tab stop options, indent and a few others. The ruler will likely take a little while longer but is on the list.


Thanks for the interest, comments and suggestions :) . I can't take any credit for the control itself since it's a standard Windows control but adding options for use in AutoHotkey has been interesting so far. After the next few releases I will probably only add additional options as requested. If anyone has any requests then please let me know so that I can add them to the list. If anyone has any code that they would like to see added to the version available for download then please post it here or send me a PM.

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

And you already got a hang of richedit control, is htmledit control a tough one for to tackle? I'm sorry if I'm asking too much. :lol:

:lol: There are probably other people here with more experience with that one but I might consider giving it a try (if someone else doesn't beat me to it) after most of the work on this is complete :) .

Supercalifragilistic
  • Guests
  • Last active:
  • Joined: --

Supercalifragilistic - Thanks :) . The next minor version (available soon) should contain a few paragraph options (left, center, right) and possibly tab stop options, indent and a few others. The ruler will likely take a little while longer but is on the list.

Thanks corrupt. Very good news.

ABCYourWay
  • Guests
  • Last active:
  • Joined: --
To Corrupt.
Hi.
I don't know if I am doing something wrong in my script, but have you ever tried to put Richedit Gui upon Tab control?

At first I thought it wasn't working with Tab control, but I noticed that Richedit control is behind the tab control. I am trying to put a richedit on the 2nd tab.
Other built-in controls are working correctly.
I think Tab control can not contain richedit control within the area.
Can you check it out please?
Thank you.

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
To put the control on a tab control you may have to set the tab control as the parent. The current code sets the Gui window as the parent so although the control may be positioned on the tab control initially it's not linked to the tab control in any way. I'll have a look at adding an option. Thanks.

Abcyourway
  • Guests
  • Last active:
  • Joined: --
Yeah, I managed to simulate tab control containing RichEdit using Control command with hide and move option.
Sorry for posting that topic without trying other method myself.
You should concentrate on other major requests from others rather my trivial problems.
Thanks.

daonlyfreez
  • Members
  • 995 posts
  • Last active: Jan 23 2013 08:16 AM
  • Joined: 16 Mar 2005
Great work! 8)
Posted Image mirror 1mirror 2mirror 3ahk4.me • PM or Posted Image

ABCyourway
  • Guests
  • Last active:
  • Joined: --
Sorry, Corrupt! Another Request.

Can you add AppendText method?
I just want to add some text programmatically,
not just loading from files!
Everytime I ask you for someting,
I wish I were a good programmer like you.
Not that I am a programmer :lol: , I'm just starting to learn, enjoy, and cosume :O scripts just as a user.
Thanks again.

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
Hmm, I had thought that I had included that with the last update. I probably added it just after. Oops :oops: . An option for adding text along with a few other tweaks will also be available with the next version. Btw, feel free to keep the requests coming :) .

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

Everytime I ask you for someting,
I wish I were a good programmer like you.
Not that I am a programmer :lol: , I'm just starting to learn, enjoy, and cosume :O scripts just as a user.
Thanks again.

Thanks :) , but it's mostly trial & error with a lot of patience, over time... ;) . Don't get discouraged. We all have to start somewhere.

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
Updated to version 0.06
[*:32td97w3]AutoHotkey v1.0.47 or greater required
[*:32td97w3]added: Align (Left, Right, Center)
[*:32td97w3]added: ReplaceSel - to insert or replace text at the current position
[*:32td97w3]added: GetRTF - to retrieve RTF code for the current selection or contents of the RichEdit control
[*:32td97w3]added: an option to cGUI to specify the HWND of the parent control (currently untested)
[*:32td97w3]modified: removed dependency on Insert/Extract Integer functions (now uses NumPut, NumGet instead)
[*:32td97w3]updated: demo scripts (simple, feature)
[*:32td97w3]modified: method used for colour names, minor bug fixes/tweaks
[*:32td97w3]more to come soon...

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

Great work! 8)

Thanks :)

ABCYourWay
  • Guests
  • Last active:
  • Joined: --
Finally!

At first I was gonna ask you for two functions AppendText and say, ReplaceText but I forgot one!
But you came up with ReplaceSel - Sort of two birds with one stone!

Now I can restart my little script again.
Good to know AutoHotkey, Great to know you. Thanks Corrupt.