[<] Sujet : [AS] Browser CAMINO : petit script de nettoyage des caches
De : Jacques PIOTROWSKI <anonyme@...>
Date : 2010-04-08 19:16:35
Sujet : Re: [AS] Browser CAMINO : petit script de nettoyage des caches
De : Gerard Gauld <anonyme@...>
Date : 2010-04-09 10:23:19
Bonjour. Le 8 avr. 10 à 19:16, Jacques PIOTROWSKI a écrit : > -- > set AppleScript's text item delimiters to ":" > set username to the second word of (characters (offset of "Users" > in path to ¬ > preferences as string) through (length of (path to preferences as > string)) of ¬ > (path to preferences as string) as string) > set username2 to "" as string > repeat with x in username > if x as text is not ":" then > set username2 to username2 & x > end if > end repeat > set AppleScript's text item delimiters to "" > Chez moi, ça renvoie un 's'. C'est point mon nom ! Une possibilité : La 'StandardAdditions' a une commande : 'system info' qui renvoie un record de pas mal de choses. => set username2 to short user name of (system info) De plus, il n'y a peut-être pas besoin de rechercher le nom de l'utilisateur : Pour récupérer le chemin de la Library Folder de l'utilisateur, il y a (toujours dans les StandardAdditions): path to library folder from user domain ou pour l' Application Support : path to application support from user domain Par exemple, ça peut raccourcir la commande en : delete every file of folder (((path to library folder from user domain) as string) & "Caches:Camino:Cache") (mais, c'est comme tu préfères) A+ GG _______________________________________________ Applescript_fr mailing list anonyme@... http://listes.patpro.net/mailman/listinfo/applescript_fr
Sujet : Re: [AS] Browser CAMINO : petit script de nettoyage des caches
De : Yves PETRONIN <anonyme@...>
Date : 2010-04-09 18:19:16