What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Checking for stored settings

Checking for stored settings
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
O.P. Checking for stored settings
Is there a way to check if settings are already stored in a file or the registry without causing an error? I tried to read a registry entry and check if the result was undefined, but it didn't work :P
<Eljay> "Problems encountered: shit blew up" :zippy:
08-05-2006 06:21 PM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Checking for stored settings
What exactally do u wanna check in the registries.

Get Registry key names from Start > Run > Regedit

Eg. to find chatlogs path in Backup Extreme! i use
code:
var Shell = new ActiveXObject('WScript.Shell');

Debug.Trace(Shell.RegRead('HKEY_CURRENT_USER\\Software\\Patchou\\Messenger Plus! Live\\' + Messenger.MyEmail + '\\Preferences\\LogsDirectory'))

This post was edited on 08-05-2006 at 06:31 PM by Felu.
08-05-2006 06:27 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
O.P. RE: Checking for stored settings
Right, I've got the code to Read, Write and Remove registry keys, but what I want to do is check if the settings have been saved before...

I want to be able to load a users settings on startup, but if it's the first time the script has been run, it'll cause an error. So I just want to check if it infact exists first. I think for files theres something like IfFileExists...
<Eljay> "Problems encountered: shit blew up" :zippy:
08-05-2006 06:29 PM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Checking for stored settings
code:
var Shell = new ActiveXObject('WScript.Shell');

if (something ==
Shell.RegRead('key name')
{
dothis
}

is that what you want?


If it exist or not *-)
value = null or unidentified. Maybe

This post was edited on 08-05-2006 at 06:37 PM by Felu.
08-05-2006 06:34 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
O.P. RE: Checking for stored settings
I'll just go and check it to see if it is :D thanks for quick replies

EDIT: Sorry, that returns the value of the key, I need to first check if the key exists

This post was edited on 08-05-2006 at 06:40 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
08-05-2006 06:35 PM
Profile PM Find Quote Report
pollolibredegrasa
Full Member
***

Avatar
formerly fatfreechicken

Posts: 483
Reputation: 34
35 / Male / Flag
Joined: May 2005
RE: Checking for stored settings
Look at the example on the Scripting Wiki, I think this is what you want :)
;p

[Image: chickennana.gif] Vaccy is my thin twin! [Image: chickennana.gif]
08-05-2006 07:26 PM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
O.P. RE: Checking for stored settings
Thankyou SO much! This worked a treat... I was getting onto the right lines at least :D
<Eljay> "Problems encountered: shit blew up" :zippy:
08-05-2006 07:30 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On