Bonjour,
Je n'y connais rien en programmation, pas plus qu'en Applescript, mais sans
doute une bonne âme pourra-t-elle m'aider ?
Voilà, je voudrais faire un script qui me permettrait de savoir que j'ai
reçu un fax. Comme STF pour Mac OS 9, un script se lançait lors de la
réception de celui-ci par le clignotement d'une icône dans la barre de tâche
du Finder... Je m'habitue peu à peu à Mac OS X, mais je n'ai pas retrouvé
cette fonctionnalité dans Page Sender.
Voici le script que propose Page Sender :
-- Received Fax.applescript
-- Page Sender Recevied Fax Script
on received_fax(faxDate, pageCount, sender, faxFile)
tell application "Finder"
display dialog (faxDate as string)
display dialog pageCount
display dialog sender
display dialog faxFile
end tell
end received_fax
Et celui de STF :
(*
Received Faxes Daily Log
Creates a log of received faxes on the Desktop
11/15/99 v1.0
Chad K.
*)
global SendersSM
global ReceiversSM
global CallerIDVoiceNumber
global CallerIDName
global TransSpeed
global numberofPages
global EndTime
global theStartTime
global TransResult
global FullPath
global NewFileName
global TargetLocation
on «event STFCRECD» theCaller
set SendersSM to item 1 of theCaller
set ReceiversSM to item 2 of theCaller
set CallerIDVoiceNumber to item 3 of theCaller
set CallerIDName to item 4 of theCaller
set TransSpeed to item 5 of theCaller
set numberofPages to item 6 of theCaller
set EndTime to item 7 of theCaller
set theStartTime to item 8 of theCaller
set TransResult to item 9 of theCaller
set FullPath to item 10 of theCaller
CreateLog()
end «event STFCRECD»
on CreateLog()
set NewFileName to "Received Faxes " & (month of (current date) as
string) & " " & (day of (current date) as string)
copy NewFileName as string to NewFileName
tell application "Finder"
activate
set TargetLocation to (path to desktop)
set TargetLocationFiles to every item of folder TargetLocation as
string
if file NewFileName of folder TargetLocation exists then
set FileExists to "yes" as string
else
set FileExists to "no" as string
end if
end tell
if FileExists = "yes" then
WriteToLog()
else
tell application "Finder"
activate
set NewFile to make file at folder TargetLocation
set name of NewFile to NewFileName
end tell
WriteToLog()
end if
end CreateLog
on WriteToLog()
tell application "Finder"
activate
try
open for access file NewFileName with write permission
on error ErrMsg number ErrNum
beep 1
with timeout of 28800 seconds
display dialog "An error occured open log for access!" &
return & return & ErrMsg & ErrNum with icon 0
end timeout
end try
-- Get eof, write new on next available line
set TheEnd to (get eof of file NewFileName of folder TargetLocation)
as string
set NewLineWrite to (TheEnd + 1)
try
write
"====================================================================" &
return starting at NewLineWrite to file NewFileName of folder TargetLocation
write "Senders Station Message: " & SendersSM & return to file
NewFileName of folder TargetLocation
write "Caller Id Voice: " & CallerIDVoiceNumber & return to
file NewFileName of folder TargetLocation
write "Caller Id Name: " & CallerIDName & return to file
NewFileName of folder TargetLocation
write "Transmission Speed: " & TransSpeed & return to file
NewFileName of folder TargetLocation
write "Number of Pages: " & numberofPages & return to file
NewFileName of folder TargetLocation
write "Start Time: " & theStartTime & return to file
NewFileName of folder TargetLocation
write "End Time: " & EndTime & return to file NewFileName of
folder TargetLocation
write "Result: " & TransResult & return to file NewFileName of
folder TargetLocation
write "Path to fax received: " & FullPath & return to file
NewFileName of folder TargetLocation
write
"====================================================================" &
return & return to file NewFileName of folder TargetLocation
on error ErrMsg number ErrNum
beep 1
with timeout of 28800 seconds
display dialog "An error occured writing to log!" & return &
return & ErrMsg & ErrNum with icon 0
end timeout
end try
close access file NewFileName of folder TargetLocation
end tell
end WriteToLog
on «event STFCSENT» theCaller
tell application "Finder"
activate
with timeout of 28800 seconds
display dialog "The Received Faxes Daily Log AppleScript is only
for use after sending a fax." buttons {"OK"} default button 1 with icon 0
end timeout
end tell
end «event STFCSENT»
on «event STFCCALD» theCaller
tell application "Finder"
activate
with timeout of 28800 seconds
display dialog "The Received Faxes Daily Log AppleScript is only
for use after receiving a fax. It can not be selected from the Caller ID
FaxBrowser preferences." buttons {"OK"} default button 1 with icon 0
end timeout
end tell
end «event STFCCALD»
Et tjs STF ³Reçu²:
on «event STFCRECD» theCaller
set SendersSM to item 1 of theCaller
set ReceiversSM to item 2 of theCaller
set CallerIDVoiceNumber to item 3 of theCaller
set CallerIDName to item 4 of theCaller
set TransSpeed to item 5 of theCaller
set numberofPages to item 6 of theCaller
set EndTime to item 7 of theCaller
set theStartTime to item 8 of theCaller
set TransResult to item 9 of theCaller
set FullPath to item 10 of theCaller
tell application "Finder"
-- get the fax as a file
set theFaxName to file FullPath
set theFile to theFaxName as alias
end tell
tell application "Navigateur de fax"
-- tell Fax Browser to print it to your fax to your laserprinter
print quiet theFile printer "LaserWriter 8"
end tell
-- after printing the fax, open the fax in
-- Graphic Convertor
tell application "GraphicConverter Classic"
-- open the file in Graphic Convertor
open theFile
end tell
end «event STFCRECD»
Si qq'un à une idée pour faire clignoter une icône, une image peu importe
dans la barre du Finder... Merci d'avance.Klo ) PS : je pense que ³Received
Faxes Daily² Log qui clignote..
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
gerald.coyot
John Doe wrote:
Voilà, je voudrais faire un script qui me permettrait de savoir que j'ai reçu un fax. Comme STF pour Mac OS 9, un script se lançait lors de la réception de celui-ci par le clignotement d'une icône dans la barre de tâche du Finder... Je m'habitue peu à peu à Mac OS X, mais je n'ai pas retrouvé cette fonctionnalité dans Page Sender.
La dernière version de Page Sender affiche un panneau d'alerte à côté de la barre supérieure. -- Amitiés, Gérard Cojot 'Bienheureux les fêlés, ils laisseront passer ma lumière'[M.Audiard] http://perso.wanadoo.fr/gerard.cojot/
John Doe <johndoe@pasdespamchezmoi.com> wrote:
Voilà, je voudrais faire un script qui me permettrait de savoir que j'ai
reçu un fax. Comme STF pour Mac OS 9, un script se lançait lors de la
réception de celui-ci par le clignotement d'une icône dans la barre de tâche
du Finder... Je m'habitue peu à peu à Mac OS X, mais je n'ai pas retrouvé
cette fonctionnalité dans Page Sender.
La dernière version de Page Sender affiche un panneau d'alerte à côté de
la barre supérieure.
--
Amitiés, Gérard Cojot
'Bienheureux les fêlés, ils laisseront passer ma lumière'[M.Audiard]
http://perso.wanadoo.fr/gerard.cojot/
Voilà, je voudrais faire un script qui me permettrait de savoir que j'ai reçu un fax. Comme STF pour Mac OS 9, un script se lançait lors de la réception de celui-ci par le clignotement d'une icône dans la barre de tâche du Finder... Je m'habitue peu à peu à Mac OS X, mais je n'ai pas retrouvé cette fonctionnalité dans Page Sender.
La dernière version de Page Sender affiche un panneau d'alerte à côté de la barre supérieure. -- Amitiés, Gérard Cojot 'Bienheureux les fêlés, ils laisseront passer ma lumière'[M.Audiard] http://perso.wanadoo.fr/gerard.cojot/