by jakethebot (4 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 24th October 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Yahoo 5.0 bas
'bas created by jakethebot2001 Jakethebot INC.&Pkin INC. all rights reserved.
'http://jakethebot.com
Public Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Declare Function SendMessageLong& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)
Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Const BM_SETCHECK = &HF1
Public Const BM_GETCHECK = &HF0
Public Const CB_GETCOUNT = &H146
Public Const CB_GETLBTEXT = &H148
Public Const CB_SETCURSEL = &H14E
Public Const GW_HWNDFIRST = 0
Public Const GW_HWNDNEXT = 2
Public Const GW_CHILD = 5
Public Const LB_GETCOUNT = &H18B
Public Const LB_GETTEXT = &H189
Public Const LB_SETCURSEL = &H186
Public Const SW_HIDE = 0
Public Const SW_MAXIMIZE = 3
Public Const SW_MINIMIZE = 6
Public Const SW_NORMAL = 1
Public Const SW_SHOW = 5
Public Const VK_SPACE = &H20
Public Const WM_CHAR = &H102
Public Const WM_CLOSE = &H10
Public Const WM_COMMAND = &H111
Public Const WM_GETTEXT = &HD
Public Const WM_GETTEXTLENGTH = &HE
Public Const WM_KEYDOWN = &H100
Public Const WM_KEYUP = &H101
Public Const WM_LBUTTONDBLCLK = &H203
Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202
Public Const WM_MOVE = &HF012
Public Const WM_RBUTTONDOWN = &H204
Public Const WM_RBUTTONUP = &H205
Public Const WM_SETTEXT = &HC
Public Const WM_SYSCOMMAND = &H112
'To Use Yahoo chat/pm send type: call ysend("this is where message goes")
Sub ysend(what$)
Dim imclass As Long
Dim richedit As Long
Dim button As Long
imclass = FindWindow("imclass", vbNullString)
richedit = FindWindowEx(imclass, 0&, "richedit", vbNullString)
Call SendMessageByString(richedit, WM_SETTEXT, 0&, what$)
Do
DoEvents
imclass = FindWindow("imclass", vbNullString)
button = FindWindowEx(imclass, 0&, "button", vbNullString)
button = FindWindowEx(imclass, button, "button", vbNullString)
button = FindWindowEx(imclass, button, "button", vbNullString)
button = FindWindowEx(imclass, button, "button", vbNullString)
Call SendMessageLong(button, WM_LBUTTONDOWN, 0&, 0&)
Call SendMessageLong(button, WM_LBUTTONUP, 0&, 0&)
Loop Until button <> 0
End Sub
'closes yahoo instant messanger call closeim
Sub closeim()
Dim yahoobuddymain As Long
yahoobuddymain = FindWindow("yahoobuddymain", vbNullString)
Call SendMessageLong(yahoobuddymain, WM_CLOSE, 0&, 0&)
End Sub
'closes yahoo pm call closepm
Sub closepm()
Dim imclass As Long
imclass = FindWindow("imclass", vbNullString)
Call SendMessageLong(imclass, WM_CLOSE, 0&, 0&)
End Sub
'change yahoo messanger caption call changem("the caption u wantr")
Sub changem(what$)
Dim yahoobuddymain As Long
yahoobuddymain = FindWindow("yahoobuddymain", vbNullString)
Call SendMessageByString(yahoobuddymain, WM_SETTEXT, 0&, what$)
End Sub
'changes yahoo pm caption call changep("the caption u want")
Sub changep(what$)
Dim imclass As Long
imclass = FindWindow("imclass", vbNullString)
Call SendMessageByString(imclass, WM_SETTEXT, 0&, what$)
End Sub
'HOW TO MAKE A MANUAL YAHOO CAPTION
'FIRST DO THIS
'call changep(text1.text) then add a command button enter that code add a texbox then thats all
'how to make a manual Yahoo Messanger Caption changer
'first do this add a command 1 button and a text box
'in command 1 button add this code call changem(text1.text)
'that is all
'HOW TO MAKE A YAHOO COMMAND THING
'FIRST ADD 1 TEXTBOX THEN ONE COMMAND BUTTON
'THEN IN COMMAND BUTTON DO THIS CODE
'IF (TEXT1 = "/closepm")then
'call closep
'end if
'if (text1 = "/closeim")then
'call closeim
'end if
'see if the user types /closepm then click the button it closes the Yahoo Pm
'this is a very simple action lol
'How to create a Time Send first add a command button then do this code
'call ysend("Hello"+vbcrlf+"the time is:"+time+"")
'this bas contain normal thing like chat send change captions and other things etc
'this created by jakethebot2001 works for Vb5.0 and Vb6.0 the prog commands work only for Yahoo Messanger v5.00