Shoutbox

trying to open My recieved folder - 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: trying to open My recieved folder (/showthread.php?tid=91830)

trying to open My recieved folder by Zakukashi on 08-11-2009 at 05:48 AM

Hi I made a simple menu item that should open My received folder or any folder. I couldn't find a way.. So I did this

function OnEvent_MenuClicked(folder,Location, OriginWnd)
{   
var Shell = new ActiveXObject("WScript.Shell");
               Shell.Exec("C:\Application.exe");
               return"";
               
   
   
}

I made a VB applicaion to open the folder ... is there an easier way to do it without using shell? when I try a normal link like Shell.Exec("C:\Myrecieved\");
it dosnt open it. Please let me know if theres an easier way to this thanks!


RE: trying to open My recieved folder by ShawnZ on 08-11-2009 at 06:03 AM

try "explorer [pathname]"


RE: trying to open My recieved folder by felipEx on 08-11-2009 at 06:03 AM

quote:
Originally posted by Zakukashi

I made a VB applicaion to open the folder ... is there an easier way to do it without using shell? when I try a normal link like Shell.Exec("C:\Myrecieved\");
it dosnt open it. Please let me know if theres an easier way to this thanks!
Well, the ShellExecute function should do the trick
JScript code:
Interop.Call("shell32", "ShellExecuteW", null, "open", "C:\\Myrecieved", null, null, 1 /*SW_SHOWNORMAL*/);
Also, notice that "\" is an escape character in JScript so you need to use double backslash "\\" instead ;)
RE: trying to open My recieved folder by matty on 08-11-2009 at 12:55 PM

Instead of hardcoding the path to the folder get it from the registry. Take a look at CookieRevised's reply to Where is Recieved Files Folder stored in the registry?