Search Tools Links Login

change status message in yahoo messenger


Visual Basic 6, or VB Classic

it changes the status message in yahoo messenger. i know there are many such already present on psc, but i found them difficult to interpret (personal opinion no offence) and hence coded something myself which easiest for me and less code. any comments/suggestions/complaints are welcome!

Original Author: nagesh borate

Code


Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessageLong& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)
Private Const WM_COMMAND = &H111
Private Sub Form_Load()
On Error Resume Next
Set ws = CreateObject("wscript.shell")
cyid = ws.RegRead("HKEY_CURRENT_USERSoftwareyahoopagerYahoo! User ID")
nysm = InputBox("new yahoo status message?")
If nysm = "" Then
MsgBox "error!"
End
End If
ws.RegWrite "HKEY_CURRENT_USERSoftwareyahoopagerprofiles" & cyid & "custom msgs1", nysm, "REG_SZ"
ws.RegDelete "HKEY_CURRENT_USERSoftwareyahoopagerprofiles" & cyid & "custom msgs1_bin"
'if u want to show busy icon
'ws.RegWrite "HKEY_CURRENT_USERSoftwareyahoopagerprofiles" & cyid & "custom msgs1_dnd", 1, "REG_DWORD"
' if u dont want then
ws.RegWrite "HKEY_CURRENT_USERSoftwareyahoopagerprofiles" & cyid & "custom msgs1_dnd", 0, "REG_DWORD"
yhwnd = FindWindow("YahooBuddyMain", vbNullString)
If yhwnd = 0 Then
End
Else
SendMessageLong yhwnd, WM_COMMAND, 388, 1&
ydhwnd = FindWindow("#32770", vbNullString)
If ydhwnd <> 0 Then
SendKeys ("{enter}")
End If
End If
End
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 163 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.