Leaderboard
Popular Content
Showing content with the highest reputation on 05/20/2022 in all areas
-
GuiBuilderPlus [updated March 24, 2024]
TheSaint and 2 others reacted to kurtykurtyboy for a topic
v0.23 dropped in the first post! There are not many front-end changes, but there is quite a lot going on in the background. The highlights: Converted the maps to objects using the AutoItObject UDF. I don't have any problem with maps in general, but I thought the use of objects would help clean up a lot of the code. And it did! I think a lot of my previous struggles will be much easier in the future. Plus, I learned a lot about how everything works as I made my way through the darker corners of the code. Added the ability to apply a scaling factor to all size and position properties. I also updated the generated code to include a function originally by UEZ to grab the current DPI. This allows for the super simple creation of system aware GUIs that are properly scaled for the user's DPI setting ;standard control creation with no scaling GUICtrlCreateLabel("Label 1", 20, 20, 170, 20) ;scaling factor applied to scale for user DPI settings (normally, a tedious task) GUICtrlCreateLabel("Label 1", 20 * $iDpiFactor, 20 * $iDpiFactor, 170 * $iDpiFactor, 20 * $iDpiFactor) Updated property inspector to pseudo scrolling list using the GUIScrollBars_Ex UDF by Melba23 Other miscellaneous bug fixes and improvements I think next I will work on adding support for GUI properties like name, title, size, position, background, etc... The future is looking bright for GuiBuilderPlus!3 points -
Got it working for my own process, there are two taskbar settings (use large icons, show badges) which must be enabled for it to work. Sadly it does not work for other processes. ; https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setoverlayicon ; This handle must belong to a calling process associated with the button's application and must be a valid HWND or the call is ignored. #include <WinAPIShellEx.au3> #include <WinAPIIcons.au3> #include <Array.au3> If RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarBadges") <> 1 Then MsgBox(0, "Exit", "'Show badges on taskbar buttons' must be enabled in taskbar settings") Exit EndIf If RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarSmallIcons") = 1 Then MsgBox(0, "Exit", "'Use small taskbar buttons' must be disabled in taskbar settings") Exit EndIf ; https://www.autohotkey.com/boards/viewtopic.php?f=74&t=67431&p=289834&hilit=SetOverlayIcon#p289834 Const $sCLSID_TaskbarList3 = "{56FDF344-FD6D-11D0-958A-006097C9A090}" Const $sIID_ITaskbarList3 = "{ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf}" ; https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-itaskbarlist3 Const $sTagITaskbarList3 = _ "HrInit hresult();" & _ "AddTab hresult(hwnd);" & _ "DeleteTab hresult(hwnd);" & _ "ActivateTab hresult(hwnd);" & _ "SetActiveAlt hresult(hwnd);" & _ "MarkFullscreenWindow hresult(hwnd;int);" & _ "SetProgressValue hresult(hwnd;uint64;uint64);" & _ "SetProgressState hresult(hwnd;int);" & _ "RegisterTab hresult(hwnd;hwnd);" & _ "UnregisterTab hresult(hwnd);" & _ "SetTabOrder hresult(hwnd;hwnd);" & _ "SetTabActive hresult(hwnd;hwnd;dword);" & _ "ThumbBarAddButtons hresult(hwnd;uint;ptr);" & _ "ThumbBarUpdateButtons hresult(hwnd;uint;ptr);" & _ "ThumbBarSetImageList hresult(hwnd;ptr);" & _ "SetOverlayIcon hresult(hwnd;ptr;wstr);" & _ "SetThumbnailTooltip hresult(hwnd;wstr);" & _ "SetThumbnailClip hresult(hwnd;ptr);" Local $oMyError = ObjEvent("AutoIt.Error", "_ErrFunc") $oTaskbarList3 = ObjCreateInterface($sCLSID_TaskbarList3, $sIID_ITaskbarList3, $sTagITaskbarList3) $oTaskbarList3.HrInit() $iPid = Run("notepad.exe") $hWnd = WinWait("[CLASS:Notepad]", "", 10) If Not IsHWnd($hWnd) Then Exit 123 $hGui = GUICreate("Test") GUISetState() ; $hIcon = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', -28, 16, 16) $hIcon = _WinAPI_LoadIconWithScaleDown(0, $IDI_SHIELD, 16, 16) ; $hIcon = _WinAPI_ExtractIcon("icon.ico", 0, True) $hCtrl = GUICtrlGetHandle(GUICtrlCreateIcon("", 10, 10, 16, 16)) #include <SendMessage.au3> #include <StaticConstants.au3> ; _ArrayDisplay(_WinAPI_GetIconInfo($hIcon)) _SendMessage($hCtrl, $STM_SETIMAGE, 1, $hIcon) $oTaskbarList3.SetOverlayIcon($hWnd, $hIcon, "") ; https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setoverlayicon ; This handle must belong to a calling process associated with the button's application and must be a valid HWND or the call is ignored. $oTaskbarList3.SetOverlayIcon($hGui, $hIcon, "") Sleep(2000) _WinAPI_DestroyIcon($hIcon) ; It is the responsibility of the calling application to free hIcon when it is no longer needed. This can generally be done after you call SetOverlayIcon because the taskbar makes and uses its own copy of the icon. $oTaskbarList3.SetThumbnailTooltip($hGui, "ToolTip Test") ; https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setprogressstate $oTaskbarList3.SetProgressState($hWnd, 0x00000001) Sleep(1000) $oTaskbarList3.SetProgressState($hWnd, 0x00000000) $oTaskbarList3.DeleteTab($hWnd) Sleep(1000) $oTaskbarList3.AddTab($hWnd) Sleep(1000) ProcessClose($iPid) Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc2 points
-
WebDriver UDF - Help & Support (III)
SkysLastChance and one other reacted to Danp2 for a topic
@seadoggie01Thanks for the reminder to follow up on this issue. @CodeWriterHere how I've dealt with this in one of my scripts -- Func RestartSession() _WD_Shutdown() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) EndFunc ;==>RestartSession Func HandleTabSwitch() Local $sResult, $oJson, $lTabChanged $sResult = _WD_ExecuteScript($sSession, "return document.hidden", "") $oJson = Json_Decode($sResult) $lTabChanged = Json_Get($oJson, '[value]') If $lTabChanged Then ; Force new session to connect to current web page RestartSession() EndIf EndFunc ;==>HandleTabSwitch2 points -
That is BS and you know it.1 point
-
Even simpler than @Jos: Local $Removal = "-_.,l%§" Local $WrongString = " this is _an_ example-_.,lL and 1 more § added" ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $WrongString = ' & $WrongString & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console Local $CleanedString = StringRegExpReplace($WrongString, "[" & $Removal & "]" , "") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $CleanedString = ' & $CleanedString & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console1 point
-
So when I now copy and paste your posted script I will see the issue? (don't think so ) Is it really that hard to dumb this down so people can help you implementing in your own code? Here's what I was looking for as basis with the incorporated possible solution to study: Local $Removal[5] $Removal[0] = "-" $Removal[1] = "_" $Removal[2] = "." $Removal[3] = "," $Removal[4] = "l" $WrongString = " this is a example-_.,lL" $CleanedString = $WrongString For $i = 0 To UBound($Removal) - 1 $CleanedString = StringRegExpReplace($CleanedString, "[" & $Removal[$i] & "]" , "") Next ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $WrongString = ' & $WrongString & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $CleanedString = ' & $CleanedString & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console Jos1 point
-
I understand what you wanted in general, but it really helps your case when you post a runnable script that shows what you are doing. The posted script doesn't and I am happy to help but not so much trying to make a demo script for you.1 point
-
Microsoft Edge - WebView2, embed web code in your native application
argumentum reacted to ptrex for a topic
If you want to run ActiveX web page components in MS Edge (or even Chrome), you can still run them using the fabulous IETab extension for Chrome. Which also works in MS Edge... See here for more info : https://audministrator.wordpress.com/2018/01/08/sharepoint-online-activex-in-chrome-browser/ Enjoy !!1 point -
Thanks man. But it's too complicated for me Aww, I knew you loved me as much as I love you Anyway guys, since I couldn't solve it with AutoIT, I looked at the process that creates the text that I'm copying, and I blacklisted the lower L there. So, problem solved ðŸ¤0 points