What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » A bit more help taking pictures

A bit more help taking pictures
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: A bit more help taking pictures
Download the latest released beta of Screenshot Sender here http://beta.screenshotsender.com/beta.

Change the code in timer.js to the following:

Javascript code:
/*
 * -----
 * Screenshot Sender - timer.js
 * -----
 * Handles all timer functions for Screenshot Sender
 * -----
 */
 
var sWindow = '';
 
function OnEvent_Timer(sTimerId) {
    _debug.getfuncname(arguments);
    switch (sTimerId.toLowerCase()) {
        case 'countdown':
            if (TimerValue !== 0) {
                var s = (TimerValue < 10 ? '0' : '') + TimerValue;                objWindows['Countdown'].SetControlText('lblTimer', s);                 var o = objCWindows[objWindows['Countdown'].Handle].ChatWnd;                if (o.EditChangeAllowed === true) {                    o.SendMessage(s);                }                --TimerValue;
                MsgPlus.AddTimer(sTimerId, 1000);
            } else if (TimerValue === 0) {
                _win32.ShowWindow(objWindows['Countdown'].Handle, _win32._const._SW_HIDE);
                var o = objCWindows[objWindows['Countdown'].Handle];
                CommandToFunction(o.ChatWnd, o.SaveImage, o.Command);
                CloseWindow('Countdown');
                IsTimerActive = false;
            }
            break;
        case 'window':
            sWindow = 'WindowSelect';
        case 'pcc' :
            if (sWindow === 'WindowSelect' && new_hWnd !== _win32.GetForegroundWindow()) {
                MsgPlus.AddTimer('window', 200);
                return;
            }
            if (sWindow === '') sWindow = 'PointClickCapture';
            var lWindowRect = Interop.Allocate(16);
            var hWnd = _win32.GetForegroundWindow();
            _win32.GetWindowRect(hWnd, lWindowRect);
           
            var objCWindow = objCWindows[objWindows[sWindow].Handle];
            var oGdip = new Gdip(objCWindow.SaveImage);
            oGdip.Initialize();
            if (oGdip.Initialized == true) {
                oGdip.SaveImage(oGdip.CaptureWindow(hWnd, lWindowRect, false, false, true), SessionImages.CreateTempImage());
                if (oGdip.SaveSuccessful == true /*[Ok]*/) {
                    if (objCWindow.SaveImage == false) {
                        if (objPreferences['cPreviews'] == true) {
                            Preview(objCWindow.ChatWnd, oGdip.ImageLocation);
                        }
                        else {
                            try {
                                if (objCWindow.ChatWnd.Contacts.Count === 1) oChatWnd_SendFile(objCWindow.ChatWnd, oGdip.ImageLocation);
                                else ContactSelector(objCWindow.ChatWnd.Contacts);
                            } catch (e) {
                                var WndContactSelector = ContactSelector(Messenger.MyContacts);
                                objChatWnds[WndContactSelector.Handle] = {};
                                objChatWnds[WndContactSelector.Handle].Image = oGdip.ImageLocation;
                            }
                        }
                    } else {
                        if (objPreferences['cPreviews'] == true) {
                            Preview(objCWindow.ChatWnd, oGdip.ImageLocation, true);
                        } else {
                            SessionImages.MoveTempImage(oGdip.ImageLocation, SessionImages.CreateImagePath());
                            if ((objPreferences['cUploadScreenshots'] == true && objPreferences['cUploadOptions'] === 0) ||
                                (SaveImage === false && objPreferences['cUploadOptions'] === 1) ||
                                (SaveImage === true && objPreferences['cUploadOptions'] === 2)) {
                                Ftp_UploadFile(oGdip.ImageLocation, false, objCWindow.ChatWnd, true);
                            }
                        }
                    }
                }
            }
            CloseWindow(sWindow);
            oGdip.Uninitialize();
            sWindow = '';
           
            if (bMinimized === true) {
                _win32.ShowWindow(hWnd, _win32._const._SW_SHOWMINIMIZED);
                _win32.SetForegroundWindow(pre_hWnd);
                bMinimized = false;
            }
            break;
    }
}

07-18-2010 05:47 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
A bit more help taking pictures - by SR01001010 on 07-17-2010 at 08:26 PM
RE: A bit more help taking pictures - by roflmao456 on 07-17-2010 at 08:55 PM
RE: A bit more help taking pictures - by SR01001010 on 07-18-2010 at 09:43 AM
RE: A bit more help taking pictures - by matty on 07-18-2010 at 05:47 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