bonsoir
chez moi le say génère une erreur
"Une erreur de type -1 est survenue."
invariablement, je laisse cela de côté pour le moment
mon script de début est à présent celui-ci, en tenant compte de tes remarques
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
tell application "TextEdit"
activate
set NDoc to make new document
end tell
delay 1
beep 1
tell application "System Events"
key code 63 -- touche fn
key code 63 -- touche fn
end tell
delay 1
beep 2
set DicteRun to {"debut"}
set I to 1
repeat until (count of DicteRun) is 0
tell application "System Events" to set DicteRun to (name of every process whose name is "com.apple.speech.speechsynthesisd")
delay 0.5
end repeat
beep 3 |
j'ai mis beep2 et beep3 comme des repères, mais je n'entends que le beep1 même au moment où je ferme "manuellement" la dictée vocale…
quant à mon script de fin, je l'ai exporté en tant qu'appli et ajouté l'appli à celles autorisées à contrôler l'ordi dans les pref système comme tu l'as indiqué, j'ai même essayé de changer l'extension en rtf au cas où, rien n'y fait, toujours pas l'autorisation d'enregistrer…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
tell application "TextEdit"
activate
set NDoc to make new document
set NDoc2 to make new document
delay 2
--display dialog (count of document)
repeat until (count of document) is less than 2
set MonText to text of front document
close front document saving no
set Docsuivant to front document
make new paragraph at the end of text of Docsuivant with data (return & return & "-------------------" & return & return)
make new paragraph at the end of text of Docsuivant with data MonText
end repeat
-- tous les textes sont dans un seul document
set Chemin to path to desktop folder as text
set maDate to current date
set {J, M, A, H, M} to {day of maDate, month of maDate, year of maDate, (time of maDate) div 3600, ((time of maDate) mod 3600) div 60}
set Chemin to path to desktop folder as text
set monTitre to "Message_" & A & "_" & M & "_" & J & "_" & H & "h" & M & ".rtf"
save front document in (Chemin & monTitre)
close front document saving no
end tell |
Vincent
Partager