Je voudrais faire afficher une image par Preview a partir d'un Apple
Script.
je fais:
osascript -e 'tell application
"Preview.app" to open "/Users/said/Pictures/motiv.jpeg"'
(le tout sur la meme ligne)
mais ca ne marche pas. Si preview n'est pas deja lancee, elle se lance mais
sans rien afficher. Sinon, ca ne fait strictement rien. Comme si open
voulait simplement dire "lance-toi".
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Patrick Stadelmann
In article , Saïd wrote:
Je voudrais faire afficher une image par Preview a partir d'un Apple Script.
je fais: osascript -e 'tell application "Preview.app" to open "/Users/said/Pictures/motiv.jpeg"'
(le tout sur la meme ligne)
mais ca ne marche pas. Si preview n'est pas deja lancee, elle se lance mais sans rien afficher. Sinon, ca ne fait strictement rien. Comme si open voulait simplement dire "lance-toi".
Le paramètre de "open" doit être un type "file", "alias" ou un chemin de type "HFS", mais pas POSIX. Pour convertir, il faut mettre "POSIX file" devant le chemin :
... to open (POSIX file "..../.../.../motiv.jpeg")
Patrick -- Patrick Stadelmann
In article <slrnca1m76.kp3.said@brian.lan>, Saïd <said@brian.lan>
wrote:
Je voudrais faire afficher une image par Preview a partir d'un Apple
Script.
je fais:
osascript -e 'tell application
"Preview.app" to open "/Users/said/Pictures/motiv.jpeg"'
(le tout sur la meme ligne)
mais ca ne marche pas. Si preview n'est pas deja lancee, elle se lance mais
sans rien afficher. Sinon, ca ne fait strictement rien. Comme si open
voulait simplement dire "lance-toi".
Le paramètre de "open" doit être un type "file", "alias" ou un chemin de
type "HFS", mais pas POSIX. Pour convertir, il faut mettre "POSIX file"
devant le chemin :
... to open (POSIX file "..../.../.../motiv.jpeg")
Patrick
--
Patrick Stadelmann <Patrick.Stadelmann@unine.ch>
Je voudrais faire afficher une image par Preview a partir d'un Apple Script.
je fais: osascript -e 'tell application "Preview.app" to open "/Users/said/Pictures/motiv.jpeg"'
(le tout sur la meme ligne)
mais ca ne marche pas. Si preview n'est pas deja lancee, elle se lance mais sans rien afficher. Sinon, ca ne fait strictement rien. Comme si open voulait simplement dire "lance-toi".
Le paramètre de "open" doit être un type "file", "alias" ou un chemin de type "HFS", mais pas POSIX. Pour convertir, il faut mettre "POSIX file" devant le chemin :
... to open (POSIX file "..../.../.../motiv.jpeg")
Patrick -- Patrick Stadelmann
Saïd
Patrick Stadelmann :
In article , Saïd wrote:
Je voudrais faire afficher une image par Preview a partir d'un Apple Script.
je fais: osascript -e 'tell application "Preview.app" to open "/Users/said/Pictures/motiv.jpeg"'
... to open (POSIX file "..../.../.../motiv.jpeg")
Merci.
-- Saïd.
Patrick Stadelmann :
In article <slrnca1m76.kp3.said@brian.lan>, Saïd <said@brian.lan>
wrote:
Je voudrais faire afficher une image par Preview a partir d'un Apple
Script.
je fais:
osascript -e 'tell application
"Preview.app" to open "/Users/said/Pictures/motiv.jpeg"'
... to open (POSIX file "..../.../.../motiv.jpeg")