Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

AppleScript faire un alias d'un fichier

3 réponses
Avatar
pere.noel
j'ai différents fichiers de settings de MacSOUP et je voudrais dépose
dans un répertoire cache des aliases de ces fichiers, comment fait-on en
AppleScript ???
--
une bévue

3 réponses

Avatar
pere.noel
Une bévue wrote:

j'ai différents fichiers de settings de MacSOUP et je voudrais dépose
dans un répertoire cache des aliases de ces fichiers, comment fait-on en
AppleScript ???


Solution de Benoit Leraillez :

<1hgriij.1hkj1f64nsbrcN%
--
une bévue

Avatar
Olivier
Le 11/06/06 10:22, dans
1hgrjfw.19pmv5bddbxy3N%, « Une bévue »
a écrit :

Solution de Benoit Leraillez :

<1hgriij.1hkj1f64nsbrcN%



Comment faire pour accéder au lien ?
Celui-ci ouvre une fenêtre vierge dans mon courrieleur...
--
Olivier

Avatar
pere.noel
Olivier wrote:


Comment faire pour accéder au lien ?
Celui-ci ouvre une fenêtre vierge dans mon courrieleur...


je ne connais pas trop les url "nntp" enfin qui référencent un post que
voici :

Une bévue wrote:

et générer un alias je le fais en applescript ou en command line, je
suppose plutot en as...

mais comment ?


Tu ne le fais pas, c'est déjà fait. Extrait d'AppleScript Language
Guide (.pdf, j'vais pas tout resaisir ;-)

If you use a reference of the form alias nameString, AppleScript creates
an alias for the file-that is, a representation of the file, much like
an alias icon on the desktop, that identifies the file no matter where
it is located. AppleScript attempts to locate the file whenever you
compile the script-that is, whenever you modify the script and then
attempt to check its syntax, save it, or run it.
AppleScript treats an alias like a value that can be stored in a
variable and passed around within a script. You don't need to use the A
Reference To operator. For example, this script first saves an alias in
the variable fileRef, then uses the variable in a Tell statement that
opens the file.
set fileRef to alias "Hard Disk:June Sales"
tell application "AppleWorks"
open fileRef
end
-> If you save this script as a script application or compiled script,
-> rename the file "June Sales" or move it to another location, then run
-> the script again, the script still works correctly and opens the
-> original file. You can coerce a filename string to an alias. For
example, you can replace the first line of the previous script with the
following line:
set fileRef to ("Hard Disk:June Sales" as alias)
However, you cannot perform a similar coercion with the file form, as
described in "Specifying a File by Reference" (page 192).

Je te laisse essayé, on est dimanche, il est 10 AM et j'entends le
cri de la sieste ;-)

--
Les gens sans humour manquent de sérieux.



un exemple d'applescript réalisant un alias :

tell application "Finder"
make alias file to (file "apache2_httpd.conf.txt" in folder
"Desktop" in home) at "HDX:Users:yvon:Library:Application
Support:MacSOUPSwitcher:cache" with properties {name:"essai.mss"}
end tell

--
une bévue