What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » advice - how to create PSM text:%location

Pages: (2): « First [ 1 ] 2 » Last »
advice - how to create PSM text:%location
Author: Message:
SkipRinPerth
New Member
*


Posts: 2
Joined: Jan 2009
O.P. advice - how to create PSM text:%location
Hello Forum users,

I am looking for a way to automate setting my PSM when messenger signs in to include my location. Eg. PSM is "Fred is at Head Office" or "Fred is at Home". The last bit of the information is determined from the network IP subnet I am attached to.

I don't think MP!L with any extra scripts do what I want. Assuming that is the case here are my current ideas:

I can make a machine startup cmd file that can put the location in an ENV var or a file containing "Head Office", "Home" etc.

Can anyone suggest a suitable script(s) that may help me?

I have searched the online library but found no exact match.  I am prepared to tweak scripts that may be close to what I want. Only just loaded MP!L so I am new to this application but have some VB coding background.

So far I think code in these scripts may help me:
- MSN Names and Tools 1.04  - if adding %xxxx vars
- PSM Scheduler 1.0 - if it has run at startup option
- Display-Picture-Changer-1.2 - for file access

Any constructive advice would be appreciated. Thank for reading this.
01-19-2009 05:32 AM
Profile E-Mail PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: advice - how to create PSM text:%location
are they seperate computers? :p
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
01-19-2009 06:16 AM
Profile PM Web Find Quote Report
Th3rmal
Veteran Member
*****

Peek-a-boo! I see you!!

Posts: 1226
Reputation: 26
32 / Male / Flag
Joined: Aug 2005
RE: advice - how to create PSM text:%location
quote:
Originally posted by ShawnZ
are they seperate computers? :p

quote:
Originally posted by SkipRinPerth
Eg. PSM is "Fred is at Head Office" or "Fred is at Home". The last bit of the information is determined from the network IP subnet I am attached to.
I would guess so, unless he is working off a laptop
You have the intellect comparable to that of a rock. Be proud.
01-19-2009 06:35 AM
Profile E-Mail PM Web Find Quote Report
SkipRinPerth
New Member
*


Posts: 2
Joined: Jan 2009
O.P. RE: RE: advice - how to create PSM text:%location
quote:
Originally posted by ShawnZ
are they separate computers? :p
hi ShawnZ

For me 90% mostly it's the laptop that moves to same place I am. I boot up a windows XP PRO  machine and automatically sign in, so automatically passing some location info into the Msngr Status Line is my objective.  Usually it's a cold boot but it would be nice if the solution would work if my last shutdown was in hibernate mode.

Is the status line text somewhere in the registry - I wonder...

However I would be interested in a solution which caters for a different machines too (others I work with move to different branches and so you can not tell where they are unless ofcourse you ask them
01-31-2009 10:37 AM
Profile E-Mail PM Find Quote Report
Vilkku
Veteran Member
*****

Avatar

Posts: 1411
Reputation: 27
35 / Male / Flag
Joined: Mar 2003
RE: RE: RE: advice - how to create PSM text:%location
quote:
Originally posted by SkipRinPerth
quote:
Originally posted by ShawnZ
are they separate computers? :p
hi ShawnZ

For me 90% mostly it's the laptop that moves to same place I am. I boot up a windows XP PRO  machine and automatically sign in, so automatically passing some location info into the Msngr Status Line is my objective.  Usually it's a cold boot but it would be nice if the solution would work if my last shutdown was in hibernate mode.

Is the status line text somewhere in the registry - I wonder...

However I would be interested in a solution which caters for a different machines too (others I work with move to different branches and so you can not tell where they are unless ofcourse you ask them

For different machines, won't it be possible to just grab the computer name from the WLM settings (used for signing in on multiple locations)? I'm no scripter, so I don't know. Detecting location based on IP sounds like a good feature, I'd use it :P
[Image: signature.php]
01-31-2009 10:50 AM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: advice - how to create PSM text:%location
Well, I don't know how one would retrieve the name as configured in the Messenger settings, because we don't have a decent API for that. However, it is possible (and quite simple in fact) to retrieve the network name and description of the current computer.

Javascript code:
var MAX_COMPUTERNAME_LENGTH = 31;
 
function GetComputerName() {
    var nLength = MAX_COMPUTERNAME_LENGTH + 1;
    var lpBuffer = Interop.Allocate(2*nLength+4);
    var lpSize = Interop.Allocate(4);
    lpSize.WriteDWORD(0, nLength);
 
    var Result = Interop.Call("kernel32", "GetComputerNameW", lpBuffer, lpSize);
    var sName = (Result === 0) ? false : lpBuffer.ReadString(0);
    lpBuffer.Size = 0;
    lpSize.Size = 0;
 
    return sName;
}

To get the computer's description, you simply need to check whether there's a valid REG_SZ key value named "srvcomment" in "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" and read that.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
01-31-2009 11:41 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: advice - how to create PSM text:%location
What are the different IP Subnets for your home and office?
01-31-2009 01:24 PM
Profile E-Mail PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: advice - how to create PSM text:%location
quote:
Originally posted by Vilkku
For different machines, won't it be possible to just grab the computer name from the WLM settings (used for signing in on multiple locations)? I'm no scripter, so I don't know. Detecting location based on IP sounds like a good feature, I'd use it :P
quote:
Originally posted by Matti
Well, I don't know how one would retrieve the name as configured in the Messenger settings, because we don't have a decent API for that. However, it is possible (and quite simple in fact) to retrieve the network name and description of the current computer.


or, if they're different machines, you could, you know, just SET DIFFERENT PSMs ON EACH MACHINE?!

8-)
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
01-31-2009 04:00 PM
Profile PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: advice - how to create PSM text:%location
quote:
Originally posted by ShawnZ
or, if they're different machines, you could, you know, just SET DIFFERENT PSMs ON EACH MACHINE?!

8-)
Correct me when I'm wrong, but when you run Windows Live Messenger 8.5 or higher on both computers and sign in on the same account, Messenger will always synchronize the name, personal message and display picture.

EDIT: Okay, thanks Matty. I seem to have missed that option while scrolling through the Messenger options window. :P

This post was edited on 02-01-2009 at 09:07 AM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
01-31-2009 05:40 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: advice - how to create PSM text:%location
quote:
Originally posted by Matti
quote:
Originally posted by ShawnZ
or, if they're different machines, you could, you know, just SET DIFFERENT PSMs ON EACH MACHINE?!

8-)
Correct me when I'm wrong, but when you run Windows Live Messenger 8.5 or higher on both computers and sign in on the same account, Messenger will always synchronize the name, personal message and display picture.
Only if this option is SET within the preferences of the account.

[Image: attachment.php?pid=949302]

.jpg File Attachment: options.signin.jpg (127.81 KB)
This file has been downloaded 223 time(s).

This post was edited on 01-31-2009 at 06:31 PM by matty.
01-31-2009 06:26 PM
Profile E-Mail PM 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