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

[question] Run commands from script
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: RE: [question] Run commands from script
quote:
Originally posted by skorpan
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?
You don't!!

The Messenger.ReceiveFileDir (just as other similar functions) returns a proper string already. Do NOT change the slashes to double slashes! This will result in unwanting effects and possible errors.

You need specifiy a double slash ONLY when you type the variable yourself like:

MyString = "here I manually enter some text with some \\ slashes in \\ it and some new lines: \n\n\n hello"

If you print out that variable you'll see:
"here I manually enter some text with some \ slashes in \ it and ...."

As explained before the slash is a special character and means "take the next character literally" (if the next character isn't a control character). So if you enter a string value manually you need to specify a double slash so the programming language knows it must take the second slash literally.

However, when functions return variables, all the charaters inside the variable are already correct; the programming language has already taken the slashes literally:

MyString = Messenger.ReceiveFileDir

If you print out that string you will see again only single slashes as it should be and just the same as with the output of our previous string.

If the returned string wasn't proper formatted you would not see something like "C:\Hello", but you would see "C:Hello".

so... DO NOT CHANGE SLASHES TO DOUBLE SLASHES in strings returned by functions.

This post was edited on 09-11-2006 at 04:23 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-11-2006 04:15 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[question] Run commands from script - by skorpan on 09-11-2006 at 10:58 AM
RE: Run commands from script - by Felu on 09-11-2006 at 11:00 AM
RE: RE: Run commands from script - by skorpan on 09-11-2006 at 11:12 AM
RE: [question] Run commands from script - by Felu on 09-11-2006 at 11:16 AM
RE: RE: [question] Run commands from script - by skorpan on 09-11-2006 at 11:17 AM
RE: [question] Run commands from script - by Felu on 09-11-2006 at 11:22 AM
RE: RE: [question] Run commands from script - by skorpan on 09-11-2006 at 11:26 AM
RE: RE: [question] Run commands from script - by alexp2_ad on 09-11-2006 at 11:26 AM
RE: RE: RE: [question] Run commands from script - by skorpan on 09-11-2006 at 11:34 AM
RE: [question] Run commands from script - by alexp2_ad on 09-11-2006 at 11:36 AM
RE: [question] Run commands from script - by Spunky on 09-11-2006 at 11:39 AM
RE: RE: [question] Run commands from script - by skorpan on 09-11-2006 at 11:42 AM
RE: RE: RE: [question] Run commands from script - by CookieRevised on 09-11-2006 at 04:15 PM
RE: [question] Run commands from script - by Spunky on 09-11-2006 at 11:44 AM
RE: RE: [question] Run commands from script - by skorpan on 09-11-2006 at 11:48 AM
RE: [question] Run commands from script - by Spunky on 09-11-2006 at 11:49 AM
RE: RE: [question] Run commands from script - by alexp2_ad on 09-11-2006 at 11:51 AM
RE: [question] Run commands from script - by Felu on 09-11-2006 at 12:18 PM
RE: RE: [question] Run commands from script - by alexp2_ad on 09-11-2006 at 12:20 PM
RE: [question] Run commands from script - by markee on 09-11-2006 at 12:19 PM
RE: [question] Run commands from script - by Spunky on 09-11-2006 at 12:31 PM
RE: [question] Run commands from script - by Eljay on 09-11-2006 at 12:48 PM
RE: [question] Run commands from script - by markee on 09-11-2006 at 12:58 PM
RE: [question] Run commands from script - by Shondoit on 09-11-2006 at 06:06 PM
RE: [question] Run commands from script - by CookieRevised on 09-12-2006 at 07:46 AM


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