Jump to content

Include quota " into a string


Recommended Posts

Hey folks,

Just having problems with the easiest stuff: trying to send "netsh interface ip set address name="Local Area Connection" static 172.28.13.7 255.255.255.224 172.28.13.30", but "Local Area Connection" is not accepted of course. Since it is part of the command i need in there. How to?

thx in advance,

wiegand

Link to comment
Share on other sites

Hey,

you can also escape quotes by doubling them, so '''' prints ' and """" prints ".

Example:

ConsoleWrite("Im a string with some quotes behind me '''""""""'''" & @CRLF) ; Output: Im a string with some quotes behind me '''"""'''
ConsoleWrite('Im a string with some quotes behind me ''''""""""''''' & @CRLF) ; Output: Im a string with some quotes behind me ''""""""''oÝ÷ ÚÊ-+,¥u©l£
+«­¢+ØÅÕ½Ðí¹ÑÍ ¥¹ÑÉ¥ÀÍÐÉÍ̹µôÅÕ½ÐìÅÕ½Ðí1½°É
½¹¹Ñ¥½¸ÅÕ½ÐìÅÕ½ÐìÍÑÑ¥ÄÜȸÈà¸Ä̸ÜÈÔÔ¸ÈÔÔ¸ÈÔÔ¸ÈÈÐÄÜȸÈà¸Ä̸ÌÀÅÕ½Ð

Edit: 2nd codebox

Edited by Robjong
Link to comment
Share on other sites

Hey,

you can also escape quotes by doubling them, so '''' prints ' and """" prints ".

Example:

ConsoleWrite("Im a string with some quotes behind me '''""""""'''" & @CRLF) ; Output: Im a string with some quotes behind me '''"""'''
ConsoleWrite('Im a string with some quotes behind me ''''""""""''''' & @CRLF) ; Output: Im a string with some quotes behind me ''""""""''oÝ÷ ÚÊ-+,¥u©l£
+«­¢+ØÅÕ½Ðí¹ÑÍ ¥¹ÑÉ¥ÀÍÐÉÍ̹µôÅÕ½ÐìÅÕ½Ðí1½°É
½¹¹Ñ¥½¸ÅÕ½ÐìÅÕ½ÐìÍÑÑ¥ÄÜȸÈà¸Ä̸ÜÈÔÔ¸ÈÔÔ¸ÈÔÔ¸ÈÈÐÄÜȸÈà¸Ä̸ÌÀÅÕ½Ð

Edit: 2nd codebox

funny thing is,

that i messed around in the help-file and in the forum for like 30 minutes and missed 2 solutions to the problem. Anyways, thx guys.

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...