This library was first released on the original AutoHotkey forum. You can find the original post here. New versions of the library will be posted on this forum.
Introduction
The standard Edit Control is a lightweight and surprisingly powerful window control for displaying and editing text. The Edit library was created to help exploit the capabilities of this excellent control.
Edit Library
Key features:
- Find text. Search for text in the Edit control. Supports RegEx and backward search.
- Zoom. [v3.0+, Windows 10+] New functions to support zoom, the ability to increase and decrease the size of text in a multiline Edit control.
- Spell check. The Edit_SpellCheckGUI add-on is a ready-to-go spell check module that can be used on any Edit control. This add-on requires the Fnt and Spell library.
- Auto-set tab stops. [v1.4+] The Edit_AutoSetTabStop add-on function can be used to automatically set the tab stops for tab-delimited text. This add-on requires the Fnt library.
- Show selected text. [v3.0+] The Edit_ShowSelectedText function can be used to scroll the lines in the Edit control so that selected text is showing.
A couple of screenshots from the examples:
What's New in Version 3.0
This version is not a reboot. However, there are a lot of changes and there are a large number of possible script breakers. Please read the Release Notes carefully before using. Some key updates:
New functions:
- Extended Styles. New functions to add or remove extended styles. These functions are only available for Windows 10+.
- Zoom. The Edit library now supports the Edit control's built-in zoom feature. There is a new function to enable zoom and there are new functions to zoom in, zoom out, and to reset zoom. These functions are only available for Windows 10+.
- General. There are almost 30 new functions in this version. See the Release Notes for a complete list.
- Flag names. Some functions have been enhanced so that flag or option names (Ex: "Horizontal") can be used instead of integer flag values.
- Performance. Many functions have been rewritten or enhanced to improve performance.
- Documentation. The general library documentation has been moved to the _Edit.Doc.ahk file. Natural Docs v2.3 is used to generate HTML documentation from this file and from the function documentation. See the Release Notes for more information.
The pertinent files are as follows:
- Project: Edit.zip
This archive file includes the Edit library, add-on libraries, example scripts, and project documentation. - Documentation: Starting with v3.0, the project documentation is included in the project archive file (above).
Starting with v2.0, this project is designed to work on a recent version of AutoHotkey v1.1+. It is not compatible with AutoHotkey v2.0+ (yet).
Issues/Considerations
Most developers will not experience any issues using the Edit library. However, there may be some issues when using the more complex aspects of the Edit control or the Edit library. See the Issues and Considerations section in the Edit library documentation for more information.
References
The following posts were helpful in the creation of this library. Thanks to the original authors.
- Edit Control Functions
The "original" Edit library created by Lexikos.
https://autohotkey.com/board/topic/20981-edit-control-functions/
HiEdit Control
Syntax and some code ideas inspired by this library.
https://autohotkey.com/board/topic/17607-module-hiedit-4004-5/
- Spell Library
The Spell library is used by the Edit_SpellCheckGUI add-on.
viewtopic.php?f=6&t=4971
Fnt Library
This library is used by several add-on functions and some of the examples.
https://autohotkey.com/boards/viewtopic.php?f=6&t=4379
Release Notes
v3.0
This is a major release with new functions and many changes. Please read these release notes carefully before using.
New Add-On Libraries:
• Edit_Constants.ahk. This add-on file includes common Microsoft constants that may or may not be used in the Edit library. Although this file is in an AutoHotkey format, it is for documentation purposes only. It should never be included as-is.
• Edit_DebugTest.ahk. This add-on library file contains debug and test functions. The example scripts may include this library. In most cases, this add-on library should not be included in scripts unless debugging or testing.
• Edit_DebugTestGUI.ahk. This add-on library file contains debug and test functions with GUI commands. The example scripts may include this library. In most cases, this add-on library should not be included in scripts unless debugging or testing.
• Edit_Deprecated.ahk. This add-on library file contains deprecated functions. This library should only be included if using a deprecated function.
• Edit_FindDlg.ahk. This add-on library file contains the Edit_FindDlg function.
• Edit_ScrollBars.ahk. This add-on library file contains scroll bar-related functions.
• Edit_SortOptionsDlg.ahk. This add-on library file contains the Edit_SortOptionsDlg function.
• Edit_Util.ahk. This add-on library file contains miscellaneous utility functions.
• Edit_UtilGUI.ahk. This add-on library file contains miscellaneous utility functions that have GUI commands.
Possible Script Breakers:
OK, there are a lot of possible script breakers. Many developers will not be affected but be sure to review this section carefully.
• Edit_BlockMove. This function has been moved to the new Edit_Util.ahk add-on library. If this function is used, the Edit_Util.ahk library must be included.
• Edit_ContainsSoftLineBreaks. This function has been moved to the new Edit_Util.ahk add-on library. If this function is used, the Edit_Util.ahk library must be included.
• Edit_ConvertCase. This function has been moved to the new Edit_Util.ahk add-on library. If this function is used, the Edit_Util.ahk library must be included.
• Edit_CutLine. This function has been moved to the new Edit_Util.ahk add-on library. If this function is used, the Edit_Util.ahk library must be included.
• Edit_DeleteLine. This function has been moved to the new Edit_Util.ahk add-on library. If this function is used, the Edit_Util.ahk library must be included.
• Edit_Duplicate. This function has been moved to the new Edit_Util.ahk add-on library. If this function is used, the Edit_Util.ahk library must be included.
• Edit_FmtLines. This function has been moved to the new Edit_Util.ahk add-on library. If this function is used, the Edit_Util.ahk library must be included.
• Edit_GetLastVisibleLine. The default threshold to determine whether the last line is visible or not has changed slightly. Although very unlikely, scripts that use this function may return a different line index than the previous version. To force the function to act the exact same way as the previous version, set the p_Threshold parameter to 1.
• Edit_GetMargins. The return value of this function changed from an integer (left margin) to an object that contains the left and right margins. The return format matches the new Edit_GetMarginsInPixels function. If a script calling this function was using the return value instead of the output variables (it could happen), then the script must be modified to accommodate the new return value. Otherwise, no changes are required. See the function documentation for more information.
• Edit_GetRect. The return value of this function changed from the address of a RECT structure to an AutoHotkey object with properties that contain the values of a RECT structure and a lot more. If a script calling this function was using the return value as the address to a RECT structure (rare), then the script must be modified to accommodate the new return value. Otherwise, no changes are required. See the function documentation for more information.
• Edit_GetScrollBarInfo. This was previously an internal function that was never used. The return value has been changed from the address of SCROLLBARINFO structure to an AutoHotkey object with properties that contain the current scroll bar info for a specified scroll bar. If this function was used, it must be modified to use the return object. See the function documentation for more information.
• Edit_MouseInSelection. This function has been moved to the new Edit_Util.ahk add-on library. If this function is used, the Edit_Util.ahk library must be included.
• Edit_PosFromChar. The return value of this function changed from the address to a POINT structure to an AutoHotkey object with properties that contain the coordinates of the requested position. If a script calling this function was using the return value as the address to a POINT structure (very rare), then the script must be modified to accommodate the new return value. Otherwise, no changes are required. See the function documentation for more information.
• Edit_SpellCheckGUI. Fnt library v4.0+ and Spell library v2.1+ are now required. With the exception of calls to Fnt and Spell library functions, all calls to "other" external functions have been removed. If using this function, the script must be modified to include all of necessary libraries. See the function documentation for a complete list of the add-on libraries that must be included. In addition, the format of the Edit_SpellCheckGUI_Pos global variable has changed. See the function documentation for more information.
• Edit_TTSGUI. Fnt library v4.0+ is now required. With the exception of calls to Fnt library functions, all calls to "other" external functions have been removed. If using this function, the script must be modified to include all of the necessary libraries. See the function documentation for a complete list of the add-on libraries that must be included. In addition, the format of the Edit_TTSGUI_Pos global variable has changed. See the function documentation for more information.
• Scroll bar functions. All scroll bar functions have been moved to a new Edit_ScrollBars.ahk add-on library. If any scroll bar-related function is used, the Edit_ScrollBars.ahk library must be included. Please note that functions that scroll the text have not been moved.
Bug fixes, Updates, Enhancements, etc.:
• Edit_BlockMove. Modified to improve performance. Added optional p_PlaySound parameter. See the function documentation for more information.
• Edit_ContainsSoftLineBreaks. Rewritten to improve performance.
• Edit_ConvertCase. Minor modifications to improve performance.
• Edit_CutLine. Bug fix. Modified so that the function also returns FALSE (failure) if there is nothing to cut. This will occur if the specified line is for the last or only line and the line is null. Checking the function's return value can assist the developer if it important to know if anything has been cut or not. This change does not affect what is copied to the clipboard or the Undo operation.
• Edit_DeleteLine. Bug fix. Modified so that the function also returns FALSE (failure) if there is nothing to delete. This will occur if the specified line is for the last or only line and the line is null. Checking the function's return value can assist the developer if it important to know if anything has been deleted or not. This change does not affect the Undo operation.
• Edit_Duplicate. Modified to improve performance.
• Edit_EnableScrollBar. Enhanced so that the parameters can be set to string names (Ex: "Horizontal") as well as integer values. See the function documentation for more information.
• Edit_FindText. Two changes. 1) The p_Flags parameter renamed to p_Options. There are no functional changes because of this modification. 2) Added the "WholeWord" search option. See the function documentation for more information.
• Edit_GetComboBoxEdit. The function now returns FALSE and dumps a message to the debugger if the handle to the Edit control cannot be found. This should be rare.
• Edit_GetCueBanner. Minor bug fix. Fixed so that when running the ANSI version of AutoHotkey, the buffer was allocated to the correct size. This bug rarely presented because very few people run the ANSI version of AutoHotkey and because the bug only presented when the cue banner was larger than 512 characters (very rare) or if the developer set the p_MaxSize parameter to a small number.
• Edit_GetLastVisibleLine. Rewritten to improve performance. Added optional p_Threshold parameter. The default threshold is slightly different than the previous version. See the function documentation for all the changes.
• Edit_GetLine. Several changes. 1) Rewritten to optimize performance. 2) Fixed rare bug where the function would sometimes return 1 or 2 extra characters if the p_Length parameter was set to 1 or to a value larger than the length of the line. Most developers and all internal calls to this function never set the p_Length parameter and so this was not an issue in most cases. 3) To avoid an "out of memory" exception, the maximum buffer size is now limited to 65,535 bytes.
• Edit_GetMargins. The return value of this function changed from an integer (left margin) to an object that contains the left and right margins. The return format matches the new Edit_GetMarginsInPixels function. See the function documentation for more information.
• Edit_GetPos. The return value changed from nothing (no return value) to an AutoHotkey object with properties that contain the position and size of Edit control. See the function documentation for more information.
• Edit_GetRect. The return value has been changed to an AutoHotkey object with properties that contain the values of a RECT structure and a lot more. See the function documentation for more information.
• Edit_GetScrollBarInfo. Rewritten to return an AutoHotkey object with properties that contain the current scroll bar information for the specified scroll bar. See the function documentation for more
information.
• Edit_GetScrollBarState. Enhanced so that the parameters can be set to string names (Ex: "Horizontal") as well as to an integer value. See the function documentation for more information.
• Edit_GetSelText. Modified to improve performance.
• Edit_GetText. Modified to improve performance.
• Edit_GetTextRange. Minor changes to ensure the integrity of the parameters.
• Edit_IsStyle. Two changes. 1) Minor changes to improve performance. 2) Enhanced so that the p_Style parameter can be set to a style name (Ex: "Center") as well as to an integer value. See the function documentation for more information.
• Edit_LineLength. Modified to optimize performance. Fixed very rare bug where the wrong length was returned if the last or only line was selected or partially selected and an out-of-range line index was specified.
• Edit_MouseInSelection. Modified to improve performance.
• Edit_SetReadOnly. Changed the p_Flag parameter so that the default is TRUE, i.e. add the ES_READONLY style to make the Edit control read only. The previous version had no default. The developer was required to enter True or False.
• Edit_SelectLine. Modified to improve performance.
• Edit_SetPasswordChar. The return value changed from TRUE or "FAIL" to TRUE or FALSE. The return value should be ignored in most cases because failure is always caused by a developer error and is quickly identified because the requested action (add or remove password character) doesn't work.
• Edit_SetMargins. Minor enhancement to allow the margin parameters to be set to "Default" or "UseFontInfo". If set to either, the margin is set to the EC_USEFONTINFO value. See the function documentation for more information.
• Edit_SetStyle. Enhanced so that the parameters can be set to string names (Ex: "Number") as well as to integer values. See the function documentation for more information.
• Edit_ShowScrollBar. Enhanced so that some of the parameters can be set to string names (Ex: "Horizontal") as well as to integer values. See the function documentation for more information.
• Edit_Sort. Modified to improved performance.
• Edit_SpellCheckGUI. There are a lot of changes. 1) With the exception of calls to the Fnt and Spell libraries, all calls to "external" library functions have been changed to call Edit library functions instead. See the function documentation for a complete list of the add-on libraries (and versions) that must be included. 2) The format of the Edit_SpellCheckGUI_Pos global variable has changed. See the function documentation for more information. 3) Added the Edit_SpellCheckGUI_hWnd global variable. See the function documentation for more information. 4) Minor modifications to improve performance.
• Edit_TextIsSelected. Rewritten to improve performance.
• Edit_TTSGUI. There are several changes. 1) With the exception of calls to the Fnt library, there are lots of changes to call Edit library functions instead of "external" functions. See the function documentation for a complete list of the add-on libraries that must be included. 2) The format of the Edit_TTSGUI_Pos global variable has changed. See the function documentation for more information. 3) Minor changes to improve performance.
• Edit_WriteFile. Added support to convert to the DOS/Windows format. Useful if the Edit control is not using the DOS/Windows EOL format (should be rare) or if the Edit control was loaded with text that was not in the DOS/Windows format.
• Documentation. The general library documentation has been moved from the top of the Edit.ahk library file to a new _Edit.Doc.ahk file. Natural Docs v2.3 is used to generate HTML documentation from this file and from the function documentation. This HTML document is in a new format that is different from the previous version of this project.
• Examples. There are new and updated examples.
New Functions in Edit.ahk (the main Edit library):
• Edit_BuildOO. [Internal] Build an options object.
• Edit_EnableZoom. [Windows 10+] Enable or disable zoom for the Edit control.
• Edit_GetCaretIndex. [Windows 10+] Get the zero-based index of the caret position in the Edit control.
• Edit_GetEndOfLine. [Windows 10+] Get the end-of-line character for the Edit control.
• Edit_GetExtendedStyle. [Windows 10+] Get the extended style for the Edit control.
• Edit_GetMarginsInInches. Get the Edit control's margins as measured in inches. Ex: 0.25 (1/4 inch). This function is designed to be used in conjunction with the Edit_SetMarginsInInches function.
• Edit_GetMarginsInPixels. Get the Edit control's margins as measured in pixels. Unlike the original Edit_GetMargins function, this function is DPI aware. It should be used instead of Edit_GetMargins in most cases.
• Edit_GetZoom. [Windows 10+] Get the current zoom ratio for a multiline Edit control.
• Edit_IsHidden. Determine if the Edit control is hidden or not.
• Edit_IsZoomable. [Windows 10+] Determine if the ES_EX_ZOOMABLE extended style has been set for the Edit control.
• Edit_LineIsVisible. Determine if a line is visible or not. If not visible, an output variable contains the number of lines to scroll to make the line visible. See the function documentation for more information.
• Edit_RemovePasswordChar. Remove the password character for an Edit control.
• Edit_SetCaretIndex. [Windows 10+] Move the caret in the Edit control.
• Edit_SetDefaultMargins. Set the margins to a narrow width calculated using the text metrics of the control's current font. These are the same margins that the Edit control had when the control was created.
• Edit_SetEndOfLine. [Windows 10+] Set the end-of-line character used when a linebreak is inserted.
• Edit_SetExtendedStyle. [Windows 10+] Set or remove an extended style for the Edit control.
• Edit_SetMarginsInInches. Set the Edit control's margin as measured in inches.
• Edit_SetMarginsInPixels. Set the Edit control's margins as measured in pixels. Unlike the original Edit_SetMargins function, this function is DPI aware. It should be used instead of Edit_SetMargins in most cases.
• Edit_SetZoom. [Windows 10+] Set the zoom ratio for a multiline Edit control.
• Edit_ZoomIn. [Windows 10+] Increase the zoom ratio of Edit control by a specified percentage.
• Edit_ZoomOut. [Windows 10+] Decrease the zoom ratio of Edit control by a specified percentage.
• Edit_ZoomReset. [Windows 10+] Reset the zoom ratio of the Edit control to the original font size.
New Functions in Edit_SortOptionsDlg.ahk (add-on library (new)):
• Edit_SortOptionsDlg. Show a dialog that will allow the user to enter/select AutoHotkey sort options.
New Functions in Edit_FindDlg.ahk (add-on library (new)):
• Edit_FindDlg. This function shows a custom Find dialog that can be used with the Edit_FindText function. It is designed to be compatible with functions in the Dlg2 library. See the function documentation for more information.
New Functions in Edit_Util.ahk (add-on library (new)):
• Edit_AddTooltip. Add a tooltip to a GUI control. Used internally but is available for general use.
• Edit_GetEditInfo. Get information about the client area of a multiline Edit control.
• Edit_GetFormattedText. Get formatted text that may include soft line-break characters. See the function documentation for more information.
• Edit_GetWindowRect. Get the position, size, and offset of a window. Used internally but is available for general use.
• Edit_ShowSelectedText. Scroll text in the Edit control so that selected text is visible.
• Edit_ReloadText. Reload the text in the Edit control so that margin changes are shown correctly. See the function documentation for more information.
New Functions in Edit_UtilGUI.ahk (add-on library (new)):
• Fnt_MoveChildWindow. Move a window relative to the parent window, usually to the center of the parent window.
Deprecated Functions:
Deprecated functions are still a part of the Edit project but the functions have been moved to the Edit_Deprecated.ahk add-on library. If any of these functions are used by current scripts, the Edit_Deprecated.ahk add-on library must be included. Please note that these functions may be removed in future versions of the project.
• Edit_LoadFile. Use Edit_ReadFile instead.
• Edit_SaveFile. Use Edit_WriteFile instead.
Housekeeping:
After v3.0 has been installed, the following add-on library files from previous versions can be deleted. This cleanup is only required if a previous version of the Edit library was installed. Deleting these deprecated add-on library files will ensure that your scripts are not using outdated versions of functions.
The functions in the following add-on libraries have been moved to other add-on libraries. These add-on libraries are no longer used and should be deleted.
• Edit_BlockMove.ahk
• Edit_CutLine.ahk
• Edit_DeleteLine.ahk
• Edit_Duplicate.ahk
• Edit_SelectLine.ahk
• Edit_Sort.ahk
The functions in the following add-libraries were used by previous versions of the Edit_SpellCheckGUI or Edit_TTSGUI functions and/or by the example scripts from the previous version. These add-on libraries are no longer used and should be deleted or moved elsewhere.
• AddTooltip.ahk
• MoveChildWindow.ahk
• SortOptionsGUI.ahk
• WinGetPosEx.ahk
v2.1
Possible Script Breakers:
• Edit_SpellCheckGUI. This add-on function now uses v2.0 of the Spell library which must be installed in order for calls to this function to work correctly. In addition, the function parameters have changed. Minor changes to any script that called this function are required. See the function documentation for more information.
• Edit_TTSGUI. Major overhaul of the options available via the p_Options parameter. Also, the p_Title parameter (previously optional) has been removed. If the p_Options and/or p_Title parameters were specified, changes the script are probably required. See the function documentation for more information.
Changes/Enhancements:
• Edit_SpellCheckGUI. To increase flexibility, a new p_Options parameter has replaced some of the function's parameters. In addition, new options have been added. See the function documentation for more information.
• Edit_TTSGUI. The options available via the p_Options parameter have been overhauled. Many new options have been added and several old options have been renamed. Also, the p_Title parameter has been removed. The title can now be specified via an option in the p_Options parameter. See the function documentation for more information.
• New and updated examples.
v2.0
Requirements:
This and future versions of the library are designed to run on AutoHotkey v1.1+: ANSI, Unicode, and Unicode 64-bit.
Possible Script Breakers:
• Edit_GetParent retired. If needed, call DLL directly. Ex: hParent:=DllCall("GetParent","UPtr",hEdit,"UPtr")
Bug Fixes:
• Edit_IsWordWrap fixed to correctly identify if word wrap is enabled on the Edit control. Rare exceptions are noted in the function documentation.
New Functions:
• Edit_ContainsSoftLineBreaks. [Preview/Experimental] Returns TRUE if the Edit control contains any soft line-break characters in the text.
• Edit_GetScrollBarState. Internal function to get the state of a scroll bar.
• Edit_MouseInSelection. Returns TRUE if the mouse is somewhere within selected text of the Edit control.
• Edit_ReadFile. Similar to Edit_LoadFile except that character encoding can be specified without calling the FileEncoding command beforehand. Use instead of Edit_LoadFile.
• Edit_SystemMessage. Internal function to convert a system message number into a readable message.
• Edit_WriteFile. Similar to Edit_SaveFile except that character encoding can be specified without calling the FileEncoding command beforehand. Use instead of Edit_SaveFile.
Changes/Enhancements:
• Edit_ANSI2Unicode [internal function] retired. If needed, use the AutoHotkey StrPut command to perform the conversion. Example while running on ANSI version of AutoHotkey: VarSetCapacity(wString,StrLen(ANSIString)*2,0), StrPut(ANSIString,&wString,"UTF-16")
• Edit_IsHScrollBarVisible and Edit_IsVScrollBarVisible modified to include the STATE_SYSTEM_OFFSCREEN status when checking to see if the status bar is visible or not.
• Edit_LoadFile modified to use new Edit_ReadFile function to process the read/load request.
• Edit_SaveFile modified to use new Edit_WriteFile function to process the save/write request.
• Edit_SetTabStops. Modified so that the p_DTU parameter can also contain an AutoHotkey object with an array of values.
• Edit_ShowScrollBar. Significant number of changes made to identify and respond to the STATE_SYSTEM_OFFSCREEN status.
• Edit_TextIsSelected. Added optional output variables for the start and end select positions.
• Edit_Unicode2ANSI [Internal Function] retired. If needed, use the AutoHotkey StrGet command to perform the conversion. Example while running on ANSI version of AutoHotkey: ANSIString:=StrGet(&UnicodeString,-1,"UTF-16")
• New and updated examples.
Deprecated:
• Edit_LoadFile. Use Edit_ReadFile instead.
• Edit_SaveFile. Use Edit_WriteFile instead.
Add-On Functions - Possible Script Breakers:
• Edit_AutoSetTabStops. Return value changed to an AutoHotkey object with a simple array. See the function documentation for the details.
• Edit_TTSGUI_L.ahk add-on library file has been retired. Use Edit_TTSGUI.ahk instead. The function name (Edit_TTSGUI) and parameters remain the same.
• Edit_TTSGUI now uses the Fnt library. Script must include the Fnt library if not already included.
Add-On Functions:
• Edit_SpellCheckGUI. Added a new optional parameter to allow the developer to choose the font and/or font options for the dialog.
v1.4
Possible Script Breakers:
• Edit_GetRect. Return value changed to address of a RECT structure. Output variables remain the same.
• Edit_SpellCheckGUI. This add-on function now uses v2.0+ of the Spell library. All changes related to v2.0+ of the Spell library must be made in order to call this function. In addition, this add-on function now uses the Fnt library which must be included.
Bug Fixes:
• Edit_ShowBalloonTip. Fixed to work properly on x64.
• Edit_TTSGUI (ANSI only) and Edit_TTSGUI_L (AutoHotkey v1.1+ only) add-ons. Several bug fixes and improvements.
New Functions:
• Edit_IsWordWrap - Returns TRUE if word wrap is enabled.
New Add-On:
• Fnt_AutoSetTabStops. Examines tab-delimited data in the Edit control and automatically sets the tab stops so that each column is wide enough to show all fields in the column. Requires the Fnt library.
Updates/Enhancements:
• Edit_SpellCheckGUI. This add-on function now uses v2.0+ of the Spell library (see the Script Breakers section above). This change allows this function to be used with all versions of AutoHotkey (ANSI, Unicode, 32-bit, and 64-bit). In addition, there have been a large number changes to improve usability and performance.
• Edit_PosFromChar. Return value changed from nothing (no return value) to address of POINT structure. Also, the output variables are now optional.
• Edit_CharFromPos. Updated to improve performance.
• New and updated examples.
v1.3
New Functions:
• Edit_ActivateParent - Activate (make foremost) the parent window of the Edit control.
• Edit_Disable - Disable the Edit control.
• Edit_DisableAllScrollBars - Disable all scroll bars.
• Edit_DisableHScrollBar - Disable the horizontal scroll bar.
• Edit_DisableVScrollBar - Disable the vertical scroll bar.
• Edit_Enable - Enable the Edit control.
• Edit_EnableAllScrollBars - Enable all scroll bars.
• Edit_EnableHScrollBar - Enable the horizontal scroll bar.
• Edit_EnableVScrollBar - Enable the vertical scroll bar.
• Edit_EnableScrollBar - Enable the specified scroll bar.
• Edit_GetComboBoxEdit - Get the handle of the Edit control attached to a combo box. (thanks just me)
• Edit_GetFont - Get the font of the Edit control.
• Edit_GetParent - Get the handle to the Edit control's parent window.
• Edit_GetPos - Get the position and size of the Edit control.
• Edit_GetScrollBarInfo [Internal only] - Get the information for a scroll bar.
• Edit_GetStyle - Get the styles currently set for the Edit control.
• Edit_HasFocus - Determine if the Edit control has input focus.
• Edit_Hide - Hide the Edit control.
• Edit_HideAllScrollBars - Hide all scroll bars.
• Edit_HideHScrollBar - Hide the horizontal scroll bar.
• Edit_HideVScrollBar - Hide the vertical scroll bar.
• Edit_IsDisabled - Determine if the Edit control is disabled.
• Edit_IsHScrollBarEnabled - Determine if the horizontal scroll bar is enabled.
• Edit_IsHScrollBarVisible - Determine if the horizontal scroll bar is visible.
• Edit_IsVScrollBarEnabled - Determine if the vertical scroll bar is enabled.
• Edit_IsVScrollBarVisible - Determine if the vertical scroll bar is visible.
• Edit_ScrollPage - Scrolls the Edit control by page.
• Edit_SetFocus - Set input focus to the Edit control.
• Edit_SetFont - Set the font of the Edit control.
• Edit_Show - Show the Edit control.
• Edit_ShowAllScrollBars - Show all scroll bars.
• Edit_ShowHScrollBar - Show the horizontal scroll bar.
• Edit_ShowScrollBar - Show the specified scroll bar.
• Edit_ShowVScrollBar - Show the vertical scroll bar.
Updates/Enhancements:
• Added p_SetModify parameter to the Edit_SetText function. If set to TRUE, the modification flag on the Edit control is set after the text is set.
- Edit_LineScroll function modified to support new options: Top, Bottom, Left, and Right.
• Added 6 new examples.
v1.2
New Functions:
• Edit_ANSI2Unicode [Internal only] - Convert a character string (ANSI) to a UTF-16 (wide character) string.
• Edit_GetCueBanner - Gets the cue banner text for the Edit control. [Windows Vista+]
• Edit_HideBalloonTip - Hide balloon tip associated with the Edit control.
• Edit_SetCueBanner - Sets the cue banner text for the Edit control [Windows XP+].
• Edit_ShowBalloonTip - Display a balloon tip associated with the Edit control.
• Edit_Unicode2ANSI [Internal only] - Convert a UTF-16 (wide character) string to a character string (ANSI).
New Add-On Functions:
• Edit_TTSGUI for AutoHotkey v1.1+.
Updates/Enhancements:
• Several functions modified to support Unicode.
• Added new examples. Most of current example scripts have been rewritten or updated.
Bug Fix:
• Edit_GetLimitText - Function was converting return value from UInt (32-bit unsigned integer) to Int (32-bit signed integer) which incorrectly converted values over 2,147,483,647 into negative values. This change may affect the way your script tested for maximum values. See the function documentation or the correct maximum values to test for.
v1.1
• Fix: Edit_PosFromChar function modified to correctly return a negative number if the requested character is outside the edit control.
• Added the Edit_TTSGUI (Preview) add-on function to show a Text-To-Speech player for any edit control. Includes a plethora of options. Requires the COM library.
• Added the Edit_SpellCheckGUI (Preview) add-on function. Requires the Spell library.
• Updated examples.
v1.0
• Removed Edit_GetThumb function. Could not get the EM_GETTHUMB message to work on the Edit control. Most documentation implies that the message is for the RichEdit control.
v0.2 (Preview)
• The Edit_CharFromPos function has been rewritten to support controls with more than 65,536 characters and/or more than 65,536 lines of text.
• Added Drag & Drop example (thanks Laszlo)
v0.1 (Preview)
Original release.