I know this has been asked repeatedly, e.g., here, or here,
but neither using \" nor quote
does seem to work for me. E.g., using
set msgDate to "05-06-2013"
set quotedmsgDate to "\"" & msgDate & "\"" as string
do shell script "echo " & quoted form of quotedmsgDate
returns
"\"05-06-2013\""
I don't get why, it would be great if you could enlighten me! I am using 10.8.5 and German localization if that matters...
EDIT:
This is the script I am trying to get to work
tell application "BibDesk (original)"
set thePublications to selection of document 1
repeat with thePub in thePublications
tell thePub
if value of field "Pages" is not "" then
set the_pages to value of field "Pages"
set quoted_pages to "\"" & the_pages & "\"" as string
set the_script to "/usr/bin/python /Users/Januz/Downloads/sanitize_BibDesk_pages.py -p " & quoted form of quoted_pages
set a to do shell script the_script
set value of field "Pages" to a
end if
end tell
end repeat
end tell
I get an error because the_script
is not set correctly, resulting in
do shell script "/usr/bin/python /Users/Januz/Downloads/sanitize_BibDesk_pages.py -p '\"151-65\"'"
which cannot be executed correctly...