hi i get an error whe i try to put this as a text
""Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "bat.bat" & Chr(34), 0
Set WshShell = nothing"" to the multiline box the error is detected at the word "WScript" how to correct that?
Develop games in your browser. Powerful, performant & highly capable.
Wouldn't you be better asking this on a more appropriate site that deals with vbs?
nope because i use the vbs with construct2 with the multiline box so its a problem with multiline box i think
Well, what you posted is a syntax error, the quotes are in the wrong places.
Ashley cant you tell me how i have to correct that? i mean what i have to change,
You should be using "" instead of " when you need to use double quotes inside a string value
Another solution is just to throw the script into a project file, or inside a global/local constant. (The project file is better IMO)
so i have to use (""WScript.Shell"") instead of ("WScript.Shell") ?
See the section on string expressions in the manual.
Don't forget newlines, It's only one statement per line in VBScript.
"Set WshShell = CreateObject(""WScript.Shell"") & newline &
"WshShell.Run ""bat.bat"", 0" & newline &
"Set WshShell = nothing"[/code:8ivcu8c7]