String and Shell questions

HARRY

Active Member
Licensed User
Longtime User
Hi,

Quite some time I had no opportunity to program; therefore I have forgotten some simple things. Two questions:

1) How to include quote (") symbols in a string variable?

2) Is Shell variable name a valid statement? Variable should include (" "," ")?

Thanks for some help

Harry
 
1) How to include quote (") symbols in a string variable?
"first bit " & chr(34) & "second bit". It's in Help - Main Help - Keywords - String - Chr

Is Shell variable name a valid statement? Variable should include (" "," ")?
Sorry, don't understand!
 
2) Is Shell variable name a valid statement? Variable should include (" "," ")?
Is this what you are asking about?

Code:
  app = "someapp"
  arglist =Chr(34) & "this is arg0" & Chr(34) & " arg1" & " arg2 arg3"
  Shell(app, arglist)

Note that the quoted string is a single argument and that spaces separate the non-quoted arguments otherwise they appear as one argument
 
Hello Agraham,

Thanks for your prompt reply. The second question in fact was whether the parameter following the Shell statement can be a variable or must be a string itself. I think that a variable is allowed.

Testing some more I got the following problem:

Two lines of coding:
DelStr="(" & Chr(34) & "C:\Program Files\MortScript\MortScript.exe" & Chr(34) & "," & Chr(34) & "C:\Program Files\MortScript\Delete.mscr, DelName=" & DestPath & "Data.zip" & Chr(34) & ")"

Shell Delstr

The contents of DelStr now is :

("C:\Program Files\MortScript\MortScript.exe","C:\Program Files\MortScript\Delete.mscr, DelName=C:\MIOMAP\UI_S\Data.zip")
This results into the message: Invalid characters in path.

Is this caused by the space between Program and Files and how to solve this ?

Harry
 
Back
Top