What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » File Sending Script

File Sending Script
Author: Message:
Weekender
New Member
*

Avatar
Let Yourself go..

Posts: 10
Reputation: 1
32 / Male / –
Joined: Mar 2007
O.P. File Sending Script
Is there a script out there that can send a file without you having to close it? or it this impossible?
03-19-2007 08:49 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: File Sending Script
huh?!?

[Release] SendTo v2.2 [Final]
03-20-2007 06:17 AM
Profile E-Mail PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: File Sending Script
I think he means that is it possible to send a file when the file is in use. I don't think this is possible.
03-20-2007 06:22 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: File Sending Script
This can easily be accomplished by doing this:

code:
function OnEvent_Initialize(MessengerStart){
    Debug.Trace('File In Use : '+_isFileInUse('\\\?\\c:\\doc1.doc'));
}

function _isFileInUse(_path){
    var _hfile = Interop.Call('kernel32',
                               'CreateFileW',
                               _path,
                               0x80000000     /* GENERIC_READ */,
                               0, 0,
                               3             /* OPEN_EXISTING */,
                               0x80             /* FILE_ATTRIBUTE_NORMAL */,
                               0);
    Interop.Call('kernel32', 'CloseHandle', _hfile);
    return _hfile = -1 ? true : false;
}

With this code you can create a script that will replace the normal /sendfile command and you can check if the file is in use, if it is copy it to another location and send it from there. I would say though to copy it to the scripts directory under like /files then on Uninitialize or SignOut you delete all the files.

This post was edited on 03-20-2007 at 06:43 AM by matty.
03-20-2007 06:38 AM
Profile E-Mail PM Find Quote Report
Weekender
New Member
*

Avatar
Let Yourself go..

Posts: 10
Reputation: 1
32 / Male / –
Joined: Mar 2007
O.P. RE: File Sending Script
ok thanks for the help, makes life easier =D
03-20-2007 06:13 PM
Profile E-Mail PM Find Quote Report
« 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