Mince j'avais oublié le caractère " c'est un peut particulier. je te mets le script modifié.
Bloc de code:
tell application "Finder"
set laref to the clipboard
set lesChar to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
set leNbchar to count of every character of laref
set place to 1
set newref to laref
repeat with i from 2 to leNbchar - 1
set place to place + 1
set lechar1 to character i of laref
set lechar2 to character (i + 1) of laref
set lechar0 to character (i - 1) of laref
if lechar1 is in lesChar then
if lechar0 is not in lesChar then
if lechar0 = " " then
else
set newref to characters 1 thru (place - 1) of newref & " " & characters place thru -1 of newref as string
set place to (place + 1)
end if
end if
if lechar2 is not in lesChar then
if lechar2 = " " then
else
set newref to characters 1 thru (place) of newref & " " & characters (place + 1) thru -1 of newref as string
set place to (place + 1)
end if
end if
end if
end repeat
set lesCharspe to {"<", ">", "@", "#", "&", ":", "/", "*", "-", "+", "_", ",", ".", ":", "+", "=", "%", "*", "'", "(", ")", "!", "?", "\""}
repeat with i from 1 to count of every character of newref
if character i of newref is in lesCharspe then
set newref to characters 1 thru (i - 1) of newref & " " & characters (i + 1) thru -1 of newref as string
end if
end repeat
set supespace to newref
set place to 1
repeat with i from 1 to (count of every character of newref) - 2
set lechar1 to character place of supespace
set lechar2 to character (place + 1) of supespace
if lechar1 = " " then
if lechar2 = " " then
set supespace to characters 1 thru (place - 1) of supespace & characters (place + 1) thru -1 of supespace as string
set place to place - 1
end if
end if
set place to place + 1
end repeat
set the clipboard to supespace
end tell