What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [question] Run commands from script

Pages: (3): « First « 1 [ 2 ] 3 » Last »
[question] Run commands from script
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [question] Run commands from script
Can you not just use
code:
strPath = strPath.replace("\\","\\\\");


where strPath is the variable containing the path?

EDIT: Damn, beaten to it again :p

This post was edited on 09-11-2006 at 11:40 AM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
09-11-2006 11:39 AM
Profile PM Find Quote Report
skorpan
Junior Member
**


Posts: 16
Joined: Sep 2006
O.P. RE: RE: [question] Run commands from script
quote:
Originally posted by alexp2_ad
You actually WANT a double \\ for some reason?
...
code:
Messenger.ReceiveFileDir
Returns something like: c:\my documents\my recieved files, right?
This is stored in a string.

Before I can use it with
code:
Shell.Run
I need to change it into: c:\\my documents\\my recieved files.

How do I do that?
09-11-2006 11:42 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [question] Run commands from script
code:
strPath = Messenger.ReceiveFileDir;
strPath = strPath.replacE("\\","\\\\");
Shell.Run(strPath);


That should do it. :p

This post was edited on 09-11-2006 at 11:45 AM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
09-11-2006 11:44 AM
Profile PM Find Quote Report
skorpan
Junior Member
**


Posts: 16
Joined: Sep 2006
O.P. RE: RE: [question] Run commands from script
quote:
Originally posted by SpunkyLoveMuff
Can you not just use
code:
strPath = strPath.replace("\\","\\\\");


where strPath is the variable containing the path?

EDIT: Damn, beaten to it again :p

Thanks alot! =)
I solved it myself just before i read this :P But you actually did come with help that was useful =)
09-11-2006 11:48 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [question] Run commands from script
Hey no problem, although credit should probably goto Alexp2_ad as he got there faster than me :p

EDIT: My spelling is getting worse :s

This post was edited on 09-11-2006 at 11:50 AM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
09-11-2006 11:49 AM
Profile PM Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
37 / Male / –
Joined: May 2004
Status: Away
RE: RE: [question] Run commands from script
quote:
Originally posted by SpunkyLoveMuff
Hey no problem, although credit should probably goto Alexp2_ad as he got therte faster than me :p


And because you posted a triple backslash first didn't you? :P

BTW, can anyone get this to work, I tried:

new ActiveXObject('WScript.Shell').run(Messenger.ReceiveFileDir);

But it returns an unknown error, it should work as is, but it doesn't, tried replacing \ or whatever, but it didn't help. :S
09-11-2006 11:51 AM
Profile E-Mail PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [question] Run commands from script
quote:
Originally posted by alexp2_ad
new ActiveXObject('WScript.Shell').run(Messenger.ReceiveFileDir);
code:
new ActiveXObject('WScript.Shell').run(Messenger.ReceivedFileDir);
Should Work :p
09-11-2006 12:18 PM
Profile E-Mail PM Web Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: [question] Run commands from script
quote:
Originally posted by alexp2_ad
BTW, can anyone get this to work, I tried:

new ActiveXObject('WScript.Shell').run(Messenger.ReceiveFileDir);

But it returns an unknown error, it should work as is, but it doesn't, tried replacing \ or whatever, but it didn't help. [Image: msn_confused.gif]

I think it returns the error because it doesn't like spaces.  I tried a few different things and the only way I got the run command to work was when there was no spaces in th files path (in a file or a folder).  The only way I could imagine getting past this is by using the likes of a *.bat file but I'm sure somone else will divise a better method.

EDIT:
   
quote:
Originally posted by -!Felu!-


       
quote:
Originally posted by alexp2_ad
new ActiveXObject('WScript.Shell').run(Messenger.ReceiveFileDir);

   
code:
new ActiveXObject('WScript.Shell').run(Messenger.ReceivedFileDir);
    Should Work :p


alexp2_ad had the correct property, it does not have the extra 'd'

This post was edited on 09-11-2006 at 12:21 PM by markee.
[Image: markee.png]
09-11-2006 12:19 PM
Profile PM Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
37 / Male / –
Joined: May 2004
Status: Away
RE: RE: [question] Run commands from script
quote:
Originally posted by -!Felu!-
quote:
Originally posted by alexp2_ad
new ActiveXObject('WScript.Shell').run(Messenger.ReceiveFileDir);
code:
new ActiveXObject('WScript.Shell').run(Messenger.ReceivedFileDir);
Should Work :p

Nooooooo, I don't like it when people post without checking the scripting docs trying to be a smart arse!

quote:
Objects Reference - Messenger
Messenger::ReceiveFileDir
The Messenger::ReceiveFileDir property returns the path of the directory where files copied by Messenger when a file transfer request is accepted are stored.

Syntax
This is a read-only property.
[string] ReceiveFileDir;

09-11-2006 12:20 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [question] Run commands from script
quote:
Originally posted by alexp2_ad
you posted a triple backslash first didn't you?

Spelling mistake... I knew what I meant to put :p
<Eljay> "Problems encountered: shit blew up" :zippy:
09-11-2006 12:31 PM
Profile PM Find Quote Report
Pages: (3): « First « 1 [ 2 ] 3 » Last »
« Next Oldest Return to Top Next Newest »


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