Nine Posted October 30, 2022 Share Posted October 30, 2022 (edited) First statement did not work, so all the rest is of course will not... Use the right class indicated in the au3info tool of the window Edited October 30, 2022 by Nine gal9 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) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
gal9 Posted October 30, 2022 Author Share Posted October 30, 2022 1 minute ago, Nine said: First statement did not work, so all the rest is of course will not... What should I do? Link to comment Share on other sites More sharing options...
gal9 Posted October 30, 2022 Author Share Posted October 30, 2022 6 minutes ago, Nine said: First statement did not work, so all the rest is of course will not... Use the right class indicated in the au3info tool of the window What's wrong? can you help me, please Link to comment Share on other sites More sharing options...
Nine Posted October 30, 2022 Share Posted October 30, 2022 The right class is WindowForms10.Window.8.app.0.297b065_r69_ad1 Just copy/paste the right class from the au3info tool and replace it from MMCMainFrame ps. alternatively you can just use the title of the window... “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) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
gal9 Posted October 30, 2022 Author Share Posted October 30, 2022 1 minute ago, Nine said: The right class is WindowForms10.Window.8.app.0.297b065_r69_ad1 Just copy/paste the right class from the au3info tool and replace it from MMCMainFrame ps. alternatively you can just use the title of the window... What's wrong? can you help me, please i try to do this with [class:] Local $hWnd = WinWaitActive("[CLASS:WindowsForms10.Window.8.app.0.297b065_r69_ad1]", "", 5) ConsoleWrite("WinWaitActive " & @error & "/" & $hWnd & @CRLF) Local $hControl = ControlGetHandle($hWnd, "", "WindowsForms10.BUTTON.app.0.297b065_r64_ad13") ConsoleWrite("Not configured " & @error & "/" & $hControl & @CRLF) Local $iResult = _GUICtrlButton_GetCheck($hControl) If $iResult = $BST_CHECKED Then MsgBox($MB_SYSTEMMODAL, "", "Checked") If $iResult = $BST_INDETERMINATE Then MsgBox($MB_SYSTEMMODAL, "", "Inderterminate") If $iResult = $BST_UNCHECKED Then MsgBox($MB_SYSTEMMODAL, "", "Cleared") but it is still not work Link to comment Share on other sites More sharing options...
Nine Posted October 30, 2022 Share Posted October 30, 2022 I forgot to activate the window first : #include <GuiButton.au3> Local $hWnd = WinActivate("[CLASS:WindowsForms10.Window.8.app.0.297b065_r69_ad1]") ConsoleWrite("WinActivate " & @error & "/" & $hWnd & @CRLF) WinWaitActive($hWnd) Local $hControl = ControlGetHandle($hWnd, "", "WindowsForms10.BUTTON.app.0.297b065_r64_ad13") ConsoleWrite("Not configured " & @error & "/" & $hControl & @CRLF) Local $iResult = _GUICtrlButton_GetCheck($hControl) If $iResult = $BST_CHECKED Then MsgBox($MB_SYSTEMMODAL, "", "Checked") If $iResult = $BST_INDETERMINATE Then MsgBox($MB_SYSTEMMODAL, "", "Inderterminate") If $iResult = $BST_UNCHECKED Then MsgBox($MB_SYSTEMMODAL, "", "Cleared") “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) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
gal9 Posted October 30, 2022 Author Share Posted October 30, 2022 2 minutes ago, Nine said: I forgot to activate the window first : #include <GuiButton.au3> Local $hWnd = WinActivate("[CLASS:WindowsForms10.Window.8.app.0.297b065_r69_ad1]") ConsoleWrite("WinActivate " & @error & "/" & $hWnd & @CRLF) WinWaitActive($hWnd) Local $hControl = ControlGetHandle($hWnd, "", "WindowsForms10.BUTTON.app.0.297b065_r64_ad13") ConsoleWrite("Not configured " & @error & "/" & $hControl & @CRLF) Local $iResult = _GUICtrlButton_GetCheck($hControl) If $iResult = $BST_CHECKED Then MsgBox($MB_SYSTEMMODAL, "", "Checked") If $iResult = $BST_INDETERMINATE Then MsgBox($MB_SYSTEMMODAL, "", "Inderterminate") If $iResult = $BST_UNCHECKED Then MsgBox($MB_SYSTEMMODAL, "", "Cleared") now I get in the console but still, I get Cleared. my info about Not configured: (Maybe that's the problem) Link to comment Share on other sites More sharing options...
Nine Posted October 30, 2022 Share Posted October 30, 2022 (edited) Ah it is because you do not have the right class of the button, see ? This is why error handling is SO USEFUL ! Edited October 30, 2022 by Nine “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) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
gal9 Posted October 30, 2022 Author Share Posted October 30, 2022 (edited) 3 minutes ago, Nine said: Ah it is because you do not have the right class of the button, see ? What do you mean? but Class and Instance it is like what is written no? info: expandcollapse popup>>>> Window <<<< Title: Allow Sideloading of extension Class: WindowsForms10.Window.8.app.0.297b065_r69_ad1 Position: 177, 303 Size: 700, 643 Style: 0x16CD0000 ExStyle: 0x00010100 Handle: 0x0003082C >>>> Control <<<< Class: WindowsForms10.BUTTON.app.0.297b065_r69_ad1 Instance: 3 ClassnameNN: WindowsForms10.BUTTON.app.0.297b065_r69_ad13 Name: Advanced (Class): [CLASS:WindowsForms10.BUTTON.app.0.297b065_r69_ad1; INSTANCE:3] ID: 919492 Text: Not &Configured Position: 9, 57 Size: 108, 22 ControlClick Coords: 77, 18 Style: 0x5601000B ExStyle: 0x00000000 Handle: 0x000E07C4 >>>> Mouse <<<< Position: 271, 409 Cursor ID: 0 Color: 0xF0F0F0 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Allow Sideloading of extension &Next Setting &Previous Setting Not &Configured &Enabled &Disabled Supported on: Comment: Microsoft Edge on Windows 10, Version 1809 or later Options: Sideloading installs and runs unverified extensions in Microsoft Edge. With this policy, you can specify whether unverified extensions can be sideloaded in Microsoft Edge. If enabled or not configured, sideloading of unverified extensions in Microsoft Edge is allowed. If disabled, sideloading of unverified extensions in Microsoft Edge is not allowed. Extensions can be installed only through Microsoft store (including a store for business), enterprise storefront (such as Company Portal) or PowerShell (using Add-AppxPackage). When disabled, this policy does not prevent sideloading of extensions using Add-AppxPackage via PowerShell. To prevent this, in Group Policy Editor, enable Allows development of Windows Store apps and installing them from an integrated development environment (IDE), which is located at: Computer Configuration > Administrative Templates > Windows Components > App Package Deployment Supported versions: Microsoft Edge on Windows 10, version 1809 Default setting: Disabled or not configured Related policies: - Allows development of Windows Store apps and installing them from an integrated development environment (IDE) - Allow all trusted apps to install Help: OK &Apply Cancel >>>> Hidden Text <<<< Edited October 30, 2022 by gal9 Link to comment Share on other sites More sharing options...
Nine Posted October 30, 2022 Share Posted October 30, 2022 Man, take you time, and read carefully the code and the au3info. There is a difference (a 4 instead of a 9) gal9 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) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
gal9 Posted October 30, 2022 Author Share Posted October 30, 2022 21 minutes ago, Nine said: Man, take you time, and read carefully the code and the au3info. There is a difference (a 4 instead of a 9) What should I write in the ControlGetHandle function ? I have all the info from the Autoit tool. I read the Autoit docs: https://www.autoitscript.com/autoit3/docs/functions/ControlGetHandle.htm, but there it's very simple, they are using notepad. And they use ClassnameNN, but when I used the same idea it's not working. This is the only line that I don't know how to use correctly: Local $hControl = ControlGetHandle($hWnd, "", "CLASS:WindowsForms10.Window.8.app.0.297b065_r69_ad13") The "CLASS:WindowsForms10.Window.8.app.0.297b065_r69_ad13" is exactly ClassnameNN according to Autoit info. Thanks in advance. Link to comment Share on other sites More sharing options...
gal9 Posted October 30, 2022 Author Share Posted October 30, 2022 39 minutes ago, Nine said: Man, take you time, and read carefully the code and the au3info. There is a difference (a 4 instead of a 9) I didn't understand: 1) How to use that handle, I catch the Handle, it's 0x000C0756 and also with your code it is the same. What can I do with that ? 2) What is "There is a difference (a 4 instead of a 9)" that you wrote? Link to comment Share on other sites More sharing options...
SeanGozlan Posted October 30, 2022 Share Posted October 30, 2022 If I will know how to click on any handle or class, I will able to solve a lot of issues. gal9 1 Link to comment Share on other sites More sharing options...
spudw2k Posted October 31, 2022 Share Posted October 31, 2022 11 hours ago, gal9 said: 2) What is "There is a difference (a 4 instead of a 9)" that you wrote? The code in your posts above showWindowsForms10.BUTTON.app.0.297b065_r64_ad13 Should be WindowsForms10.BUTTON.app.0.297b065_r69_ad13 gal9 1 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
gal9 Posted November 2, 2022 Author Share Posted November 2, 2022 On 10/31/2022 at 3:24 AM, spudw2k said: The code in your posts above showWindowsForms10.BUTTON.app.0.297b065_r64_ad13 Should be WindowsForms10.BUTTON.app.0.297b065_r69_ad13 still not working, What other solution could there be? Link to comment Share on other sites More sharing options...
TheXman Posted November 2, 2022 Share Posted November 2, 2022 (edited) 12 hours ago, gal9 said: What other solution could there be? Why try to get the value of AllowSideloadingOfExtensions by manipulating & interrogating the GPEdit MMC GUI when you can get the value directly from the source (where gpedit is getting it), the registry? #include <Constants.au3> example() Func example() Local $vValue ;Get value of AllowSideloadingOfExtensions (if Not Configured, then return with error message) $vValue = RegRead("HKLM\Software\Policies\Microsoft\MicrosoftEdge\Extensions", "AllowSideloadingOfExtensions") If @error Then Return MsgBox($MB_ICONERROR, "RegRead Error", "@error = " & @error) ;Display value of AllowSideloadingOfExtensions ConsoleWrite("AllowSideloadingOfExtensions = " & $vValue & @CRLF) EndFunc Edited November 2, 2022 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
rsn Posted November 2, 2022 Share Posted November 2, 2022 (edited) I was following along as an exercise to help sharpen my skills. For ControlGetHandle, shouldn't the 3rd argument be the "advanced mode" versus the "class" only? Also, if $iResult returns an integer, is there a mapping of that integer to the results? EDIT: To answer my first question, it's advanced mode. Also I changed _GUICtrlButton_GetCheck to _GUICtrlButton_GetState. $iResult returns an 8 for a radio button that is checked and 0 for unchecked. My second question still stands. I see something about BitAND in the help but I don't see how that works. Edited November 2, 2022 by rsn Link to comment Share on other sites More sharing options...
zhekanchique Posted February 24, 2023 Share Posted February 24, 2023 @gal9, try this $title = "Allow Sideloading of extension" $radioButton = "[CLASS:WindowsForms10.BUTTON.app.0.297b065_r69_ad1; INSTANCE:3]" MsgBox(64, $title, ControlCommand($title, "", $radioButton, "IsChecked", ""), 2) 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