What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Sending a File (VB)

Sending a File (VB)
Author: Message:
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
31 / Male / Flag
Joined: Mar 2003
Status: Online
RE: Sending a File (VB)
Sendkeys is not the best way to press a key since it wont work all the times.
Use the keyb_event
Here's an example from AllAPI:
code:
Const VK_H = 72
Const VK_E = 69
Const VK_L = 76
Const VK_O = 79
Const KEYEVENTF_EXTENDEDKEY = &H1
Const KEYEVENTF_KEYUP = &H2
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Form_KeyPress(KeyAscii As Integer)
    'Print the key on the form
    Me.Print Chr$(KeyAscii);
End Sub
Private Sub Form_Paint()
    'KPD-Team 2000
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    'Clear the form
    Me.Cls
    keybd_event VK_H, 0, 0, 0   ' press H
    keybd_event VK_H, 0, KEYEVENTF_KEYUP, 0   ' release H
    keybd_event VK_E, 0, 0, 0  ' press E
    keybd_event VK_E, 0, KEYEVENTF_KEYUP, 0  ' release E
    keybd_event VK_L, 0, 0, 0  ' press L
    keybd_event VK_L, 0, KEYEVENTF_KEYUP, 0  ' release L
    keybd_event VK_L, 0, 0, 0  ' press L
    keybd_event VK_L, 0, KEYEVENTF_KEYUP, 0  ' release L
    keybd_event VK_O, 0, 0, 0  ' press O
    keybd_event VK_O, 0, KEYEVENTF_KEYUP, 0  ' release O
End Sub
http://www.mentalis.org/apilist/keyb_event.shtml
YouTube closed-captions ripper (also allows you to download videos!)
06-27-2004 12:31 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Sending a File (VB) - by Jutx on 06-26-2004 at 04:50 PM
RE: Sending a File (VB) - by Mike on 06-26-2004 at 04:56 PM
RE: Sending a File (VB) - by Dempsey on 06-26-2004 at 04:59 PM
RE: Sending a File (VB) - by Jutx on 06-26-2004 at 05:06 PM
RE: Sending a File (VB) - by Mike on 06-26-2004 at 06:11 PM
RE: Sending a File (VB) - by matty on 06-26-2004 at 06:15 PM
RE: Sending a File (VB) - by Jutx on 06-26-2004 at 08:09 PM
RE: Sending a File (VB) - by Chestah on 06-27-2004 at 07:58 AM
RE: Sending a File (VB) - by Jutx on 06-27-2004 at 11:48 AM
RE: Sending a File (VB) - by Mike on 06-27-2004 at 12:31 PM
RE: Sending a File (VB) - by edkwh on 06-27-2004 at 12:48 PM
RE: Sending a File (VB) - by CookieRevised on 06-27-2004 at 12:55 PM


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