Bonjour,
ce script, développé sous MAC OS 9.x, a pour but d'associer une "famille" à
une une liste de fichiers.
Sélectionnez et faites un glisser/déposer des fichiers voulus sur l'icône du
script.
Une première boite de dialogue vous permet de sélectionner une famille.
Une seconde boite de dialogue vous permet de valider votre choix ou
d'annuler l'opération demandée.
on open selection
set liste_famille to {"Aucune", "Essentiel", "Important", "En cours",
"Budget", "Personnel", "Projet 1", "Projet 2"}
set indice_famille to 0
set famille_choisie to choose from list liste_famille ¬
with prompt "Sélectionnez une famille à associer aux documents
choisis :" OK button name ¬
"Associer" without multiple selections allowed and empty selection
allowed
if famille_choisie false then
set nb_famille to length of liste_famille
repeat with indice_famille from 1 to nb_famille
if famille_choisie contains item indice_famille of liste_famille
then
display dialog "Associer la famille " & "'" & item
indice_famille of liste_famille & "'" & " aux fichiers sélectionnés ?"
set x to indice_famille - 1
exit repeat
end if
end repeat
tell application "Finder"
set liste_fichiers to selection
try
repeat with reference_fichier in liste_fichiers
open information window of reference_fichier
set label index of reference_fichier to x
close information window of reference_fichier
end repeat
on error texte_anomalie
display dialog "Erreur : " & texte_anomalie
end try
end tell
end if
end open
_______________________________________________
Applescript_fr mailing list
Applescript_fr@???
http://listes.patpro.net/mailman/listinfo/applescript_fr