What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Starting an application

Starting an application
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: Starting an application
quote:
Originally posted by hmaster
quote:
Originally posted by tobias

Now does anyone have any ideas as to my first problem?

The problem is the spaces in the path. I don't know what to replace it with though. I've tried %20 but that didn't work.

you do what you normally would with a path containing spaces, put quotes around it. Which means you can either do this:
code:
new ActiveXObject("WScript.Shell").Run("\"C:\\Path Containing Spaces\"");
or to simplify things, use single quotes instead of double quotes for the string:
code:
new ActiveXObject("WScript.Shell").Run('"C:\\Path Containing Spaces"');

edit: added red highlighting to show double quotes on second example.
edit 2: updated matty's function to support paths containing spaces:
code:
function _start_app(_path){
    new ActiveXObject('WScript.Shell').run('"' + _path + '"');
}

This post was edited on 01-07-2007 at 03:54 PM by Eljay.
01-07-2007 03:52 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Starting an application - by tobias on 01-07-2007 at 05:21 AM
RE: Starting an application - by Ash_ on 01-07-2007 at 07:14 AM
RE: Starting an application - by matty on 01-07-2007 at 07:15 AM
RE: Starting an application - by tobias on 01-07-2007 at 01:52 PM
RE: RE: Starting an application - by CookieRevised on 01-08-2007 at 08:09 AM
RE: Starting an application - by hmaster on 01-07-2007 at 02:38 PM
RE: Starting an application - by tobias on 01-07-2007 at 03:32 PM
RE: Starting an application - by foaly on 01-07-2007 at 03:34 PM
RE: Starting an application - by hmaster on 01-07-2007 at 03:41 PM
RE: Starting an application - by Eljay on 01-07-2007 at 03:52 PM
RE: Starting an application - by hmaster on 01-07-2007 at 03:55 PM
RE: Starting an application - by deAd on 01-07-2007 at 03:57 PM
RE: Starting an application - by hmaster on 01-07-2007 at 04:03 PM
RE: RE: Starting an application - by deAd on 01-07-2007 at 04:07 PM
RE: Starting an application - by tobias on 01-08-2007 at 01:32 AM
RE: Starting an application - by tobias on 01-08-2007 at 04:46 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