What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » how can i get information from registry values to use in a script?

Pages: (2): « First [ 1 ] 2 » Last »
how can i get information from registry values to use in a script?
Author: Message:
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. how can i get information from registry values to use in a script?
does anyone know how i could get information from registry values to use in a script?

This post was edited on 08-24-2006 at 05:42 PM by Tochjo.
08-24-2006 03:09 PM
Profile E-Mail PM Web Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: another request
Have a look at this page for information on reading/writing/deleting registry values.
[Image: markee.png]
08-24-2006 03:19 PM
Profile PM Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: another request
thanks, i hope i can figure out what to do/i hope it'll work
in this code:

var WSH = new ActiveXObject('WScript.Shell');
nPies = WSH.RegRead(MsgPlus.ScriptRegPath + "numberofpies");

where do i put the registry path?

and yes, i am new to this lol
08-24-2006 03:20 PM
Profile E-Mail PM Web Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: another request
quote:
Originally posted by skyserpent
in this code:

var WSH = new ActiveXObject('WScript.Shell');
nPies = WSH.RegRead(MsgPlus.ScriptRegPath + "numberofpies");

where do i put the registry path?

and yes, i am new to this lol
MsgPlus.ScriptRegPath + "numberofpies" is the registry path (including the registry name) and nPies is the variable that you are asining the value of the registry to.
[Image: markee.png]
08-24-2006 03:36 PM
Profile PM Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: another request
im still not quite sure what you mean... could you please show me how i would read the registry path: HKEY_CURRENT_USER\Software\Microsoft\Keyboard\Native Media Players\WMP and the reg name: AppName

thanks

This post was edited on 08-24-2006 at 03:49 PM by skyserpent.
08-24-2006 03:49 PM
Profile E-Mail PM Web Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: another request
code:
var WSH = new ActiveXObject('WScript.Shell');
var App_Name = WSH.RegRead("HKEY_CURRENT_USER\\Software\\Microsoft\\Keyboard\\Native Media Players\\WMP\\AppName");
Debug.Trace(App_Name);
This will also return the AppName into the script debugging window for you too.  Make sure you always use \\ and not just \ because this is the way JScript has to have it.
[Image: markee.png]
08-24-2006 03:54 PM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: another request
It's not recommend to use full paths since they can differ on other systems. However, this is how you should do it that way:
code:
var WSH = new ActiveXObject('WScript.Shell');
wmpAppName = WSH.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Keyboard\Native Media Players\WMP\AppName");
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
08-24-2006 03:55 PM
Profile E-Mail PM Web Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: another request
so what should i use intead of using full paths?
08-24-2006 03:57 PM
Profile E-Mail PM Web Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: RE: another request
quote:
Originally posted by Mattike
It's not recommend to use full paths since they can differ on other systems. However, this is how you should do it that way:
code:
var WSH = new ActiveXObject('WScript.Shell');
wmpAppName = WSH.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Keyboard\Native Media Players\WMP\AppName");

Each of the \ shuld be \\ in JScript when looking through folders.  Also for something like this it is very difficult to make a variable path (see my post).  Actually I don't think this registry path can be any different anyway or else you would run into troubles elsewhere (I could be horribly wrong though).

This post was edited on 08-24-2006 at 04:05 PM by markee.
[Image: markee.png]
08-24-2006 04:04 PM
Profile PM Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: another request
ok, well thanks for this... just a few more questions...

is there a way of getting the script to check if WMP is running then if it is change my PSM to something and if it isnt running change my PSM to something else?
08-24-2006 04:12 PM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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