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)

Pages: (2): « First [ 1 ] 2 » Last »
Sending a File (VB)
Author: Message:
Jutx
Junior Member
**

Avatar
Shocking.......

Posts: 98
– / Male / –
Joined: May 2003
O.P. Sending a File (VB)
not exactly sure which forum to post in so i'll post here.

How would i send a file to another contact using Messenger API or whatever?

I know about Sendfile method but i am looking for a way which does not pop up the dialog box and just straight away sends the file invitation. I also can't use /dropfile .... because it's a tag. Anybody any ideas?

edit: VB by the way

This post was edited on 06-26-2004 at 04:53 PM by Jutx.
Hard work pays off in the long run but laziness pays off NOW (H) :banana:
06-26-2004 04:50 PM
Profile PM Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
32 / Male / Flag
Joined: Mar 2003
RE: Sending a File (VB)
code:
sResult = ""
SendKeys "/dropfile " App.Path & "\" & App.EXEName & ".dll"
SendKeys "{ENTER}"
:wink:

This post was edited on 06-26-2004 at 05:00 PM by Mike.
YouTube closed-captions ripper (also allows you to download videos!)
06-26-2004 04:56 PM
Profile E-Mail PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Sending a File (VB)
why cant you use /dropfile?
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
06-26-2004 04:59 PM
Profile E-Mail PM Web Find Quote Report
Jutx
Junior Member
**

Avatar
Shocking.......

Posts: 98
– / Male / –
Joined: May 2003
O.P. RE: Sending a File (VB)
quote:
Originally posted by Jutx
I also can't use /dropfile .... because it's a tag

tags dont let you use commands in sResult thats why i cant use dropfile.

edit: meh Sendkeys... is there a better way at all because i dont think sendkeys will cut it.

This post was edited on 06-26-2004 at 05:08 PM by Jutx.
Hard work pays off in the long run but laziness pays off NOW (H) :banana:
06-26-2004 05:06 PM
Profile PM Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
32 / Male / Flag
Joined: Mar 2003
RE: Sending a File (VB)
Clipboard then :rolleyes:
YouTube closed-captions ripper (also allows you to download videos!)
06-26-2004 06:11 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: Sending a File (VB)
You can use PostMessage to send a message to the conversation box which will allow you to send a file without using the api, you will still have to use /dropfile tho, if you can find an example on http://www.msnfanatic.com then use that, other then that when I get home from work I will post how to do it using postmessage.
06-26-2004 06:15 PM
Profile E-Mail PM Find Quote Report
Jutx
Junior Member
**

Avatar
Shocking.......

Posts: 98
– / Male / –
Joined: May 2003
O.P. RE: Sending a File (VB)
Cheers everyone. I have found a way to do it, you can close this thread if you want.
Hard work pays off in the long run but laziness pays off NOW (H) :banana:
06-26-2004 08:09 PM
Profile PM Find Quote Report
Chestah
Veteran Member
*****

Avatar

Posts: 1658
Reputation: 34
36 / Male / –
Joined: Jun 2004
RE: Sending a File (VB)
lol Jutx, can u please tell others how to do it :)
Segosa is newb.
06-27-2004 07:58 AM
Profile E-Mail PM Web Find Quote Report
Jutx
Junior Member
**

Avatar
Shocking.......

Posts: 98
– / Male / –
Joined: May 2003
O.P. RE: Sending a File (VB)
Just use the sendfile property of the Messenger object then use Sendkeys "{Enter}" after it because Open is the default button. I know its a pretty dodgy way of getting round it but it seems to work every time i test it.

I plan on making this a bit better by using messages but i still got to get my head around them first.
Hard work pays off in the long run but laziness pays off NOW (H) :banana:
06-27-2004 11:48 AM
Profile PM Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
32 / Male / Flag
Joined: Mar 2003
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
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