[HELP] Reading Reg Keys - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: [HELP] Reading Reg Keys (/showthread.php?tid=62826) [HELP] Reading Reg Keys by noroom on 07-08-2006 at 03:55 PM
I'm trying to read a REG_BINARY registry key, and it just won't work. quote: "Enabled" works just fine, but Path doesn't. I found out that after trying to read that key, the typeof test is "unknown" as opposed to "undefined". I think that means it does contain some information. Help? (Ignore the Array() part, I cut if off because it's not necessary to find/fix the problem) Dear god, please make someone fix the code tags so indentation is preserved. RE: [HELP] Reading Reg Keys by J-Thread on 07-08-2006 at 04:10 PM
The MSDN says the function should return an array of numbers when you read a "REG_BINARY" value. code: RE: [HELP] Reading Reg Keys by hmaster on 07-08-2006 at 04:11 PM
Erm doesnt "\\Path" have to be without the speech marks and capital letter: code: RE: [HELP] Reading Reg Keys by noroom on 07-08-2006 at 06:20 PM
quote:Correct. I tried treating the variable as an array, but it doesn't work. It's not an array. Debugging like that brings up a type mismatch. Makes sense too, a variable of type "unknown" is not a String. quote:No. Path is the name of the key I'm trying to get the value of. Just like Enabled is the name of the other key. RE: [HELP] Reading Reg Keys by foaly on 07-08-2006 at 06:27 PM
did you try if test really works? like: code: RE: [HELP] Reading Reg Keys by noroom on 07-08-2006 at 06:38 PM
Yes, it works. There's no exception being thrown, which means the key is there, and it's being accessed and read. RE: [HELP] Reading Reg Keys by foaly on 07-08-2006 at 06:44 PM
what about making it a string? like: code: RE: [HELP] Reading Reg Keys by noroom on 07-08-2006 at 07:58 PM That returns an empty String. RE: [HELP] Reading Reg Keys by J-Thread on 07-08-2006 at 08:16 PM
The function returns a VBArray. Use the toArray() function to get a regular array: code: RE: [HELP] Reading Reg Keys by noroom on 07-09-2006 at 11:11 AM Thanks J-Thread, that did it! I didn't know a VBArray was a datatype. |