AutoHotkey Community

It is currently May 26th, 2012, 9:50 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 240 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 16  Next

Do you want HiEdit internaly
Yes
No, I like Edit control
Other (please explain)
You may select 1 option

View results
Author Message
 Post subject:
PostPosted: September 6th, 2009, 10:57 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Ye, you can safely remove it for now.
It was serving for Panel control so it can add it as is child.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: other
PostPosted: September 7th, 2009, 12:59 am 
Offline

Joined: January 22nd, 2009, 3:43 pm
Posts: 84
I chose other,

as on the one hand I understand Chris concern about keeping the AHK footprint as fast and lean as possible

on the other hand, HiEdit seems a worthwhile addition, specially for developers, so, maybe it would make sense in the future to have two
official releases:

- AHK Standard Edition, lean, mean

- AHK Developer Edition, a beefed up version of the standard edition,
including Hiedit and other SDK tools that makes life easier for the hardcore programmer.

Naturally, the Developer version includes also the standard version, so that they can compile their final code without SDK overhead.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 7th, 2009, 12:10 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Actually, I changed my mind about this.
HiEdit works perfectly as AHK module, and it will probably be even easier to integrate it in the future.

Lexikos developed some nice things that make stdlib creation more flexibile in the meantime and from what I know that trend will continue.

This poll was created in the time when means of extending AHK were close to zero.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2009, 2:49 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
*** version 4.0.0.4-2 ***
* All globals removed. Using function as handler instead of subroutine. See SetEvents docs.
* OnNotify method improved for peaceful coexistence with other custom controls.
+ Sample search function updated - now F3 starts searching from the top if nothing was found in the remaining text.
* Sample uses latest Dlg.ahk (instead CmnDlg).
* Sample uses Attach instead of Anchor.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2009, 4:55 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Thanks for the update. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2009, 11:44 am 
Offline

Joined: April 22nd, 2009, 6:04 am
Posts: 29
majkinetor, i just want you to that there's a lot of people including me who appreciate you and other ahk soldier's contributions to ahk.
you've really shown that, there's no limitation to the possibilities of ahk.

thanx :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2009, 3:32 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
A few additional HiEdit functions that I've been using lately. Please feel free to add, modify, and/or ignore.

Code:
;-------------------------------------------------------------------------------
; Function: HE_GetRect
;
;           Gets the formatting rectangle of the HiEdit control.
;
;
; Parameters:
;
;           Left, Right, Top, Botttom - These parameters, which must contain
;           valid variable names, are used to return the formatting rectangle of
;           the HiEdit control.
;
;
; Returns:
;
;           {None}.  Coordinates are returned in the ByRef parameters.
;
;
HE_GetRect(hEdit,ByRef Left,ByRef Top,ByRef Right,ByRef Bottom)
    {
    Static EM_GETRECT:=0xB2
    VarSetCapacity(RECT_Structure,16,0)
    SendMessage EM_GETRECT,0,&RECT_Structure,,ahk_id %hEdit%
    Left  :=NumGet(RECT_Structure,0,"Int")
    Top   :=NumGet(RECT_Structure,4,"Int")
    Right :=NumGet(RECT_Structure,8,"Int")
    Bottom:=NumGet(RECT_Structure,12,"Int")
    return
    }



;-------------------------------------------------------------------------------
; Function: HE_CharFromPos
;
;           Gets information about the character closest to a specified point
;           in the client area of the HiEdit control.
;
;
; Parameters:
;
;           x, y - The x/y-coordinates of a point in the HiEdit control's client
;           area relative to the upper-left corner of the client area.
;
;
; Returns:
;
;           The character index of the specified point or the character index to
;           the last character if the given point is beyond the last character
;           in the control.
;
;
HE_CharFromPos(hEdit,x,y)
    {
    Static EM_CHARFROMPOS:=0xD7
    SendMessage EM_CHARFROMPOS,0,(y<<16)|x,,ahk_id %hEdit%
    return ErrorLevel
    }



;-------------------------------------------------------------------------------
; Function: HE_PosFromChar
;
;           Gets the client area coordinates of a specified character in the
;           HiEdit control.
;
;
; Parameters:
;
;           iChar - The zero-based index of the character.
;
;           x, y - These parameters, which must contain valid variable names,
;           are used to return the x/y-coordinates of a point in the HiEdit
;           control's client relative to the upper-left corner of the client
;           area.
;
;
; Returns:
;
;           {None}.  The coordinates are returned in ByRef parameters.
;
;           Note: If iChar is greater than the index of the last character in
;           the control, the returned coordinates are of the position just past
;           the last character of the control.
;
;
HE_PosFromChar(hEdit,iChar,ByRef x,ByRef y)
    {
    Static EM_POSFROMCHAR:=0xD6
    VarSetCapacity(POINTL_Structure,8,0)
    SendMessage EM_POSFROMCHAR,&POINTL_Structure,iChar,,ahk_id %hEdit%
    x:=NumGet(POINTL_Structure,0,"Int")
    y:=NumGet(POINTL_Structure,4,"Int")
    return
    }



