Dampe Posted January 26, 2008 Share Posted January 26, 2008 (edited) I'm attempting to read from the registry like this #include <String.au3> $email = RegRead ("HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger\PerPassportSettings", "DefaultMemberName") $string = _HexToString ($email) MsgBox (0, "Email", $string) When I run this, I am only getting the first letter of the real value back. Please help =] Edited January 26, 2008 by Dampe Link to comment Share on other sites More sharing options...
martin Posted January 26, 2008 Share Posted January 26, 2008 I'm attempting to read from the registry like this #include <String.au3> $email = RegRead ("HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger\PerPassportSettings", "DefaultMemberName") $string = _HexToString ($email) MsgBox (0, "Email", $string) When I run this, I am only getting the first letter of the real value back. Please help =] I know nothing about MSNMessenger but are you sure the email address is stored in hex? What is the value of $email after RegRead? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Dampe Posted January 26, 2008 Author Share Posted January 26, 2008 I am 100% sure it is stored in hex, because when I manually look at it through RegEdit I can see it. $email after reg read = "73007400660075006F007200640064006F00730040006D0073006E002E0063006F006D000000" (please don't post my email publicly if you view it ) $string after _HexToString = "s" Link to comment Share on other sites More sharing options...
Developers Jos Posted January 26, 2008 Developers Share Posted January 26, 2008 It uses Unicode notation so you could just remove the hex 00 from the string when you don't use unicode characters like: #include <String.au3> $email = RegRead("HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger\PerPassportSettings", "DefaultMemberName") $email = StringReplace($email,"00","") $string = _HexToString($email) MsgBox(0, "Email", $string) Else you will have to copy and modify the _HexToString() UDF to cope with UDF characters. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Dampe Posted January 26, 2008 Author Share Posted January 26, 2008 Brilliant, work's like a charm. Thankyou. 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