| View previous topic :: View next topic |
| Author |
Message |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Apr 23, 2009 5:52 pm Post subject: Registry binary data to text? |
|
|
I know I knew how to do this before, but for the life of me I can't remember how to read a binary registry entry and convert it to text.
All I'm trying to find out is what the menu font is:
@regread(CURUSER,Control Panel\Desktop\WindowMetrics,MenuFont)
But it's a binary entry and I just can't remember how to convert the binary data back into a text format
Can someone help an old burnt out mind?
Thanks,
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Thu Apr 23, 2009 9:46 pm Post subject: |
|
|
You would use @val() to read from binary but @regread() returns the decimal equivalent so @val() won't work.
| Quote: | | BINARY values are returned as a string of decimal numbers, one per byte, separated using the current field separator character. |
You could apply @chr() to each decimal value.
-OR-
If you could convert it back to BINARY, you could then use @val() |
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Sat Apr 25, 2009 12:07 am Post subject: |
|
|
Were you thinking of @expand()?
Hooligan _________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Sat Apr 25, 2009 12:37 am Post subject: |
|
|
He is trying to read type REG_BINARY (At least for the key he said he was trying to read)
@expand() is for type REG_EXPAND_SZ
BTW - There might an API call that will get the Binary value directly then use @val() to convert it. |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sat Apr 25, 2009 1:57 am Post subject: |
|
|
Garrett,
Is there any reason why you don't use GadgetX for this? It has built in functions to grab WindowMetrics. All you need is @GetWin(SysFont,Menu) _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sat Apr 25, 2009 3:52 am Post subject: |
|
|
| dragonsphere wrote: | Garrett,
Is there any reason why you don't use GadgetX for this? It has built in functions to grab WindowMetrics. All you need is @GetWin(SysFont,Menu) |
Ummm.... yeah? *tries not to look stupid* Cuz I lost all my stuff for it a while ago and kept forgetting to ask for the reg info again O.o  _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
|