Search the Community
Showing results for tags 'doublequote'.
Found 2 results
I send a string Sun is shining, the weather is sweet to my Powershell script for converting text to JSON request and then to speech. This snippet works as intended: $CMD = "powershell " & $powershellScript & " -Text '" & $sText & "' -Path " & $outputFile & ".wav" $execCommand = Run($CMD, '' , @SW_HIDE, 0x2) This one differs only by single quotes: $CMD = 'powershell ' & $powershellScript & ' -Text "' & $sText & '" -Path ' & $outputFile & '.wav' $execCommand = Run($CMD, '' , @SW_HIDE, 0x2) And only the first word Sun is voiced for some reason. I wonder why is it so and is it on Autoit side or PS/JSON?
Hope someone can help as quotes within quotes is always confusing. I am creating a silent install of printer software and want to call via runwait comspec line. The call within a cmd line is below samsung.exe /s /n"Samsung SL-M3220ND" /p"xxx" xxx will be stored as a variable $PrinterIP which would be as example 10.10.10.20 I need to use a variable as i am doign this for a business and need it to be based on the store i install at that has a specific IP range. I started with the below as 2 possibilities but no luck.. RunWait(@ComSpec & "/c " & "samsung.exe /s /n""Samsung SL-M3220ND"" /p""" & $PrinterIP ") RunWait(@ComSpec & "/c " & "samsung.exe /s /n'Samsung SL-M3220ND' /p'" & $PrinterIP '") but i cant get it to compile as i have errors on the line.. thanks in advance.