Jump to content

_Hextostring help


Dampe
 Share

Recommended Posts

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 by Dampe
Link to comment
Share on other sites

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

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 :D)

$string after _HexToString = "s"

Link to comment
Share on other sites

  • Developers

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...