Liste des Groupes | Revenir à fcsm programmation |
Ni vu ni connu, le 8 février 2022 à 12:31, pehache osa écrire :OK. Mais j'ai comme j'ai besoin du nom de fichier produit je reste avec la commande shell "screencapture"
Juste un petit truc : je n'ai pas trouvé comment faire la capture partell application "System Events" to keystroke "3" using {command down,
une instruction AppleScript native, je lance la commande "screencapture"
par un appel shell script. Ce n'est pas très important, c'est juste par
curiosité de savoir si on peut faire autrement.
>
shift down}
Sinon j’ai trouvé ça comme base :C'est à peu ce que je fais dans mon premier post ;)
set theDate to do shell script "date +%Y_%m_%d_%H%M%S"
set theTempPath to POSIX path of (path to desktop)
set thePath to theTempPath & "screenCapture_" & theDate & ".png"
do shell script "screencapture -R320,210,848,440 -tpng" & space & quoted
form of thePath
Les messages affichés proviennent d'usenet.