Hi BGM,
I'm still trying to understand what you're doing. Why do you use pre-built RTF for coloring?
Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Just Me - because am basically treating the edit control like a syntax highlighter.
Instead of using scintilla (which I can't find a simple example for) I am colourizing characters manually using rtf coding.
It's working pretty well, actually.
Instead of using scintilla (which I can't find a simple example for) I am colourizing characters manually using rtf coding.
It's working pretty well, actually.
My Stuff: mousey; volume; ahkinfo; instantbirder; npp highlighter; Dynamic File Menu; tv - a treeview library;
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Hi arcticir,
Try this out in WordPad:
And this in Poor Man's Rich Edit:
You may want add Hotkey for fine tuning CatWalk position without reediting the script!
If you want to in corporate scrpit in to RichEdit_sample.ahk ask "just him", I couldn't made it!
bye
Try this out in WordPad:
Code: Select all
#NoEnv
#Persistent
SetTitleMatchMode, 2
SetTimer , CatWalk, 500
return
CatWalk:
IfWinActive, - WordPad
{
SendMessage 0xB7, 0, 0, RICHEDIT50W1, - WordPad
if A_CaretY > 520
SendMessage, 0x115, 1, 0, RICHEDIT50W1, - WordPad
else if A_CaretY < 500
SendMessage, 0x115, 0, 0, RICHEDIT50W1, - WordPad
}
return
Code: Select all
#NoEnv
#Persistent
SetTimer , CatWalk, 500
return
CatWalk:
IfWinActive, Poor Man's Rich Edit ; ahk_class AutoHotkeyGUI
{
SendMessage 0xB7, 0, 0, RICHEDIT50W2, Poor Man's Rich Edit
if A_CaretY > 280
SendMessage, 0x115, 1, 0, RICHEDIT50W2, Poor Man's Rich Edit
else if A_CaretY < 260
SendMessage, 0x115, 0, 0, RICHEDIT50W2, Poor Man's Rich Edit
}
return
If you want to in corporate scrpit in to RichEdit_sample.ahk ask "just him", I couldn't made it!
bye
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Regarding methods of syntax highlighting, I have started a new thread, in case anyone is interested.
Methods of Syntax Highlighting
Methods of Syntax Highlighting
My Stuff: mousey; volume; ahkinfo; instantbirder; npp highlighter; Dynamic File Menu; tv - a treeview library;
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Just a few questions. I'm trying to put my own RichEdit together without using your class (don't want too much boilerplate), which is great as a reference.
- Why are you calling EM_SETTYPOGRAPHYOPTIONS and EM_SETLANGOPTIONS?
- Under what circumstances would you need to ; Correct AHK font size setting, if necessary?
- Why are you limiting the text length to 2147483647 characters?
- Is there a function to enable a default context menu?
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Hi GeekDude,
honestly, I can't remember in any case why I did what I did. While testing the original script and the new version I frequently ran into issues. Whenever it happened I tried nearly all I could think of to solve the issue. That's why the script might contain unnecessary code.
honestly, I can't remember in any case why I did what I did. While testing the original script and the new version I frequently ran into issues. Whenever it happened I tried nearly all I could think of to solve the issue. That's why the script might contain unnecessary code.
- EM_SETTYPOGRAPHYOPTIONS might be unnecessary when passing 0x01, because it might be the default behaviour.
For EM_SETLANGOPTIONS see here. If you don't need/want it, don't use it.MSDN wrote:Advanced line breaking is turned on automatically by the rich edit control when needed, such as for handling complex scripts like Arabic and Hebrew, and for mathematics. It’s also needed for justified paragraphs, hyphenation, and other typographic features. - As far as I remember AHK font settings might create font sizes with decimals. It might confuse the user, that's why I round the size if needed.
- 2147483647 is the highest positive value which can be passed by AHK U32. I never tried if higher limits are possible and never reached this limit. But:MSDN wrote:Before EM_EXLIMITTEXT is called, the default limit to the amount of text a user can enter is 32,767 characters.
Source - I don't know.
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Hello just me (been a time!)
As I am still working on my software which integrate your class and an ever more tweaked version of your Rich Note Editor, I would like to know if you could please open a separate topic for the editor?
I would be glad to share improvements and to gather innovations from and for other members. I remember that you didn't want topics not directly concerning the class itself to be published here.
If you don't want to because you want to focus on the class or other things, then please tell me and I would be glad to open a topic.
The topic would of course link this one for the class and this one could point to the other for the editor and related functions.
Be well
As I am still working on my software which integrate your class and an ever more tweaked version of your Rich Note Editor, I would like to know if you could please open a separate topic for the editor?
I would be glad to share improvements and to gather innovations from and for other members. I remember that you didn't want topics not directly concerning the class itself to be published here.
If you don't want to because you want to focus on the class or other things, then please tell me and I would be glad to open a topic.
The topic would of course link this one for the class and this one could point to the other for the editor and related functions.
Be well
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
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates
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
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Hello DigiDon!
Just post it here. I'll test it and add a link in the OP.
Regards!
Just post it here. I'll test it and add a link in the OP.
Regards!
Re: Class RichEdit - rich edit control for AHK (Unicode)
sorry but I'm desperate. bumping this
Last edited by Chunjee on 23 Sep 2015, 14:48, edited 1 time in total.
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Link to original post?
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
I too am interested in having images work properly with this awesome control. I don't know if it would be helpful, but I found this page that describes "A Rich Edit Control That Displays Bitmaps and Other OLE Objects" where the author describes a few tricks he used to make the control work for images.
Windows 10 Pro (64 bit) - AutoHotkey v2.0+ (Unicode 64-bit)
Re: Class RichEdit - rich edit control for AHK (Unicode)
m3user wrote:Pasting images actually works on my Win 8.1 64bit, however not on Win 7. Any idea what might be the issue?
I wrote:Yes, with Win 8 new features where added to the rich edit control and others.
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
yes I saw those posts. Does anyone have an example or screenshot?
Does Win10 include this benefit?
Does Win10 include this benefit?
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Yes, it works on Win 10.
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Hi,
I want to use this class in a custom paragraph-oriented text control.
So, my question is: is there a simple way to get the paragraph number where the caret is at (i.e. the current paragraph), considering that one paragraph may use more than one line (word-wrap is set)?
I want to use this class in a custom paragraph-oriented text control.
So, my question is: is there a simple way to get the paragraph number where the caret is at (i.e. the current paragraph), considering that one paragraph may use more than one line (word-wrap is set)?
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Surprisingly, I neither found a 'simple way' nor a 'complicated'. But maybe I overlooked something.
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Couldn't you use EM_GETSEL to get the caret position, then compare to the text contents counting the paragraphs with your own code?
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
I took a (fast) look at the Win API reference for the rich edit controls and also found nothing suggestive.
GeekDude, yes, that would be the 'complicated' way I was trying to avoid. The main issue in this case is that the RTF text is plenty of control tags that AFAIK must be manually cleaned up. Also, keeping the whole thing 'synchronized' all the time as the user edits the text figures out another issue...
Thanks anyway.
GeekDude, yes, that would be the 'complicated' way I was trying to avoid. The main issue in this case is that the RTF text is plenty of control tags that AFAIK must be manually cleaned up. Also, keeping the whole thing 'synchronized' all the time as the user edits the text figures out another issue...
Thanks anyway.
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Another option could be to disable redraw, remove word wrap, check cursor position (which should now be line number), reenable word wrap, reenable redraw, and then do it on a line by line basis instead of character by character. Still complicated though, but perhaps a little less tedious.
Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)
Hummm... interesting option. That's far better.
Thanks.
BTW, how do I enable/disable auto redrawing of this object?
Thanks.
BTW, how do I enable/disable auto redrawing of this object?
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 202 guests