-
Posts
3,070 -
Joined
-
Last visited
-
Days Won
15
junkew last won the day on April 29
junkew had the most liked content!
About junkew

Profile Information
-
Location
Netherlands, Oostzaan
junkew's Achievements
-
If spytools are not showing it most likely you cannot retrieve with api. For sure you need to look not at the button for the text. Best chance to send ctrl a and ctrl c and get it from the clipboard with the clipboard functions
-
$t = _UIA_getPropertyValue($oUIElement, $UIA_BoundingRectanglePropertyId) And drawrect will give the information you need to use in screencapture function
-
n3wbie reacted to a post in a topic: Using UI Automation Code in AutoIt
-
Just add _ScreenCapture_Capture that isn't a workaround. That would be the solution. You already have the ltwh as part of the highlight parameters.
-
VenusProject2 reacted to a post in a topic: .NET Common Language Runtime (CLR) Framework
-
argumentum reacted to a post in a topic: _WinAPI_SetWinEventHook() help file example - help
-
MattyD reacted to a post in a topic: _WinAPI_SetWinEventHook() help file example - help
-
KaFu reacted to a post in a topic: _WinAPI_SetWinEventHook() help file example - help
-
_WinAPI_SetWinEventHook() help file example - help
junkew replied to argumentum's topic in AutoIt GUI Help and Support
Uia and event hooks are different things. UIA cannot catch all. The event windows hooks are technically a deeper layer. For this example I would just find a message with an event spy and build an example for that in the help file. UIA cannot do much with java ui controls or browser things like playwright can do. So most likely there is not one UI interception framework. Yes, a uia udf as part of AutoIT would be nice but it's a lot of work.😀 -
Need help converting percentage to hex
junkew replied to WildByDesign's topic in AutoIt General Help and Support
Chatgpt gave a nice answer I feel based on the table given it even suggest things about gamma correction on how humans perceive color so then it gives you clues to think broader then just percentage to hex if its about colors on a monitor 😉 #FUNCTION# ==================================================================================================================== ; Name...........: _PercentToHex ; Description ...: Converts a percentage (0–100) to a two-digit hex value (0x00–0xFF) following a gamma-like curve. ; Syntax.........: _PercentToHex($iPercent) ; Parameters ....: $iPercent - Integer between 0 and 100 ; Return values .: Hex string (e.g. "FF", "A3", "00") ; =============================================================================================================================== Func _PercentToHex($iPercent) If $iPercent < 0 Then $iPercent = 0 If $iPercent > 100 Then $iPercent = 100 ; Apply gamma-corrected curve Local $gamma = 2.2 Local $normalized = $iPercent / 100 Local $adjusted = $normalized ^ $gamma Local $intVal = Round($adjusted * 255) Return StringFormat("%02X", $intVal) EndFunc For $i = 100 To 0 Step -1 ConsoleWrite($i & "%: " & _PercentToHex($i) & @CRLF) Next -
junkew reacted to a post in a topic: SMF - The fastest duplicate files finder... [Updated 2025-May-18]
-
KaFu reacted to a post in a topic: Get System Try Icon for reading MS Teams status
-
Get System Try Icon for reading MS Teams status
junkew replied to Jacov's topic in AutoIt General Help and Support
Simplespy seems to give information including its XAML framework information [Klok 20:53 29-4-2025] class: [SystemTray.OmniButton] UIA_AutomationId:= <TaskbarFrame> UIA_ClassName:= <Taskbar.TaskbarFrameAutomationPeer> UIA_ClickablePoint:= <960;1056> UIA_Culture:= <1043> UIA_IsControlElement:= <True> UIA_IsContentElement:= <True> UIA_IsPassword:= <False> UIA_NativeWindowHandle:= <0> UIA_IsOffscreen:= <False> UIA_Orientation:= <0> UIA_FrameworkId:= <XAML> But it seems much harder on the news no sub tiles identified: UIA_class:= <Microsoft.UI.Xaml.Controls.WebView2> But then check with inspect.exe as part of the win32 sdk tools then you can navigate and inspect the tree -
IUIAutomation MS framework automate chrome, FF, IE, ....
junkew replied to junkew's topic in AutoIt Example Scripts
Is that a question? You can interact with scrollbars using IUIAutomation. The wrappers I made are not wrapping all possibilities there are many examples made on the forum around IUIAutomation just search and you will find a lot. UIASpy is a nice one that gives you directly when you spy the ability to generate code for it. Using the keyboard with send can be in many cases a good alternative its just one of the things you can use when you want to automate a GUI. Microsoft supports the basic scrolling unfortunately many suppliers of derived scrollbars implement not full logic for IuIAutomation. Basically they should if they want to have their applications accessible for the impaired people. https://learn.microsoft.com/en-us/dotnet/framework/ui-automation/ui-automation-support-for-the-scrollbar-control-type -
SEKOMD reacted to a post in a topic: IUIAutomation MS framework automate chrome, FF, IE, ....
-
IUIAutomation MS framework automate chrome, FF, IE, ....
junkew replied to junkew's topic in AutoIt Example Scripts
This is in the wrappers with propertyvalue, property and most likely when I wrote the library I had to deal with textboxes from java or other not fully iUIAutomation compatible textboxes and choosed to do it by keyboard commands and have another way to get to the propertys by a property command action. Case "propertyvalue", "property" Local $i = _UIA_getPropertyIndex($p1) If Not @error <> 0 Then $retValue = _UIA_getPropertyValue($obj2ActOn, $UIA_propertiesSupportedArray[$i][1]) Else $retValue = _UIA_getPropertyValue($obj2ActOn, $p1) EndIf and implemented like Func _UIA_getPropertyValue($UIA_oUIElement, $id) Local $tmpValue, $tmpStr, $iProperty If Not _UIA_IsElement($UIA_oUIElement) Then Return SetError($_UIASTATUS_GeneralError, $_UIASTATUS_GeneralError, "** NO PROPERTYVALUE DUE TO NONEXISTING OBJECT **") EndIf $UIA_oUIElement.GetCurrentPropertyValue($id, $tmpValue) $tmpStr = "" & $tmpValue If IsArray($tmpValue) Then $tmpStr = "" For $iProperty = 0 To UBound($tmpValue) - 1 $tmpStr = $tmpStr & StringStripWS($tmpValue[$iProperty], $STR_STRIPLEADING + $STR_STRIPTRAILING) If $iProperty <> UBound($tmpValue) - 1 Then $tmpStr = $tmpStr & ";" EndIf Next Return $tmpStr EndIf Return SetError($_UIASTATUS_GeneralError, $_UIASTATUS_GeneralError, $tmpStr) EndFunc ;==>_UIA_getPropertyValue And setting your keyboard focus back to begin or end could be done with keys like ctrl+home and ctrl+end. There are to many aspects in remotely controlling different applications and all kinds of different textboxes from different programming languages. Nowadays probably more and more html frontend applications but in 2010-2015 dealing with many windows UX technologies (Visual Basic, Java, Win32 forms, Delphi, HTML, QWidgets, ....) -
junkew reacted to a post in a topic: Functional "class" solution
-
Syla reacted to a post in a topic: Cannot handle this class : XamlExplorerHostIslandWindow ! it is the Windows 11 Task view !
-
TheAutomator reacted to a post in a topic: goto specific line in rich edit control
-
TheAutomator reacted to a post in a topic: goto specific line in rich edit control
-
Interesting but if Au3Inf is seeing it you should be able to handle it. https://learn.microsoft.com/en-us/shows/visual-studio-toolbox/xaml-islands Try FAQ 31 with UIAutomation Whats the output of this Example() Func Example() ; Retrieve a list of window handles. Local $aList = WinList() ; Loop through the array displaying only visable windows with a title. For $i = 1 To $aList[0][0] If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then consolewrite("Title: " & $aList[$i][0] & @CRLF & "Handle: " & $aList[$i][1] & @CRLF) ; Retrieve the classlist of the window using the handle returned . Local $sClassList = WinGetClassList($aList[$i][1]) consolewrite(stringreplace($sClassList,@LF,@LF & " -")& @CRLF) EndIf Next EndFunc ;==>Example
-
goto specific line in rich edit control
junkew replied to TheAutomator's topic in AutoIt General Help and Support
This seems to work for both controls but you have to set the rich text box first to point 0,0 The reverse order is not working #include <EditConstants.au3> #include <GuiEdit.au3> #include <GuiRichEdit.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hGui=GUICreate("My GUI edit and rich edit") ; will create a dialog box that when displayed is centered local $someTextLines=stringreplace("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","x", "line" & @crlf) Local $idMyedit = GUICtrlCreateEdit($someTextLines & @CRLF, 10, 10, 350, 180, $ES_MULTILINE+$ES_AUTOVSCROLL + $WS_VSCROLL) Local $hRichEdit = _GUICtrlRichEdit_Create($hGui, $someTextLines, 10, 210, 350, 180, bitor($ES_MULTILINE, $ES_AUTOVSCROLL, $WS_VSCROLL)) ;~ Important line _GUICtrlRichEdit_SetSel($hRichEdit, 0, 0) GUISetState(@SW_SHOW) ;~ GUICtrlSendMsg ($hRichEdit, $EM_LINESCROLL, 0, 0) local $i For $i=10 to 20 ;~ _GUICtrlEdit_LineScroll($idMyedit, 0, _GUICtrlEdit_GetLineCount($idMyedit)) ;~ _GUICtrlEdit_LineScroll($hRichEdit, 0, _GUICtrlEdit_GetLineCount($hRichEdit)) _GUICtrlEdit_LineScroll($idMyedit, 0, $i) _GUICtrlEdit_LineScroll($hRichEdit, 0, $i) ;~ GUICtrlSendMsg ($hRichEdit, $EM_LINESCROLL, 0, $i) ;~ Local $nIndex = GUICtrlSendMsg ($hRichEdit, $EM_LINEINDEX, $i, 0) ;~ GUICtrlSendMsg ($hRichEdit, $EM_SETSEL, $nIndex, 0) ;~ ControlCommand ($hGUI, "", $hRichEdit, "SetCurrentSelection", @CRLF) ;~ $iCharPosition = _GUICtrlRichEdit_GetFirstCharPosOnLine($hRichEdit, $i) ;~ _GUICtrlRichEdit_SetSel($hRichEdit, $iCharPosition, $iCharPosition + 4) sleep(250) next ;~ Important line ;~ _GUICtrlEdit_SetSel($idMyedit, -1, -1) ;~ _GUICtrlRichEdit_SetSel($hRichEdit, -1,-1) For $i=10 to 0 step -1 _GUICtrlEdit_LineScroll($idMyedit, 0, $i) _GUICtrlEdit_LineScroll($hRichEdit, 0, $i) sleep(250) next ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() EndFunc ;==>Example -
goto specific line in rich edit control
junkew replied to TheAutomator's topic in AutoIt General Help and Support
https://www.autoitscript.com/autoit3/docs/libfunctions/_GUICtrlRichEdit_FindText.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_GUICtrlRichEdit_GotoCharPos.htm Goto 0 and in a loop find carriage return Probably with those messages you will be able to do this EM_POSFROMCHAR EM_CHARFROMPOS EM_LINEFROMCHAR EM_LINEINDEX EM_LINESCROLL And the editcontrol functions should work also otherwise you need sendmessage function with windows messages https://learn.microsoft.com/en-us/windows/win32/controls/about-rich-edit-controls https://www.autoitscript.com/autoit3/docs/libfunctions/_GUICtrlEdit_LineScroll.htm -
https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/wintouch/architectural-overview.md is having WM_TOUCH messages. Then it depends afterwards what the driver is doing if its a nice driver it uses sendinput for driving the keyboard and/or mouse. (which you then can hook with a keyboard hook) And not sure where MS is going with WinUI: https://learn.microsoft.com/en-us/uwp/api/windows.ui.input.preview.injection?view=winrt-26100