AppleScript help in Keyboard Maestro needed :D..how to pass quoted arguments?

hi all.

I want to execute CCC via its CLI interface but run it as an AppleScript (for use in other non KM applications as well)

I have gotten this far which works from the CLI

"/Applications/Carbon Copy Cloner.app/Contents/MacOS/ccc" -s "Music::Qnap::daily"

yet I understand that to create an AppleScript for it I have to use the do shell script command so I have in Keyboard Maestro something like this:

do shell script  "/Applications/Carbon Copy Cloner.app/Contents/MacOS/ccc" -s "Music::Qnap::daily"

this obviously dosent work. I assume its because I need to address the " inside the " in the main quotes

Does anyone period know how to deal with this?

best and thx so much in advance!

Z

AppleScript requires double quotes (which you can escape \" for inclusion between outer double quotes) but the shell also understands single quotes, so I think you should be able to write:

do shell script  "'/Applications/Carbon Copy Cloner.app/Contents/MacOS/ccc' -s 'Music::Qnap::daily'"

thx @ComplexPoint , works like a charm!!

best

Z

1 Like