positionner icônes dans fenêtre

crifou

Membre confirmé
13 Novembre 2004
12
0
Bonjour,

J'ai fait un script pour positionner des icônes dans la fenêtre d'un dossier, en action de dossier, et ça fonctionne.
Maintenant, pour un sous-dossier de ce dossier, ça ne marche pas. Quelqu'un a une idée ?

Voici les deux scripts
Celui qui fonctionne

on opening folder the_folder
tell application "Finder"
activate
set My_folder2 to "Volumes:CAROLE:A" as alias
set My_folder to "Volumes:CAROLE" as alias
open the folder My_folder
activate
set the bounds of the first window to {0, 0, 1440, 900}
set current view of the first window to icon view
set sidebar width of the first window to 0
set icon size of icon view options of the first window to 240
set arrangement of icon view options of the first window to snap to grid
set background picture of icon view options of front window to "Volumes:CAROLE:A:Fonds fenêtres:Danse pieds.jpg" as alias
set Myfolder to "Volumes:CAROLE" as alias
set Myfolder to item Myfolder
set f1 to item "ZZZZ.app" of Myfolder
set f2 to item "A" of Myfolder
set wind to container window of Myfolder
tell wind
set position of f1 to {1395, 712}
set position of f2 to {1395, 900}
end tell
set target of window 1 to My_folder2
set target of window 1 to My_folder
activate
end tell
end opening folder

Celui qui ne fonctionne pas

on opening folder the_folder
tell application "Finder"
activate
set My_folder2 to "Volumes:CAROLE:A" as alias
set My_folder to "Volumes:CAROLE:pOUR CAROLE" as alias
open the folder My_folder
activate
set background picture of icon view options of front window to "Volumes:CAROLE:A:Fonds fenêtres:Fond Noir.jpg" as alias
set the bounds of the first window to {0, 0, 1440, 900}
set current view of the first window to icon view
set sidebar width of the first window to 0
set icon size of icon view options of the first window to 128
set arrangement of icon view options of the first window to snap to grid
set arrangement of icon view options of the first window to arranged by name
set Myfolder to "Volumes:CAROLE:pOUR CAROLE" as alias
set Myfolder to item Myfolder
set f1 to item "ZZZZ.app" of Myfolder
set f2 to item "ZZZ.app" of Myfolder
set wind to container window of Myfolder
tell wind
set position of f1 to {1395, 712}
set position of f2 to {30, 820}
end tell
set target of window 1 to My_folder2
set target of window 1 to My_folder
activate
end tell
end opening folder

Merci de prêter une attention à mon problème

---------- Nouveau message ajouté à 12h49 ---------- Le message précédent a été envoyé à 12h46 ----------

Attention, le smiley vert correspond en fait à ": D" sans les guillemets ni l'espace. Cela doit être un raccourci pour le smiley et comme je ne sais pas comment importer mes fenêtres de code autrement que copier-coller…
 
Bonjour,

C'est impossible de changer la position des icônes dans la fenêtre quand vous sélectionnez 'Organiser par "Nom"'