|  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 | 
 | 
  | 
ShawnZ 
Veteran Member 
     
  
  
 
Posts: 3141 Reputation: 43 
33 /   /   
Joined: Jan 2003 
 | 
 RE: advice - how to create PSM text:%location
are they seperate computers?    
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 | 
 | 
  | 
Th3rmal 
Veteran Member 
     
  
Peek-a-boo! I see you!!
  
Posts: 1226 Reputation: 26 
33 /   /   
Joined: Aug 2005 
 | 
 RE: advice - how to create PSM text:%location
quote: Originally posted by ShawnZ 
are they seperate computers?  
  
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 | 
 | 
  | 
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?  
  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 | 
 | 
  | 
Vilkku 
Veteran Member 
     
  
  
 
Posts: 1411 Reputation: 27 
37 /   /   
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?  
  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    
 |   
 | 
| 01-31-2009 10:50 AM | 
 | 
  | 
Matti 
Elite Member 
     
  
  
Script Developer and Helper
  
Posts: 1646 Reputation: 39 
33 /   /   
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. 
js 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.  
 |   
 | 
| 01-31-2009 11:41 AM | 
 | 
  | 
matty 
Scripting Guru 
     
  
 
Posts: 8327 Reputation: 109 
40 /   /   
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 | 
 | 
  | 
ShawnZ 
Veteran Member 
     
  
  
 
Posts: 3141 Reputation: 43 
33 /   /   
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  
  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?!
   
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 | 
 | 
  | 
Matti 
Elite Member 
     
  
  
Script Developer and Helper
  
Posts: 1646 Reputation: 39 
33 /   /   
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?! 
 
 
  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.    
 This post was edited on 02-01-2009 at 09:07 AM by Matti.
 |   
 | 
| 01-31-2009 05:40 PM | 
 | 
  | 
matty 
Scripting Guru 
     
  
 
Posts: 8327 Reputation: 109 
40 /   /   
Joined: Dec 2002
 
Status: Away
 
 | 
 | 
| 01-31-2009 06:26 PM | 
 | 
  | 
| 
Pages: (2): 
« First
  
 [ 1 ]
 2
 
»
 
Last »
 | 
| 
 |