Shoutbox

[Thx ;)]Little help for Opendlg and .lnk file pls - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Thx ;)]Little help for Opendlg and .lnk file pls (/showthread.php?tid=72283)

[Thx ;)]Little help for Opendlg and .lnk file pls by Flash on 03-03-2007 at 02:39 PM

Its possible to get the parameter of a .lnk file when i select them with this code????

code:
var oOpenDlg = new ActiveXObject("UserAccounts.CommonDialog");
//var FSO = new ActiveXObject("Scripting.FileSystemObject");
//var sourceFile = pPlusWnd.GetControlText('EdtFrom').replace(/(^\s*)|(\s*$)/g, '');
// Open a Common OpenFile dialog
oOpenDlg.FileName = sourceFile;
oOpenDlg.Filter = 'Game Executable (*.exe,*.lnk)|*.exe;*.lnk'

oOpenDlg.FilterIndex = (oOpenDlg.FileName === '' || oOpenDlg.Filter.indexOf("." + FsObj.GetExtensionName(oOpenDlg.FileName).toUpperCase() + ';') !== -1) ? 1 : 2;
oOpenDlg.Flags = 0x1000 | 0x800 | 0x4;
oOpenDlg.ShowOpen();
edit omg
RE: Little help for Opendlg and .ink file pls by ShawnZ on 03-03-2007 at 02:41 PM

what is an ink file?


RE: Little help for Opendlg and .ink file pls by MeEtc on 03-03-2007 at 03:07 PM

if you mean a shortcut file, the extension is LNK


Little help for Opendlg and .lnk file pls by Flash on 03-03-2007 at 08:58 PM

lol thx but i want, when is select the lnk file with opendialog its possible to got the parameter eg:
"H:\Battlefield 2142\BF2142Launcher.exe" +menu 1 +fullscreen 1 +eaAccountName Flash +eaAccountPassword 112323 +soldierName Flash27


RE: Little help for Opendlg and .lnk file pls by Flash on 03-12-2007 at 03:01 AM

:( no one know that !


RE: Little help for Opendlg and .lnk file pls by matty on 03-12-2007 at 07:01 AM

Look at the SendTo script it has it in it. I just dont have time right now to post it. If you can't find it I will point you in the direction later.


RE: Little help for Opendlg and .lnk file pls by Flash on 03-13-2007 at 12:05 AM

hum i seefor creat a shortcut and add argument but for get him i dont know Matty :(


RE: Little help for Opendlg and .lnk file pls by matty on 03-13-2007 at 06:48 AM

code:
function OnEvent_Initialize(_bMessengerStart){
    /*
        Initialize the shortcut to read the properties
    */

    var _oShortcut = new ActiveXObject('WScript.Shell' ).CreateShortcut('C:\\firefox.exe.lnk');

    /*
        Print out the properties of the icon
    */

    Debug.Trace('.TargetPath : '+_oShortcut.TargetPath);
    Debug.Trace('.Arguments : '+_oShortcut.Arguments);
    Debug.Trace('.IconLocation : '+_oShortcut.IconLocation);   
}

RE: Little help for Opendlg and .lnk file pls by Flash on 03-13-2007 at 09:30 AM

oh ok thx :P i try this after my job :D

Thx matty that work perfectly :D


RE: [Thx ;)]Little help for Opendlg and .lnk file pls by CookieRevised on 03-14-2007 at 07:03 AM

If this is for starting up programs, you don't need to look into the shortcut file. A shortcut file is especially there so you simply can run it like any other program and it will start up the 'parameter' (as you call it) anyways.


RE: [Thx ;)]Little help for Opendlg and .lnk file pls by Flash on 03-14-2007 at 01:13 PM

no no, its for when u select a file for start with the Personalized Status ;) i save the targetpath and the parameter now that work great ;)