antmar904 Posted October 13, 2016 Share Posted October 13, 2016 Hi, I am trying to get a list of all websites in a users compatibility view list but they are all in binary and I'm trying to convert them into strings. It will show me the binary but not the string. This is what I have so far. #include <MsgBoxConstants.au3> #include <StringConstants.au3> Local $Binary = RegRead("HKCU\SOFTWARE\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData", "UserFilter") MsgBox(0, "Binary Data", $Binary) For $i = 0 To UBound($Binary) -1 Local $String = BinaryToString($Binary, "") Next MsgBox(0, "String", $String) Link to comment Share on other sites More sharing options...
Jfish Posted October 13, 2016 Share Posted October 13, 2016 (edited) I don't think RegRead returns an array, does it? If not, you should see an error on the MsgBox because $String would not be set to a value. Edited October 13, 2016 by Jfish Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
BrewManNH Posted October 13, 2016 Share Posted October 13, 2016 This might work for you, at least it converts it to a semi-usable string. #include <MsgBoxConstants.au3> Local $Binary = RegRead("HKCU\SOFTWARE\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData", "UserFilter") $Binary = StringReplace(String($Binary), "00", ASC(".")) MsgBox(0, "Binary Data", $Binary) Local $String = BinaryToString($Binary) MsgBox(0, "String", $String) The problem with the BinaryToString function is that it stops as soon as it hits a NULL, which is why only part of your string would show in the second msgbox. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
antmar904 Posted October 13, 2016 Author Share Posted October 13, 2016 (edited) That did not work. Edited October 13, 2016 by antmar904 Link to comment Share on other sites More sharing options...
antmar904 Posted October 14, 2016 Author Share Posted October 14, 2016 Can this be done with AutoIT? I think there is a function for this in Powershell. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 14, 2016 Moderators Share Posted October 14, 2016 @antmar904 please wait 24 hours before bumping your post. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
BrewManNH Posted October 14, 2016 Share Posted October 14, 2016 Actually that did work, if you look at the end of the string in the MsgBox you will see the msn.com in between all the "F"s in it. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
antmar904 Posted October 14, 2016 Author Share Posted October 14, 2016 (edited) @BrewManNH Your right, I didn't even catch that. Can we make the output string more ledgible? Edited October 14, 2016 by antmar904 Link to comment Share on other sites More sharing options...
Danyfirex Posted October 14, 2016 Share Posted October 14, 2016 You can do this... #include <Array.au3> Local $aUrls = _GetUsersCompatibilityViewList() _ArrayDisplay($aUrls) Func _GetUsersCompatibilityViewList() Local Const $sTag_UserFilter = "byte Dummy[8];dword NumberOfEntries;" Local Const $sTag_Entry = "byte Dummy[16];word Length;" Local $aList[0] Local $sBinary = RegRead("HKCU\SOFTWARE\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData", "UserFilter") If @error Then Return Local $tData = DllStructCreate("byte Data[" & BinaryLen($sBinary) & "]") $tData.Data = $sBinary Local $tInInfo = DllStructCreate($sTag_UserFilter, DllStructGetPtr($tData)) Local $nEntries = $tInInfo.NumberOfEntries ReDim $aList[$nEntries] Local $tEntryInfo = 0 Local $NextIndex = 24 Local $iLength = 0 Local $tUrl = 0 For $i = 1 To $nEntries $tEntryInfo = DllStructCreate($sTag_Entry, DllStructGetPtr($tData) + $NextIndex) $iLength = DllStructGetData($tEntryInfo, 2) $tUrl = DllStructCreate("wchar String[" & $iLength & "]", DllStructGetPtr($tEntryInfo) + 18) $aList[$i - 1] = $tUrl.String $NextIndex += ($iLength * 2) + 18 Next Return $aList EndFunc ;==>_GetUsersCompatibilityViewList Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
antmar904 Posted October 14, 2016 Author Share Posted October 14, 2016 @Danyfirex That worked thank you. Link to comment Share on other sites More sharing options...
haijie1223 Posted March 8, 2018 Share Posted March 8, 2018 @Danyfirex How to add a website to the compatibility view list ? Please!Thank You Link to comment Share on other sites More sharing options...
Danyfirex Posted March 8, 2018 Share Posted March 8, 2018 I'll check later. @haijie1223 Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut 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