Quotes in VBScript [closed] - vbscript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
Due to system integrity I can't use " in my VBScript. Additionally escaping the quotes won't work.
Is there a possibility to use different quotes? Single quotes don't seem to work.

Sorry, string literals in VBScript use double quotes. There is not any alternative quoting syntax.
But, of course, you can change this (with quotes)
Dim test : test = "test"
into this (without quotes)
Dim test : test = Chr(116) & Chr(101) & Chr(115) & Chr(116)

Related

How to do arithmetic in bash when the operator is stored in a variable? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
add=+
echo "$((1{$add}2))"
If I write 1+2 it outputs 3, but when I store the + sign in a variable called "add" and then use it in place of + operator, it just outputs it as if it was a string. How can I use the variable and still make it output 3?
As far as I can see, the code is wrong and should not print anything but an error.
What you should do is write the variable as ${add}, not {$add}.

Algorithms new variable with same name [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to define a new variable called : character , with type of character
How can i do that without errors? (despite they have the same name)
I tried this on paper : variable character: character, but i am not sure if its correct or not
Thanks.
It depends on your programming language. Like in java you use-
char character = 'A';
And in c-
char character;

how to read a csv file which have comma in between the values in Informatica or talend tools? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have an input file where I have values like "Bengaluru","New,Delhi","New,York" and I want to read this data as Bengaluru,New Delhi,New York : commas inside the double quotes should not be evaluated as a separator : "New,Delhi" is evaluated as "New Delhi" and not separated in two items ("New" and "Delhi")
In Informatica you can specify the text qualifier as double quotes in source definition. That would give you the expected values.

How to write a file in ruby without a terminating newline [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
For debugging purposes, I want to alter a rake test so as not to end a saved file with a newline.
I don't know ruby. How do I do this? (file.print doesn't seem to work.)
Not clear what you are doing, but since you tried file.print, it looks like you have access to what is to be printed. Let's say this is string. My guess is that string already has a newline character. Then do:
file.print(string.chomp)

run vbscript mhta [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
i want to run vbscript from mhta
mshta "vbscript:window.close(msgbox("test"))"
WScript or CScript script hosts are not able to run a script if it is not stored in a file. But you can use mshta and the vbscript: protocol to run simple commands.
Anyway, for this case, it is easier to use
msg console "test"
edited to adapt to comments
i've being testing. vbscript parser in the mshta url has to face a lot of limitations. And problems with spaces, concatenation of commands with :, problems with procedure calling as a function but you can not use call keyword as a space is required, ....
The only stable, "easy" way of doing it is to prepare the vbscript to execute as a string, with no spaces inside it, and use the execute method to run it
mshta "vbscript:window.close(execute("msgbox"&chr(32)&"""test"":msgbox"&chr(32)&"""this"&chr(32)&"should"&chr(32)&"work"""))"
mshta "vbscript:window.close(execute("server=CreateObject(""WScript.Shell"").RegRead(""HKEY_CURRENT_USER\Volatile"&chr(32)&"Environment\LOGONSERVER""):For"&chr(32)&"i=1"&chr(32)&"to"&chr(32)&"3:msgbox"&chr(32)&"i"&chr(38)&"server:next"))"

Resources