Bonsoir,
je te mets une nouvelle version du script qui évite les problèmes changement des tabulations par des espaces lors du copier-coller sur le site.
bon tests !
[CODE]tell application "Finder"
set Monfichier to choose file with prompt "Choisissez le fichier Substitutions de texte.plist de l'export"
end tell
open for access Monfichier
set vartoto to read Monfichier -- lit le fichier et le met dans la variable vartoto
close access Monfichier -- ferme le fichier
set vartoto2 to ""
set traite to ""
tell application "Finder"
set nb to count paragraph of vartoto
repeat with i from 1 to nb
set letext to paragraph i of vartoto
if letext contains "<key>shortcut</key>" then
set letextM to (paragraph (i + 1)) of vartoto
set newtext to (text 1 thru 10 of letextM) & "*" & text 11 thru -1 of letextM
set traite to letextM
set vartoto2 to vartoto2 & letext & return
set vartoto2 to vartoto2 & newtext & return
else
if letext is not traite and letext is not "" then
set vartoto2 to vartoto2 & letext & return
end if
end if
end repeat
set lefichier to open for access Monfichier with write permission
set eof lefichier to 0
write vartoto2 & return to lefichier starting at eof
close access lefichier
end tell
tell application "Finder"
activate
(display dialog ("waouou ... Ca y est c'est fait !") buttons {"Salut !"})
end tell[/CODE]