AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
nick



Joined: 24 Aug 2005
Posts: 549
Location: Berlin / Germany

PostPosted: Wed Dec 23, 2009 11:48 am    Post subject: [module] RE.ahk - Poor Man's Rich Edit Reply with quote

*deleted*
_________________
nick Wink


Last edited by nick on Thu Jul 01, 2010 8:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
fincs



Joined: 05 May 2007
Posts: 1160
Location: Seville, Spain

PostPosted: Wed Dec 23, 2009 3:03 pm    Post subject: Reply with quote

Shocked
This is seriously impressive.
_________________
fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5043
Location: the tunnel(?=light)

PostPosted: Wed Dec 23, 2009 3:19 pm    Post subject: Reply with quote

Very nice work!
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Wed Dec 23, 2009 4:17 pm    Post subject: Reply with quote

In your editor demo some shortcuts would be nice, ctrl-b for bold, ctrl-i for italics etc.
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
nick



Joined: 24 Aug 2005
Posts: 549
Location: Berlin / Germany

PostPosted: Fri Dec 25, 2009 9:37 am    Post subject: Reply with quote

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:
Code:
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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group