-
Posts
11,800 -
Joined
-
Last visited
-
Days Won
66
mLipok last won the day on March 29
mLipok had the most liked content!
About mLipok

- Birthday 07/19/1978
Profile Information
-
Member Title
Sometimes... even usually I'm nitpicky.
-
Location
Europe, Poland, Upper Silesia, Zabrze
-
Interests
¯\_(ツ)_/¯
Recent Profile Visitors
29,984 profile views
mLipok's Achievements
-
Today I read this : https://stackoverflow.com/questions/3883129/extract-tortoisesvn-saved-password And also read a little about: Windows Data Protection API also: https://en.wikipedia.org/wiki/Data_Protection_API and: it seams that also browsers uses DPAPI Did you hit this API before ?
-
mLipok reacted to a post in a topic:
ListView how to change color of selected unfocused listview element / row ?
-
mLipok reacted to a post in a topic:
ListView how to change color of selected unfocused listview element / row ?
-
mLipok reacted to a post in a topic:
Autosize ListView using $LVSCW_AUTOSIZE and $LVSCW_AUTOSIZE_USEHEADER
-
donnyh13 reacted to a post in a topic:
ListView how to change color of selected unfocused listview element / row ?
-
mLipok reacted to a post in a topic:
When listview loses focus,the selected item,How to keep blue
-
mLipok reacted to a post in a topic:
When listview loses focus,the selected item,How to keep blue
-
mLipok reacted to a post in a topic:
ListView how to change color of selected unfocused listview element / row ?
-
I have a problem. The selected item/row in the listview changes color after clicking another item in the window and is often almost invisible - especially on older monitors or in unfavorable lighting, not to mention for users with poor eyesight. Therefore, I'd like to be able to specify the color of an item that is selected but not focused. For example, using the example GUICtrlCreateListView.au3 from HelpFile ; == Example 2 ; Coloring Groups #include <ColorConstants.au3> #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WinAPIGdi.au3> #include <WinAPIGdiDC.au3> #include <WinAPIHObj.au3> Global $g_hGUI = 0, $g_hListView = 00 Example() Func Example() ; create GUI window $g_hGUI = GUICreate("Example") ; create ListView control Local $idListview = GUICtrlCreateListView("", 10, 10, 350, 200) $g_hListView = ControlGetHandle($g_hGUI, '', $idListview) Local $idButton = GUICtrlCreateButton("Test", 10, 220, 70, 20) ; Enable extended control styles _GUICtrlListView_SetExtendedListViewStyle($idListview, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES)) GUISetState(@SW_SHOW) ; Set ANSI format ;~ _GUICtrlListView_SetUnicodeFormat($idListview, False) GUIRegisterMsg($WM_NOTIFY, WM_NOTIFY) ; Load images Local $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, $COLOR_RED, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, $COLOR_GREEN, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, $COLOR_BLUE, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) _GUICtrlListView_AddColumn($idListview, "Column 3", 142) ; Add items _GUICtrlListView_AddItem($idListview, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 2", 1, 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 3", 2, 2) _GUICtrlListView_AddItem($idListview, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 2: Col 2", 1, 2) _GUICtrlListView_AddItem($idListview, "Row 3: Col 1", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1") _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, "Test button clicked") EndSwitch WEnd GUIDelete() EndFunc ;==>Example Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam If $hWnd = $g_hGUI Then ; check if Our GUI - in case you create multiple GUI - Window Local $tItem = DllStructCreate($tagNMLVCUSTOMDRAW, $lParam) If $tItem.hWndFrom = $g_hListView Then ; check if our ListView - in case you have few ListView on the same GUI - Window Local $iItemSpec = $tItem.dwItemSpec ; ItemIndex for "RowElement", GroupID for "GroupElement" If $iItemSpec >= 0 And $tItem.Code = $NM_CUSTOMDRAW And $tItem.dwItemType = $LVCDI_GROUP And $tItem.dwDrawStage = $CDDS_PREPAINT Then Local $tRect = DllStructCreate($tagRECT, DllStructGetPtr($tItem, "left")) #Region ; create full row background (black) with a leading line (red) $tRect.bottom = $tRect.top + 15 Local $hBrush = _WinAPI_CreateSolidBrush($COLOR_BLACK) _WinAPI_FillRect($tItem.HDC, $tRect, $hBrush) _WinAPI_DeleteObject($hBrush) Local $hPen = _WinAPI_CreatePen($PS_SOLID, 1, _WinAPI_SwitchColor($COLOR_RED)) ; RGB to BGR Local $oOrig = _WinAPI_SelectObject($tItem.HDC, $hPen) _WinAPI_DrawLine($tItem.HDC, $tRect.left + 5, $tRect.top + 8, $tRect.right - 5, $tRect.top + 8) _WinAPI_SelectObject($tItem.HDC, $oOrig) _WinAPI_DeleteObject($hPen) Local $aGroup = _GUICtrlListView_GetGroupInfo($tItem.hWndFrom, $iItemSpec) #EndRegion ; create full row background (black) with a leading line (red) #Region ; repaint the text with your own color (dark blue) and your own background (light blue) - on the previously created full row background _WinAPI_SetBkColor($tItem.HDC, _WinAPI_SwitchColor($COLOR_LIGHTBLUE)) ; RGB to BGR _WinAPI_SetBkMode($tItem.HDC, $OPAQUE) _WinAPI_SetTextColor($tItem.HDC, _WinAPI_SwitchColor($COLOR_BLUE)) ; RGB to BGR $tRect.left += 20 _WinAPI_DrawText($tItem.HDC, " " & $aGroup[0] & " ", $tRect, $DT_LEFT) #EndRegion ; repaint the text with your own color (dark blue) and your own background (light blue) - on the previously created full row background Return $CDRF_SKIPDEFAULT EndIf EndIf EndIf EndFunc ;==>WM_NOTIFY Selected focused: and after click in value - Selected unfocused: I suppose that this will need to use some of WM_NOTIFY maybe better lets focus on modified _GUICtrlListView_InsertGroup[2].au3 ; == Example 2 ; Coloring Groups #include <ColorConstants.au3> #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WinAPIGdi.au3> #include <WinAPIGdiDC.au3> #include <WinAPIHObj.au3> Global $g_hGUI = 0, $g_hListView = 00 Example() Func Example() ; create GUI window $g_hGUI = GUICreate("Example") ; create ListView control Local $idListview = GUICtrlCreateListView("", 10, 10, 350, 200) $g_hListView = ControlGetHandle($g_hGUI, '', $idListview) ; Enable extended control styles _GUICtrlListView_SetExtendedListViewStyle($idListview, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES)) GUISetState(@SW_SHOW) ; Set ANSI format ;~ _GUICtrlListView_SetUnicodeFormat($idListview, False) GUIRegisterMsg($WM_NOTIFY, WM_NOTIFY) ; Load images Local $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, $COLOR_RED, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, $COLOR_GREEN, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, $COLOR_BLUE, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) _GUICtrlListView_AddColumn($idListview, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($idListview, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 2", 1, 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 3", 2, 2) _GUICtrlListView_AddItem($idListview, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 2: Col 2", 1, 2) _GUICtrlListView_AddItem($idListview, "Row 3: Col 1", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1") _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam If $hWnd = $g_hGUI Then ; check if Our GUI - in case you create multiple GUI - Window Local $tItem = DllStructCreate($tagNMLVCUSTOMDRAW, $lParam) If $tItem.hWndFrom = $g_hListView Then ; check if our ListView - in case you have few ListView on the same GUI - Window Local $iItemSpec = $tItem.dwItemSpec ; ItemIndex for "RowElement", GroupID for "GroupElement" If $iItemSpec >= 0 And $tItem.Code = $NM_CUSTOMDRAW And $tItem.dwItemType = $LVCDI_GROUP And $tItem.dwDrawStage = $CDDS_PREPAINT Then Local $tRect = DllStructCreate($tagRECT, DllStructGetPtr($tItem, "left")) #Region ; create full row background (black) with a leading line (red) $tRect.bottom = $tRect.top + 15 Local $hBrush = _WinAPI_CreateSolidBrush($COLOR_BLACK) _WinAPI_FillRect($tItem.HDC, $tRect, $hBrush) _WinAPI_DeleteObject($hBrush) Local $hPen = _WinAPI_CreatePen($PS_SOLID, 1, _WinAPI_SwitchColor($COLOR_RED)) ; RGB to BGR Local $oOrig = _WinAPI_SelectObject($tItem.HDC, $hPen) _WinAPI_DrawLine($tItem.HDC, $tRect.left + 5, $tRect.top + 8, $tRect.right - 5, $tRect.top + 8) _WinAPI_SelectObject($tItem.HDC, $oOrig) _WinAPI_DeleteObject($hPen) Local $aGroup = _GUICtrlListView_GetGroupInfo($tItem.hWndFrom, $iItemSpec) #EndRegion ; create full row background (black) with a leading line (red) #Region ; repaint the text with your own color (dark blue) and your own background (light blue) - on the previously created full row background _WinAPI_SetBkColor($tItem.HDC, _WinAPI_SwitchColor($COLOR_LIGHTBLUE)) ; RGB to BGR _WinAPI_SetBkMode($tItem.HDC, $OPAQUE) _WinAPI_SetTextColor($tItem.HDC, _WinAPI_SwitchColor($COLOR_BLUE)) ; RGB to BGR $tRect.left += 20 _WinAPI_DrawText($tItem.HDC, " " & $aGroup[0] & " ", $tRect, $DT_LEFT) #EndRegion ; repaint the text with your own color (dark blue) and your own background (light blue) - on the previously created full row background Return $CDRF_SKIPDEFAULT EndIf EndIf EndIf EndFunc ;==>WM_NOTIFY
-
Help File/Documentation Issues. (Discussion Only)
mLipok replied to guinness's topic in AutoIt Technical Discussion
_WinAPI_SetThemeAppProperties help says: but as far as I see the example is not sending this message . Could somebody propose a fix or at least explain this case to me ? #include <GUIConstantsEx.au3> #include <WinAPITheme.au3> Local $iTheme = _WinAPI_GetThemeAppProperties() Local $hForm = GUICreate("WinAPI Get/Set Theme AppProperties (v" & @AutoItVersion & ")", 310, 360) GUISetFont(8.5, 400, 0, 'MS Shell Dlg', $hForm) GUICtrlCreateGroup('Group', 10, 10, 140, 95) GUICtrlCreateCheckbox('Check1', 22, 26, 120, 23) GUICtrlCreateCheckbox('Check2', 22, 49, 120, 23) GUICtrlCreateCheckbox('Check3', 22, 72, 120, 23) GUICtrlCreateGroup('Group', 160, 10, 140, 95) GUICtrlCreateRadio('Radio1', 172, 26, 120, 23) GUICtrlCreateRadio('Radio2', 172, 49, 120, 23) GUICtrlCreateRadio('Radio3', 172, 72, 120, 23) GUICtrlCreateButton('OK', 120, 330, 70, 23) _WinAPI_SetThemeAppProperties($STAP_ALLOW_NONCLIENT) GUICtrlCreateTab(10, 118, 292, 206) GUICtrlCreateTabItem('Tab1') GUICtrlCreateTabItem('Tab2') GUICtrlCreateTabItem('') _WinAPI_SetThemeAppProperties($iTheme) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE -
Small refactoring: ; From Nine Opt("MustDeclareVars", True) #include <Constants.au3> Global Const $CLSID_SpellCheckerFactory = "{7AB36653-1796-484B-BDFA-E74F1DB7C1DC}" Global Const $IID_ISpellCheckerFactory = "{8E018A9D-2415-4677-BF08-794EA61F94BB}" Global Const $tag_ISpellCheckerFactory = _ "get_SupportedLanguages hresult(ptr*);" & _ "IsSupported hresult(wstr;bool*);" & _ "CreateSpellChecker hresult(wstr;ptr*);" Global Const $IID_ISpellChecker = "{B6FD0B71-E2BC-4653-8D05-F197E412770B}" Global Const $tag_ISpellChecker = _ "get_LanguageTag hresult(wstr*);" & _ "Check hresult(wstr;ptr*);" & _ "Suggest hresult(wstr;ptr*);" & _ "Add hresult(wstr);" & _ "Ignore hresult(wstr);" Global Const $IID_IEnumSpellingError = "{803E3BD4-2828-4410-8290-418D1D73C762}" Global Const $tag_IEnumSpellingError = _ "Next hresult(ptr*);" Example() Func Example() ; initialize Spell Checking API Local $oSpell = _MSSpellCheckingAPI_CreateSpell("en-EN") ; English SetUp ;~ Local $oSpell = _MSSpellCheckingAPI_CreateSpell("fr-FR") ; French SetUp ;~ Local $oSpell = _MSSpellCheckingAPI_CreateSpell("pl-PL") ; Polish SetUp If @error Then Return SetError(@error, @extended, '') ; some words to check Local $aWord = ["Spell Checking", "Speell", "Checcking"] ; English words ;~ Local $aWord = ["Test", "Entêté", "Pasd'allure"] ; French words ;~ Local $aWord = ["Sprawdzanie pisowni", "sprawdanie", "pissowni"] ; Polish words Local $bHresult = False For $sWord In $aWord $bHresult = _MSSpellCheckingAPI_Check($oSpell, $sWord) MsgBox((($bHresult) ? ($MB_OK) : ($MB_ICONWARNING)), ($bHresult ? "Correct" : "Error"), $sWord) Next EndFunc ;==>Example Func _MSSpellCheckingAPI_CreateSpell($tag_language = "en-EN") Local $oFactory = ObjCreateInterface($CLSID_SpellCheckerFactory, $IID_ISpellCheckerFactory, $tag_ISpellCheckerFactory) If Not IsObj($oFactory) Then If Not @Compiled Then ConsoleWrite("! Err : oFactory" & @CRLF) Return SetError(1) EndIf Local $pSpellChecker $oFactory.CreateSpellChecker($tag_language, $pSpellChecker) Local $oSpell = ObjCreateInterface($pSpellChecker, $IID_ISpellChecker, $tag_ISpellChecker) If Not IsObj($oSpell) Then If Not @Compiled Then ConsoleWrite("! Err : oSpell" & @CRLF) Return SetError(2) EndIf Return $oSpell EndFunc ;==>_MSSpellCheckingAPI_CreateSpell Func _MSSpellCheckingAPI_Check(ByRef $oSpell, $sWord) Local $pErrors, $oErrors, $iHresult $oSpell.Check($sWord, $pErrors) $oErrors = ObjCreateInterface($pErrors, $IID_IEnumSpellingError, $tag_IEnumSpellingError) If Not IsObj($oErrors) Then If Not @Compiled Then ConsoleWrite("! Err : oErrors" & @CRLF) Return SetError(3, 0, False) EndIf $iHresult = $oErrors.Next($pErrors) Return $iHresult ? True : False EndFunc ;==>_MSSpellCheckingAPI_Check
-
mLipok reacted to a post in a topic:
MS Spell Checking API
-
I know this is old topic. I didn't answer here. I'm asking if anyone knows if this is related. I know that even if it were related, a lot of time has passed and an update would be needed. I also consider that I'll have to handle the update myself. For now, I'm simply looking for various solutions related to Spell Checking itself. I'm looking for the most suitable option. I am currently waiting for a solution that @Nine may create or not in this thread: I hope so. However, being cautious, I also asked the question here to see if anyone else is using the solution created by @iCode. So I hope you won't close this thread
-
ioa747 reacted to a post in a topic:
MS Spell Checking API
-
mLipok reacted to a post in a topic:
MS Spell Checking API
-
mLipok reacted to a post in a topic:
MS Spell Checking API
-
I was in hope that my links were good. Finally I found this file on my disc as I had this file: c:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um\spellcheck.h but @ioa747 was faster than me.
-
Is this related to: https://github.com/hunspell/hunspell/releases ?
-
https://learn.microsoft.com/en-us/windows/win32/api/spellcheck/ https://github.com/gcc-mirror/gcc/blob/master/gcc/spellcheck.h https://gist.github.com/mnovakovic/583648d14835de86bd45608c1c507826 https://github.com/microsoft/Windows-classic-samples/blob/main/Samples/SpellCheckerClient/cpp/commands.h ?
-
donnyh13 reacted to a post in a topic:
MS Spell Checking API
-
btw. It is little funny (as I did many COM stuff in AutoIt) but .... I'm not familiar with ObjCreateInterface() and for this reason at first I also asked ChatGPT for example: #include <MsgBoxConstants.au3> ; === COM interface GUIDs (global constants) === Global Const $CLSID_SpellCheckerFactory = "{7AB36653-1796-484B-BDFA-E74F1DB7C1DC}" Global Const $IID_ISpellCheckerFactory = "{8E018A9D-2415-4677-BF08-794EA61F94BB}" Global Const $IID_ISpellChecker = "{B6FD0B71-E2BC-4653-8D05-F197E0D3B83B}" ; === Interface definitions (global tags) === Global Const $TAG_ISpellCheckerFactory = _ "CreateSpellChecker hresult(wstr;ptr*);" & _ ; Create spell checker for language "get_SupportedLanguages hresult(ptr*);" ; Get supported languages Global Const $TAG_ISpellChecker = _ "Check hresult(wstr;ptr*);" & _ ; Check text for spelling errors "Suggest hresult(wstr;ptr*);" ; Get suggestions ; === Example entry point === _EXAMPLE() Func _EXAMPLE() ; Create SpellCheckerFactory COM object Local $oFactory = ObjCreateInterface( _ $CLSID_SpellCheckerFactory, _ $IID_ISpellCheckerFactory, _ $TAG_ISpellCheckerFactory) If @error Then MsgBox($MB_ICONERROR, "Error", "Failed to create SpellCheckerFactory") Return EndIf ; Create spell checker for Polish language Local $pSpellChecker = 0 $oFactory.CreateSpellChecker("pl-PL", $pSpellChecker) If $pSpellChecker = 0 Then MsgBox($MB_ICONERROR, "Error", "Failed to create SpellChecker for pl-PL") Return EndIf ; Bind ISpellChecker interface Local $oSpell = ObjCreateInterface($pSpellChecker, $IID_ISpellChecker, $TAG_ISpellChecker) If @error Then MsgBox($MB_ICONERROR, "Error", "Failed to bind ISpellChecker interface") Return EndIf ; Word to test Local $sWord = "ksionszka" ; Perform spell check Local $pErrors = 0 $oSpell.Check($sWord, $pErrors) ; NOTE: This is simplified logic! ; Proper implementation should enumerate IEnumSpellingError If $pErrors = 0 Then MsgBox($MB_ICONINFORMATION, "Result", "Word is correct: " & $sWord) Else MsgBox($MB_ICONWARNING, "Result", "Word is INCORRECT: " & $sWord) EndIf EndFunc ;==>_EXAMPLE of course not works well.
-
I saw here on the forum few different ways of checking spell: Spell Checker (by iCode) OpenOffice/LibreOffice Spell Checker (by GMK) v0.1.1 Scite4AutoIt SpellChecker using LibreOffice even few topics about spell checking with Word. Custom Spell Checker But I start wondering how Notepad in Windows 11 finds out that some words are written incorrectly. Then I ask ChatGPT about and he point me to Spell Checking API. https://learn.microsoft.com/en-us/windows/win32/intl/about-the-spell-checker-api So here is my question: Has anyone worked in AutoIt with MS Windows Spell Checking API ? EDIT: https://github.com/microsoft/Windows-classic-samples/blob/main/Samples/SpellCheckerClient/cpp/SampleSpellingClient.cpp
-
mLipok reacted to a post in a topic:
Validate if user entering the right email address format
-
Validate if user entering the right email address format
mLipok replied to dannydy's topic in AutoIt General Help and Support
I know old thread. Just needed to us this snippet so wanted to share my refactored version: ;~ https://www.autoitscript.com/forum/topic/150225-validate-if-user-entering-the-right-email-address-format/#findComment-1072558 #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> #include <WindowsConstants.au3> mainlobby() Func mainlobby() GUICreate('', 320, 200, 500, 250) Local $recipientsenter = GUICtrlCreateInput("", 10, 5, 250, 20) Local $sendemilbutton = GUICtrlCreateButton("Send Email", 230, 128, 70, 25, 1) GUISetState() Local $msg Do $msg = GUIGetMsg() Select Case $msg = $sendemilbutton Local $sEMail = GUICtrlRead($recipientsenter) If $sEMail = "" Then MsgBox(16, "Email Not Input", "Cannot Find Any Email") Else MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, "IsValidEmailAdress = " & _IsValidEmailAdress($sEMail)) EndIf EndSelect Until $msg = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>mainlobby Func _IsValidEmailAdress($sEMail) Local $aEmail = StringSplit($sEMail, ';') Local $localpart = "[[:alnum:]!#$%&'*+-/=?^_`{|}~.]+" Local $domainname = "[[:alnum:].-]+\.[[:alnum:]]+" Local $i_CountValid = 0 For $IDX = 1 To $aEmail[0] If StringRegExp($aEmail[$IDX], '(?i)^(' & $localpart & ')@(' & $domainname & ')$', $STR_REGEXPMATCH) Then $i_CountValid += 1 EndIf Next Return ($i_CountValid = $aEmail[0]) EndFunc ;==>_IsValidEmailAdress -
pixelsearch reacted to a post in a topic:
Help File/Documentation Issues. (Discussion Only)
-
Help File/Documentation Issues. (Discussion Only)
mLipok replied to guinness's topic in AutoIt Technical Discussion
modified example: ;~ https://www.autoitscript.com/forum/topic/153782-help-filedocumentation-issues-discussion-only/page/43/#findComment-1551537 #include <MsgBoxConstants.au3> #include <WinAPISysWin.au3> #include <WindowsConstants.au3> Opt("MustDeclareVars", 1) Example() Func Example() Local $hGUI, $hMdiChild $hGUI = GUICreate("") WinSetTitle($hGUI, "", "GUI " & $hGUI) GUICtrlCreateLabel("Label in GUI", 200, 0, 90, 20) GUICtrlSetBkColor(-1, 0xFFFF00) $hMdiChild = GUICreate("", 300, 200, 0, 0, -1, BitOR($WS_EX_WINDOWEDGE, $WS_EX_MDICHILD), $hGUI) WinSetTitle($hMdiChild, "", "MdiChild " & $hMdiChild) GUICtrlCreateLabel("Label in MdiChild", 200, 0, 90, 20) GUICtrlSetBkColor(-1, 0x00FFFF) GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_SHOW, $hMdiChild) ConsoleWrite("====" & @CRLF) ConsoleWrite( _ "> Parent/Ancestors of MdiChild window " & $hMdiChild & @CRLF & _ "Reminder : $hGUI = " & $hGUI & @CRLF & _ "Reminder : $hMdiChild = " & $hMdiChild & @CRLF & @CRLF & _ "_WinAPI_GetParent = " & _WinAPI_GetParent($hMdiChild) & " (owner, not parent +++)" & @CRLF & @CRLF & _ "_WinAPI_GetAncestor (Parent) = " & _WinAPI_GetAncestor($hMdiChild, $GA_PARENT) & " (desktop)" & @CRLF & _ "_WinAPI_GetAncestor (Root) = " & _WinAPI_GetAncestor($hMdiChild, $GA_ROOT) & " (itself / $hMdiChild)" & @CRLF & _ "_WinAPI_GetAncestor (Owner) = " & _WinAPI_GetAncestor($hMdiChild, $GA_ROOTOWNER) & " (gui / $hGUI)" & @CRLF & _ "") ConsoleWrite("====" & @CRLF) ConsoleWrite("- TEST 1 - ExStyles of $hMdiChild : 0x" & Hex(_WinAPI_GetWindowLong($hMdiChild, $GWL_EXSTYLE), 8) & @CRLF) _WinAPI_SetWindowLong($hMdiChild, $GWL_EXSTYLE, $WS_EX_MDICHILD) ConsoleWrite("- TEST 2 - ExStyles of $hMdiChild : 0x" & Hex(_WinAPI_GetWindowLong($hMdiChild, $GWL_EXSTYLE), 8) & @CRLF) ConsoleWrite("====" & @CRLF) Do Until GUIGetMsg() = -3 GUIDelete($hMdiChild) GUIDelete($hGUI) EndFunc ;==>Example results: -
Help File/Documentation Issues. (Discussion Only)
mLipok replied to guinness's topic in AutoIt Technical Discussion
First What I did is to change: $hMdiChild = GUICreate("", 300, 200, 0, 0, -1, $WS_EX_MDICHILD, $hGUI) to $hMdiChild = GUICreate("", 300, 200, 0, 0, -1, BitOR($WS_EX_WINDOWEDGE, $WS_EX_MDICHILD), $hGUI) but it still won't work and I have the same result as you have: -
Help File/Documentation Issues. (Discussion Only)
mLipok replied to guinness's topic in AutoIt Technical Discussion
my modified example: #include <MsgBoxConstants.au3> #include <WinAPISysWin.au3> #include <WindowsStylesConstants.au3> Example() Func Example() Local $hWnd_0 = GUICreate("Window 0") ConsoleWrite("$hWnd_0 = " & $hWnd_0 & @CRLF) Local $hWnd_1 = GUICreate("Window 1", Default, Default, -1, -1, -1, $WS_EX_MDICHILD, $hWnd_0) ConsoleWrite("$hWnd_1 = " & $hWnd_1 & @CRLF) Local $hWnd_2 = GUICreate("Window 2", Default, Default, -1, -1, -1, -1, $hWnd_0) ConsoleWrite("$hWnd_2 = " & $hWnd_2 & @CRLF) ConsoleWrite(@CRLF) Local $id_Label_1 = GUICtrlCreateLabel("Label 1", 0, 0) Local $h_Label_1 = GUICtrlGetHandle($id_Label_1) ConsoleWrite("$h_Label_1 = " & $h_Label_1 & @CRLF) Local $id_Label_2 = GUICtrlCreateLabel("Label_2", 0, 0) Local $h_Label_2 = GUICtrlGetHandle($id_Label_2) ConsoleWrite("$h_Label_2 = " & $h_Label_2 & @CRLF) ConsoleWrite(@CRLF) ConsoleWrite("- " & "TEST 1: Parent :: Get Parent Ancestor of " & $h_Label_2 & " > " & _WinAPI_GetAncestor($h_Label_2, $GA_PARENT) & ' TITLE=' & WinGetTitle(_WinAPI_GetAncestor($h_Label_2, $GA_PARENT)) & @CRLF) ConsoleWrite("- " & "TEST 2: Root :: Get Root Ancestor of " & $h_Label_2 & " > " & _WinAPI_GetAncestor($h_Label_2, $GA_ROOT) & ' TITLE=' & WinGetTitle(_WinAPI_GetAncestor($h_Label_2, $GA_ROOT)) & @CRLF) ConsoleWrite("- " & "TEST 3: Root Owner :: Get Root Owner Ancestor of " & $h_Label_2 & " > " & _WinAPI_GetAncestor($h_Label_2, $GA_ROOTOWNER) & ' TITLE=' & WinGetTitle(_WinAPI_GetAncestor($h_Label_2, $GA_ROOTOWNER)) & @CRLF) EndFunc ;==>Example and the question: Could somebody show example when Test 1 result is different from Test 2 ? my results: