Nine Posted October 26 Posted October 26 Every time I use "Open this script", I get this message : Is there a way to disable it ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
argumentum Posted October 26 Posted October 26 ..in that regard, I was thinking of giving that a link like "AutoIt3chm://go+do+something.au3" and since is a link, the handler would take care of that. And that would mean that the .chm file would need the "AutoIt3Help.exe" to be the handler or load one. Lack of time did not let me code it to present a proposal. But maybe you can code a "SayYesAndSaveMeTheTime.au3" 😅 P.S.: I don't know of a way to configure for just that. Nine 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Trong Posted October 26 Posted October 26 Is there another option to uninstall win 11 and install win 10? 😁 argumentum 1 Enjoy my work? Buy me a 🍻 or tip via ❤️ PayPal
Nine Posted October 26 Author Posted October 26 3 hours ago, argumentum said: But maybe you can code a "SayYesAndSaveMeTheTime.au3" Nah, not that cumbersome. But what is very annoying is the MSDN external link. I know it is off topic, but it is my thread after all . I am using this piece of code to get to an external MSDN link (until argy makes a no problem chm...) Just right click the link and it will show in you default browser : #include "Includes\CUIAutomation2.au3" #include <WinAPIvkeysConstants.au3> #include <Misc.au3> HotKeySet("{F11}", Terminate) While Sleep(10) If WinActive("AutoIt Help") And _IsPressed($VK_RBUTTON) Then RunLink() WEnd Func Terminate() Exit EndFunc ;==>Terminate Func RunLink() Sleep(200) MouseClick("left", MouseGetPos(0) + 10, MouseGetPos(1) + 20, 1, 1) Sleep(500) If Not WinActive("Propriétés") Then Return ; Create UI Automation object Local Static $oUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation) Local $pElement, $oElement, $oProp, $vValue, $pCondition ; Get element by handle $oUIAutomation.ElementFromHandle(WinGetHandle("[ACTIVE]"), $pElement) $oProp = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) $oUIAutomation.CreatePropertyCondition($UIA_AutomationIdPropertyId, "_nameProp", $pCondition) $oProp.FindFirst($TreeScope_Descendants, $pCondition, $pElement) $oElement = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) $oElement.GetCurrentPropertyValue($UIA_ValueValuePropertyId, $vValue) Send("{ESC}") ShellExecute("http://msdn.microsoft.com/query/" & $vValue) EndFunc ;==>RunLink Not the greatest piece of code, but it does what I want. argumentum 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
argumentum Posted October 26 Posted October 26 (edited) 4 hours ago, Nine said: I am using this piece of code to get to an external MSDN link (until argy makes a no problem chm...) My bad ( not kidding ). Made a patch but no body looked at it. And I'd have to get in a "Zen state of mind" to implement it in the SVN, but am doing a bunch of other things 😭 But yes, the "open in user's default browser" is no big deal. I'll brainstorm the "run local file" in a "don't warn me, just do it" way. Maybe using the CSS file as the DB 🤔 But again, I'll have to have the peace of mind to look into it 🤷♂️ Edited October 26 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Nine Posted October 26 Author Posted October 26 3 hours ago, argumentum said: Made a patch but no body looked at it I did but there a few #include not included in the include folder... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
argumentum Posted October 26 Posted October 26 8 minutes ago, Nine said: there a few #include not included in the include folder... ..coded that some reviews ago. I'd have to fix my code to match the current r13173. I'll make time this week to make it grate again to make it functional Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
ioa747 Posted November 4 Posted November 4 (edited) I just entered the club, of the windows11 😭 expandcollapse popup; https://www.autoitscript.com/forum/topic/213285-autoitchm-with-windows-11/#findComment-1547194 ;---------------------------------------------------------------------------------------- ; Title...........: Active_Help.au3 ; Description.....: Inject a custom .CSS file into help (Dark theme) ; closes the annoying notification MsgBox ; opens MSDN links with right click (for quick Navigation) ; opens MSDN links with left click (In case you forget) ; AutoIt Version..: 3.3.18.0 Author: ioa747 Script Version: 0.2 ; Note............: Testet in Windows 11 Pro 24H2 Date:4/11/2025 ;---------------------------------------------------------------------------------------- ;~ #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #NoTrayIcon #include <IE.au3> #include <WindowsConstants.au3> #include <Misc.au3> Global $g_ObjErr = ObjEvent("AutoIt.Error", "__ObjAutoItErrorEvent") Global $oIE Global $sMyCSS = FileRead(@ScriptDir & "\default.css") ; Your custom CSS file While 1 InjectHelp() Sleep(300) WEnd ;--------------------------------------------------------------------------------------- Func _CheckForMSDN_RB() ; opens MSDN links with right click (for quick Navigation) If Not WinActive("AutoIt Help") Then Return If MouseGetCursor() = 0 Then ; 0=Hand ; 2=Arrow If _IsPressed("02") Then ; 02=Right mouse button Local $aMPos = MouseGetPos() Sleep(200) Send("{ESC}") Sleep(200) ; SHIFT & Click Send("{SHIFTDOWN}") MouseClick("left", $aMPos[0], $aMPos[1]) Sleep(200) Send("{SHIFTUP}") EndIf EndIf EndFunc ;==>_CheckForMSDN_RB ;--------------------------------------------------------------------------------------- Func _CheckForMSDN_LB($hWND) ; opens MSDN links with left click (In case you forget) Local $hMSDN = WinGetHandle("[TITLE:Script Error; CLASS:Internet Explorer_TridentDlgFrame]") If $hMSDN Then Local $aMPos = MouseGetPos() Local $aWPos = WinGetPos($hWND) Local $aCLPos = ControlGetPos($hWND, "", "Internet Explorer_Server1") Local $hGhostGUI = GhostGUI($hWND, $aCLPos[2], $aCLPos[3], $aWPos[0] + $aCLPos[0] + 6, $aWPos[1] + $aCLPos[1] + 46) WinActivate($hWND) Do ControlSend($hMSDN, "", "Internet Explorer_Server1", "n") Sleep(50) $hMSDN = WinGetHandle("[TITLE:Script Error; CLASS:Internet Explorer_TridentDlgFrame]") WinActivate($hWND) Until Not $hMSDN Sleep(50) Send("{ALTDOWN}") Send("{LEFT}") Send("{ALTUP}") Sleep(200) GUIDelete($hGhostGUI) ; SHIFT & Click Send("{SHIFTDOWN}") MouseClick("left", $aMPos[0], $aMPos[1]) Sleep(200) Send("{SHIFTUP}") EndIf EndFunc ;==>_CheckForMSDN_LB ;--------------------------------------------------------------------------------------- Func GhostGUI($hWND, $iWidth, $iHeight, $iLeft, $iTop, $BackColor = 0x000000, $Transparency = 200) Local $hGUI = GUICreate('GhostGUI', $iWidth, $iHeight, $iLeft, $iTop, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TRANSPARENT, $WS_EX_TOPMOST), $hWND) GUISetBkColor($BackColor) WinSetTrans($hGUI, '', $Transparency) GUISetState(@SW_SHOW, $hGUI) Return $hGUI EndFunc ;==>GhostGUI ;--------------------------------------------------------------------------------------- Func _CheckForMsgBox() ; closes the annoying notification MsgBox Local $hMsgBox = WinGetHandle("[TITLE:Help; CLASS:#32770]", "Some content of this document has been blocked for your safety.") If $hMsgBox Then ControlClick($hMsgBox, "", "Button1") EndFunc ;==>_CheckForMsgBox ;--------------------------------------------------------------------------------------- Func InjectHelp() ; Inject a custom .CSS file into help (Dark theme) ; by @Gianni ; https://www.autoitscript.com/forum/topic/211640-autoit-help-file-for-dark-environment/?do=findComment&comment=1531446 Local $hWND = WinGetHandle("AutoIt Help") ; handle of the AutoIt Help window If Not WinExists($hWND) Then Return ; MsgBox(0, 'Help not found', "no AutoIt Help running", 3) $oIE = _IEAttach($hWND, "embedded") ; get reference to the BrowserControl embedded in the Help If @error Then Return ; MsgBox(0, 'Browser Control error', "problems on attaching Browser Control", 3) ; Set your custom CSS settings _WebBrowser_CSS_Inject($oIE, $sMyCSS) ; get a reference to the browser's window (for event management purpose) Local $oWindow = $oIE.document.parentwindow ; setup an event management Local $Event = ObjEvent($oWindow, "IEEvent_", 'HTMLWindowEvents') If @error Then Return While WinExists($hWND) ; stay alive only while the help is running GUIGetMsg() ; just to delay the CPU load _CheckForMsgBox() _CheckForMSDN_LB($hWND) _CheckForMSDN_RB() WEnd Return ;MsgBox(0, '', "AutoIt Help closed", 3) EndFunc ;==>InjectHelp ;--------------------------------------------------------------------------------------- Volatile Func IEEvent_onload($oEvent) ; following function is fired each time the Help page changes ;ConsoleWrite("Debug: onload event" & @crlf) _WebBrowser_CSS_Inject($oIE, $sMyCSS) ; ; apply your custom CSS setting to the loaded page EndFunc ;==>IEEvent_onload ; #FUNCTION# ==================================================================================================================== ; Name ..........: _WebBrowser_CSS_Inject ; Description ...: this function creates into the html document a CSS node element with embedded the passed CSS or a link to a CSS ; Syntax ........: _WebBrowser_CSS_Inject(Byref $oIE_Server, $sStylesheet[, $bIsUrl = False]) ; Parameters ....: $oIE_Server - a Webbrowser object reference. ; $sStylesheet - CSS source to be injected into the page (either, a CSS or an URL (a link to a CSS) ; $bIsUrl - [optional] True if above parameter is an URL (a link to a CSS source). Default is False. ; Return values .: A Node Object reference, representing the appended node ; Author ........: Gianni ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: ; =============================================================================================================================== Func _WebBrowser_CSS_Inject(ByRef $oIE_Server, $sStylesheet, $bIsUrl = False) ; Inject css Local $oStyleNode Local $objDocument = $oIE_Server.document ; If $bIsUrl Then ; use the link to load a stylesheet $oStyleNode = $objDocument.createElement('link') ; // Creates <link /> $oStyleNode.type = "text/css" $oStyleNode.rel = 'stylesheet' $oStyleNode.href = $sStylesheet Else ; inject the stylesheet directly $oStyleNode = $objDocument.createElement('style') ; // Creates <style></style> $oStyleNode.type = 'text/css' $oStyleNode.styleSheet.cssText = $sStylesheet ; // Syntax for IE EndIf ; Local $oNode = $objDocument.getElementsByTagName('head').item(0).appendChild($oStyleNode) If $bIsUrl Then ; wait till css has been downloaded Do Sleep(250) ; ConsoleWrite('css: ' & $oNode.ReadyState & @CRLF) ; debug purpose Until $oNode.ReadyState = "loaded" Or $oNode.ReadyState = "complete" EndIf Return $oNode EndFunc ;==>_WebBrowser_CSS_Inject ;--------------------------------------------------------------------------------------- Func __ObjAutoItErrorEvent() ; reset Obj error If IsObj($g_ObjErr) Then ; Clear the properties of ObjEvent $g_ObjErr.Description = "" $g_ObjErr.Number = 0 EndIf EndFunc ;==>__ObjAutoItErrorEvent ;--------------------------------------------------------------------------------------- default.css Edited November 4 by ioa747 added information argumentum 1 I know that I know nothing
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