Deye Posted February 14, 2019 Share Posted February 14, 2019 (edited) Hi, Is there a way to detect glyphs in an ALT code showing only as a plain square tofu And any input about _GUIScrollbars_Generate, it seems to completely hang the system when it hangs ( windows 10 ) expandcollapse popup#include <GUIConstantsEx.au3> #include "GUIScrollbars_Ex.au3" #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") ;~ Local $hGUI = GUICreate("Example", 1000, 500, -1, -1, $WS_VSCROLL+$WS_SIZEBOX,$ES_AUTOVSCROLL) Local $hGUI = GUICreate("Example", 1000, 500) $X = 10 $Y = 1 $max = 1700 Local $aCntrls[$max + 1] $ChrW = "E6FF" For $i = 1 To $max $ChrW = Hex(Dec($ChrW) + 1, 4) $aCntrls[$i] = GUICtrlCreateLabel(ChrW("0x" & $ChrW), $X, $Y, 25, 25, $WS_BORDER) GUICtrlSetFont(-1, 13, 500, -1, "Segoe MDL2 Assets") GUICtrlCreateLabel($ChrW, $X, $Y + 20, 25, 15, $WS_BORDER) GUICtrlSetFont(-1, 6) $X += 25 If $X > 960 Then $X = 10 $Y += 45 EndIf Next _GUIScrollbars_Generate($hGUI, 0, 800) GUISetState(@SW_SHOW, $hGUI) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE DllClose($hDLL) Exit Case $aCntrls[1] To $aCntrls[$max] $i = $msg / 2 $i += (IsInt($i) ? -0.5 : 0) GUICtrlSetBkColor($aCntrls[$i], 0X1BDC8) Local $aPos = MouseGetPos() $hGUItmp = GUICreate('', 60, 50, $aPos[0], $aPos[1], BitOR($WS_POPUP, $WS_DLGFRAME), BitOR($WS_EX_STATICEDGE, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUICtrlCreateLabel(ChrW("0x" & GUICtrlRead($aCntrls[$i] + 1)), 5, 2, 50, 50, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont(-1, 20, "", -1, "Segoe MDL2 Assets") GUICtrlCreateLabel("0x" & GUICtrlRead($aCntrls[$i] + 1), -1, 30) GUICtrlSetFont(-1, 9) GUISetState(@SW_SHOWNA, $hGUItmp) While _IsPressed("01", $hDLL) Sleep(250) WEnd Sleep(150) GUIDelete($hGUItmp) GUICtrlSetBkColor($aCntrls[$i], 0xffffff) EndSwitch WEnd Thanks Deye Edited February 15, 2019 by Deye Link to comment Share on other sites More sharing options...
Deye Posted February 14, 2019 Author Share Posted February 14, 2019 Cultivated the question a bit For the heads up: Maybe something can be made with this example : Thanks Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 15, 2019 Moderators Share Posted February 15, 2019 Deye, I get the scrollbars generated without problem - what do you get? And the UDF requires "0" as a parameter when not requiring scroll in one axis and not "-1", but it still functions for me even with that mistake. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Deye Posted February 15, 2019 Author Share Posted February 15, 2019 (edited) Hi Melba, It happens as soon as I press on some label Not sure what to call it, If its a memory leak and such If any one else can detect what it is Or confirm the same .. Thanks Deye Edited February 15, 2019 by Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 15, 2019 Moderators Share Posted February 15, 2019 Deye, Nothing untoward happens to the scrollbars for me when I click a label - they just keep on working. The labels take some time to reload - hardly surprising when you have so many. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Deye Posted February 15, 2019 Author Share Posted February 15, 2019 Melba, Even if I go as to 10 pixels higher than the the gui the same happens As Without _GUIScrollbars it acts very fast (Also, there is no loop that detects the pressed control ..) Note that if I press a label (say right after a quick scroll) the correct label gets selected (as it started carrying out whats for it in the while loop ) but then something else starts\still running in the background and interrupts, causing everything to hang ( in many occasions for more than a minute ) if there where functions to help debug\Avoid that For instance: Case $aCntrls[1] To $aCntrls[$max] $aPos = _GUIScrollbars_Hold() ; save the position of the scroll bars And Stop all _WM procedures ; DO Stuff _GUIScrollbars_UnHold($aPos) ; Restart\Refresh It would be easier for me to determine anything Thanks Deye Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 15, 2019 Moderators Share Posted February 15, 2019 Deye, I can "quick scroll" and click on any label without any problem. Is this the complete script you are actually running or is there something else that might interfere? Have you thought of using Opt("TrayIconDebug") to see where the script is hanging? That might offer a clue as to what is happening. As to writing debugging functions - you can always write your own: Use _GUIScrollBars_GetScrollPos($hWnd, $SB_VERT) to get the scrollbar position Use the $bRegisterMsg when generating the scrollbars to prevent the UDF from automatically registering the various messages and write your own handlers. which you can toggle as required M23 Deye 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Deye Posted February 15, 2019 Author Share Posted February 15, 2019 Thanks Melba, The example is as is, all that I'm running along the with the UDF I'm afraid you are right about how scrollbars are going to behave either ways As you have all the inventory of past experience with the issue ,So I'm not going to even try messing with it anymore Now maybe if someone finds a way to remove the tofus showing up this will have a better chance @ being less limited .. Thanks as always Deye Link to comment Share on other sites More sharing options...
Deye Posted April 15, 2019 Author Share Posted April 15, 2019 @ Back to this one. If the tofu images will always have the same binary string then maybe _GDIPlus_BitmapCreateFromMemory can work for doing the binary string comparing And so : What can be used to load\create GDI images for characters, Will I need to Screen Capture each one from a test label Or is there a better yet direct approach for doing this Thanks Deye Link to comment Share on other sites More sharing options...
Deye Posted April 16, 2019 Author Share Posted April 16, 2019 As for some leading points I had started looking here: https://devblogs.microsoft.com/oldnewthing/20040716-00/?p=38413 https://chromium.googlesource.com/chromium/src/+/master/ui/gfx/font_fallback_win.cc derived from: https://stackoverflow.com/questions/54050095/how-to-tell-if-a-surrogate-pair-unicode-character-is-supported-by-the-font?answertab=votes#tab-top Then there is this one: https://www.codeproject.com/Articles/18043/Removing-or-replacing-non-printable-Unicode-charac or vdmx 'OS/2' tables : ?? https://docs.microsoft.com/en-us/typography/opentype/spec/vdmx http://www.homer.com.au/webdoc/graphics/ttf/vdmx.htm Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now