;-------------------------------------------------------------------------------
; Function: HE_GetLastVisibleLine
;
;           Returns the zero-based line index of the last visible (including
;           partially displayed) line on the HiEdit control.
;
; Remarks:
;
;           To calculate the total number of visible lines, use the following:
;
;               HE_GetLastVisibleLine(hEdit)-HE_GetFirstVisibleLine(hEdit)+1
;
;
HE_GetLastVisibleLine(hEdit)
    {
    HE_GetRect(hEdit,Left,Top,Right,Bottom)
    return HE_LineFromChar(hEdit,HE_CharFromPos(hEdit,0,Bottom))
    }


;-------------------------------------------------------------------------------
; Function: Cut, Copy, Paste, Clear (aka Delete)
;
;           Standard edit commands for the HiEdit control.
;
;
; Returns:
;
;           {None}
;
;
; Remarks:
;
;           These messages are more efficent/reliable than sending the
;           associated shortcut keys (Ctrl+X, Ctrl+C, etc.) to the HiEdit
;           control.
;
;
HE_Cut(hEdit)
    {
    Static WM_CUT:=0x300
    SendMessage WM_CUT,0,0,,ahk_id %hEdit%
    return
    }


HE_Copy(hEdit)
    {
    Static WM_COPY:=0x301
    SendMessage WM_COPY,0,0,,ahk_id %hEdit%
    return
    }


HE_Paste(hEdit)
    {
    Static WM_PASTE:=0x302
    SendMessage WM_PASTE,0,0,,ahk_id %hEdit%
    return
    }


HE_Clear(hEdit)
    {
    Static WM_CLEAR:=0x303
    SendMessage WM_CLEAR,0,0,,ahk_id %hEdit%
    return
    }



;-------------------------------------------------------------------------------
; Function: HE_CanPaste
;
;           Determines whether a HiEdit control can paste a specified clipboard
;           format.
;
;
; Parameters:
;
;           ClipboardFormat - The default is 0x1 (CF_TEXT).
;
;
; Returns:
;
;           TRUE if the clipboard format can be pasted otherwise FALSE.
;
;
; Remarks:
;
;           The HiEdit control supports the standard clipboard text formats --
;           CF_TEXT, CF_OEMTEXT, CF_UNICODETEXT (for Windows versions that
;           support Unicode), and CF_LOCALE (used by the OS to implicitly
;           convert from CF_TEXT to CF_UNICODETEXT).  If any application copies
;           text of any type to the clipboard, it will usually copy the text to
;           one (usually all, depending on the OS) of these clipboard formats.
;           
;           For additional information on clipboard formats, see the following:
;
;               http://msdn.microsoft.com/en-us/library/ms649013(VS.85).aspx
;
;
; Observations:
;
;           Despite the HiEdit documentation, sending zero as the clipboard
;           format never returns a non-zero (can paste) value regardless of
;           the contents of the clipboard. [Bug]
;
;
HE_CanPaste(hEdit,ClipboardFormat=0x1)  ;-- 0x1=CF_TEXT
    {
    Static EM_CANPASTE:=1074  ;-- 1074=WM_USER+50
    SendMessage EM_CANPASTE,ClipboardFormat,0,,ahk_id %hEdit%
    return ErrorLevel ? True : False
    }


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2009, 9:14 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Very nice jballi. Thanks again.

Ill definitelly include some/all of them.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 2nd, 2009, 5:59 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
A couple of tiny functions that I missed on the last round.

Code:
;-------------------------------------------------------------------------------
; Function: HE_CanUndo
;
;           Returns TRUE if the HiEdit control can correctly process the
;           EM_UNDO message.
;
;
HE_CanUndo(hEdit)
    {
    Static EM_CANUNDO:=0xC6
    SendMessage EM_CANUNDO,0,0,,ahk_id %hEdit%
    return ErrorLevel
    }



;-------------------------------------------------------------------------------
; Function: HE_CanRedo
;
;           Returns TRUE if the HiEdit control can correctly process the
;           EM_REDO message.
;
;
HE_CanRedo(hEdit)
    {
    Static EM_CANREDO:=1109  ;-- 1109=WM_USER+85
    SendMessage EM_CANREDO,0,0,,ahk_id %hEdit%
    return ErrorLevel
    }


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 2nd, 2009, 10:10 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Thanks, I merged them and released new module version.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 3rd, 2009, 1:34 am 
Offline

Joined: November 10th, 2007, 3:30 am
Posts: 93
Location: Second star to the right.... watching you.
I vote no, put it in the standard lib.

Keep ahk small.

Side note: Thank you majkinetor for all your contributions.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 3rd, 2009, 3:02 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Thanks for the update. Found a minor code typo in the HE_GetRect function.
Code:
Bottom:=NumGet(RECTe,12,"Int")

Should be:
Code:
Bottom:=NumGet(RECT,12,"Int")

The HE_GetLastVisibleLine function does not work correctly because of the typo.

Also, the HE_CanRedo function is returning an unexpected value (5) when a redo is available. Although technically still returning a TRUE value, the function might be more correctly written as follows:
Code:
HE_CanRedo(hEdit)
    {
    Static EM_CANREDO:=1109  ;-- 1109=WM_USER+85
    SendMessage EM_CANREDO,0,0,,ahk_id %hEdit%
    return ErrorLevel ? True : False
    }


Thanks for your help.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2009, 4:39 am 
Offline

Joined: May 21st, 2007, 4:47 pm
Posts: 85
It seems to be impossible to display some characters on certain circumstances in HiEdit control.

When syntactic coloration is OFF, all 256 so-called "ANSI" characters (in fact, Windows-1252) can be displayed (see the list below). And it is possible to display all of them in any foreground/background color setting.

But when syntactic coloration is ON, 54 characters stays in black whatever the color setting choosed (those characters are in red in the list below). And that's the reason why they don't appear at all on a black background color.

Windows-1252 character set
In red, problematic characters in HiEdit control when syntactic coloration is ON
Code:
     ¦   0    1    2    3    4    5    6    7    8    9
-----+---------------------------------------------------
000  ¦   NUL  SOH  STX  ETX  EOT  ENQ  ACK  BEL  BS   TAB
010  ¦   LF   VT   FF   CR   SO   SI   DLE  DC1  DC2  DC3
020  ¦   DC4  NAK  SYN  ETB  CAN  EM   SUB  ESC  FS   GS
030  ¦   RS   US   SP   !    "    #    $    %    &    '
040  ¦   (    )    *    +    ,    -    .    /    0    1
050  ¦   2    3    4    5    6    7    8    9    :    ;
060  ¦   <    =    >    ?    @    A    B    C    D    E
070  ¦   F    G    H    I    J    K    L    M    N    O
080  ¦   P    Q    R    S    T    U    V    W    X    Y
090  ¦   Z    [    \    ]    ^    _    `    a    b    c
100  ¦   d    e    f    g    h    i    j    k    l    m
110  ¦   n    o    p    q    r    s    t    u    v    w
120  ¦   x    y    z    {    |    }    ~        €    
130  ¦       ƒ    „    …    †    ‡    ˆ    ‰    Š   
140  ¦   Œ        Ž            ‘    ’    “    ”    •
150  ¦   –    —    ˜    ™    š        œ        ž    Ÿ
160  ¦   NBS  ¡    ¢    £    ¤    ¥    ¦    §    ¨    ©
170  ¦   ª    «    ¬    shy  ®    ¯    °    ±    ²    ³
180  ¦   ´    µ    ¶    ·    ¸    ¹    º    »    ¼    ½
190  ¦   ¾    ¿    À    Á        à   Ä    Å    Æ    Ç
200  ¦   È    É    Ê    Ë    Ì    Í    Π   Ï    Р   Ñ
210  ¦   Ò    Ó    Ô    Õ    Ö    ×    Ø    Ù    Ú    Û
220  ¦   Ü    Ý    Þ    ß    à    á    â    ã    ä    å
230  ¦   æ    ç    è    é    ê    ë    ì    í    î    ï
240  ¦   ð    ñ    ò    ó    ô    õ    ö    ÷    ø    ù
250  ¦   ú    û    ü    ý    þ    ÿ

As Majkinetor said, with HiEditor or HiEditDemo this problem doesn't happen with the character number 96 (`). But it still with all 53 others.

I hope these observations can help to solve the problem.

HiEdit is great. Thanks a lot for it!

Edit 1
Fincs' remark is right. So, I updated my post to take it into account.

_________________
Normand Lamoureux


Last edited by Normand on December 2nd, 2009, 6:46 pm, edited 5 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2009, 8:05 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Hej, thats great observation.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2009, 7:11 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
Actually the "ANSI" character set you're describing is the codepage Windows-1252.

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 240 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 16  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: JamixZol, Yahoo [Bot] and 7 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group