Jump to content

How can I include " in a message ?


Recommended Posts

I need to do the following:

$message should give me "Some text" (with the brackets).

Now how can I do this, seen that when I do this like this ($message = "Some text"), $message gives me Some text (without the brackets)

Thanks

I'm having trouble understanding. I see $message = "Some Text", But where do the brackets come from?? Do you want them in the string?? Cause im just lost :)
Link to comment
Share on other sites

I'm having trouble understanding. I see $message = "Some Text", But where do the brackets come from?? Do you want them in the string?? Cause im just lost :)

What I want to do is that $message has to be send to the KLOG service (is a service which enumerates a syslog error to the syslog server) and the error is set in $message.

So actually, I need it to send this:

Run("KLOG.EXE -L Critical -m " & $message)

So my message must be between brackets because it consist of more then 1 word.

The message send could be like this --> Diskspace on drive C is low

So when I send that in command line, this would be: KLOG.EXE -L Critical -m "Diskspace on drive C is low"

Edited by LordSphynx
Link to comment
Share on other sites

What I want to do is that $message has to be send to the KLOG service (is a service which enumerates a syslog error to the syslog server) and the error is set in $message.

So actually, I need it to send this:

Run("KLOG.EXE -L Critical -m " & $message)

So my message must be between brackets because it consist of more then 1 word.

The message send could be like this --> Diskspace on drive C is low

So when I send that in command line, this would be: KLOG.EXE -L Critical -m "Diskspace on drive C is low"

Ahhh! Ok, All you need to do is use ' instead of " in your function call. The result would be:

run (' KLOG.EXE -L Critical -m "Diskspace on drive C is low"')

EDIT: Oooooooo........ Just bet me Jdeb! :)

Edited by Bert
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...