Jump to content

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

[module] RE.ahk - Poor Man's Rich Edit


  • Please log in to reply
7 replies to this topic
nick
  • Members
  • 549 posts
  • Last active: Jul 03 2010 09:31 PM
  • Joined: 24 Aug 2005
*deleted*
nick :wink:

fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
:shock:
This is seriously impressive.

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
Very nice work!

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
In your editor demo some shortcuts would be nice, ctrl-b for bold, ctrl-i for italics etc.

nick
  • Members
  • 549 posts
  • Last active: Jul 03 2010 09:31 PM
  • Joined: 24 Aug 2005
Moin,

I've found some of those last-minute typos in RE_SETFONT() (Styles instead of Style), so I had to update RE.ahk.

@hugov:
Here's some example code to include some hotkeys into the demo:
Gui Show, , %GuiTitle%
OnMessage(WM_MOUSEMOVE := 0x200, "ShowSBHelp")
OnMessage(WM_NOTIFY := 0x4E, "SelChanged")
OnMessage(WM_COMMAND := 0x111, "CheckHotkeys")
ControlFocus, , ahk_id %REdit2%
GoSub, UpdateGui
Return
; ******************************************************************************
; End of auto-execute section **************************************************
; ******************************************************************************
; ------------------------------------------------------------------------------
CheckHotkeys(W, L) {
   Global REdit2
   Static EN_SETFOCUS := 0x100
        , EN_KILLFOCUS := 0x200
        , Hotkeys := "^b|^i|^u|^s"
   If (L = REdit2) {
      M := W >> 16
      If (M = EN_KILLFOCUS) || (M = EN_SETFOCUS) {
         OnMessage(WM_MOUSEMOVE := 0x200, M = EN_KILLFOCUS ? "ShowSBHelp" : "")
         Loop, Parse, Hotkeys, |
            Hotkey, %A_LoopField%, % (M = EN_KILLFOCUS ? "Off" : "HotkeyLabel")
      }
   }
   Return
   HotkeyLabel:
   RE_TOGGLEFONTSTYLE(REdit2, SubStr(A_ThisHotkey, 0))
   GoSub, UpdateGui
   Return
}

See you later! :wink:
nick :wink:

Looq
  • Members
  • 101 posts
  • Last active: Nov 04 2014 03:40 AM
  • Joined: 07 Feb 2005

Is there a reason this was deleted..?



just me
  • Members
  • 1496 posts
  • Last active: Nov 03 2015 04:32 PM
  • Joined: 28 May 2011

I'm currently working on Class_RichEdit.ahk, but the script needs some more testing. I think it will be published within the next two weeks.

 

just me (aka nick) wink.png


Prefer ahkscript.org for the time being.


fredchf
  • Members
  • 111 posts
  • Last active: Jul 12 2019 10:05 AM
  • Joined: 02 Nov 2012

I'm currently working on Class_RichEdit.ahk, but the script needs some more testing. I think it will be published within the next two weeks.
 
just me (aka nick) 

Da bin ich schon sehr gespannt just megrin.png