但既不使用 \" 也不quote
似乎对我有用。例如,使用
set msgDate to "05-06-2013"
set quotedmsgDate to "\"" & msgDate & "\"" as string
do shell script "echo " & quoted form of quotedmsgDate
返回
"\"05-06-2013\""
我不明白为什么,如果你能启发我,那就太好了!如果这很重要,我正在使用 10.8.5 和德语本地化...
编辑:
这是我要开始工作的脚本
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
我得到一个错误,因为the_script
没有正确设置,导致
do shell script "/usr/bin/python /Users/Januz/Downloads/sanitize_BibDesk_pages.py -p '\"151-65\"'"
无法正确执行...