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:
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
« Next Oldest Return to Top Next Newest »

Messages In This Thread
File Sending Script - by Weekender on 03-19-2007 at 08:49 PM
RE: File Sending Script - by matty on 03-20-2007 at 06:17 AM
RE: File Sending Script - by Felu on 03-20-2007 at 06:22 AM
RE: File Sending Script - by matty on 03-20-2007 at 06:38 AM
RE: File Sending Script - by Weekender on 03-20-2007 at 06:13 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