Search the Community
Showing results for tags 'restrict'.
Found 1 result
RESTRICT EDIT UDF Restrict the text that can be entered in an editbox through a String Regular Expression. The UDF works be subclassing the control. >Here is a similar UDF based on Windows Message. Functions The UDF is pretty simple and could be modified with ease. User can set their SRE pattern to block the text entered in the editbox Tooltips can be used in case of an error. The title of the Tooltip is Error_2 where the number(2) signifies the pattern that caused the error. The script is made to use function pointer variables rather than direct patterns, to make it more flexible and broader. Supports +ve and -ve SRE pattern matches. See example for better understanding. Note : The Pattern should be made such that every phase of typing is met, Example, if the user wants The second letter should be always a digit. Then he should make sure that the pattern is also satisfied when user enters the first character, as through the process of typing. Index ; #INDEX# ======================================================================================================================= ; Title .........: RestrictEdit ; Version........: 1.0 ; AutoIt Version : 18.104.22.168++ ; Language ......: English ; Author(s)......: Phoenix XL ; Librarie(s)....: WinAPI, Array and GUIEdit ; Description ...: Functions for restricting the text typed in an Edit control through SRE. ; The edit control is subclassed and the original processing is blocked when pattern isn't satisfied. ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ;_Restrict_Edit ; =============================================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ; HideToolTip_Edit ;_NewWnd_Proc_ ;_SubClass_ ; =============================================================================================================================== ChangeLog v1.0 - First Release v2.0 - Replaced the SRE pattern parameter(2nd parameter) with function pointer parameter[A script Breaking change]. Added support for positive and negative pattern matches Download v2.0 RestrictEdit(UDF).7z Previous downloads : 161