Bonjour,
J'essaye en vain d'exporter un calendrier ical(version 4) au format ics en applescript .
Première piste essayée -> save
set aliasfichier to alias "Macintosh HD:Users:Rene:Desktop:Calendrier.ics"
tell application "iCal"
activate
set varcal to (calendars whose title is "Personnel")
save varcal in aliasfichier
end tell
même en créant au préalable un fichier Calendrier.ics vide çà ne marche pas
Seconde voie testée: UI scripting
tell application "iCal" to activate
tell application "System Events"
click menu item "Exporter…" of menu "Fichier" of menu bar 1 of application process "iCal"
keystroke "Calendrier"
delay 2
-- click the button "Exporter"
-- keystroke return
end tell
j'arrive pas à "appuyer" sur le bouton Exporter ou à faire Return
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
reniou
reniou a écrit le 20/02/2010 à 18h53 :
Bonjour, J'essaye en vain d'exporter un calendrier ical(version 4) au format ics en applescript .
Première piste essayée -> save set aliasfichier to alias "Macintosh HD:Users:Rene:Desktop:Calendrier.ics" tell application "iCal" activate set varcal to (calendars whose title is "Personnel") save varcal in aliasfichier end tell même en créant au préalable un fichier Calendrier.ics vide çà ne marche pas
Seconde voie testée: UI scripting tell application "iCal" to activate tell application "System Events" click menu item "Exporter…" of menu "Fichier" of menu bar 1 of application process "iCal" keystroke "Calendrier" delay 2 -- click the button "Exporter" -- keystroke return end tell j'arrive pas à "appuyer" sur le bouton Exporter ou à faire Return
Quelqu'un aurait-Il la solution ? merci d'avance
je me répond ... j'ai trouvé pour la seconde voie : il fallait demander deux fois Exporter... (attention ce ne sont pas trois petits points mais ellipses, un code obtenu avec ALt ; il me semble ) [QUOTE] tell application "iCal" activate set the visible of the window 1 to true tell application "System Events" tell process "iCal" tell menu bar 1 tell menu bar item "Fichier" tell menu "Fichier" tell menu item "Exporter..." tell menu "Exporter..." click menu item "Exporter..." end tell end tell end tell end tell end tell end tell --keystroke "calendrierCourant" keystroke "s" using command down end tell end tell [/QUOTE]si on veux exporter tous les calendriers iCal [QUOTE] tell application "iCal" activate set the visible of the window 1 to true set calendarNames to title of every calendar repeat with theCalendar in calendarNames tell application "System Events" tell process "iCal" tell menu bar 1 tell menu bar item "Fichier" tell menu "Fichier" tell menu item "Exporter..." tell menu "Exporter..." click menu item "Exporter..." end tell end tell end tell end tell end tell end tell
keystroke theCalendar keystroke "s" using command down end tell end repeat end tell [/QUOTE]
les fichiers ics sont créés sur le bureau (pas terrible) On peut toujours les dupliquer après ...
help: Quelqu'un a la solution avec save ????
reniou a écrit le 20/02/2010 à 18h53 :
Bonjour,
J'essaye en vain d'exporter un calendrier ical(version 4) au format ics en
applescript .
Première piste essayée -> save
set aliasfichier to alias "Macintosh
HD:Users:Rene:Desktop:Calendrier.ics"
tell application "iCal"
activate
set varcal to (calendars whose title is "Personnel")
save varcal in aliasfichier
end tell
même en créant au préalable un fichier Calendrier.ics vide
çà ne marche pas
Seconde voie testée: UI scripting
tell application "iCal" to activate
tell application "System Events"
click menu item "Exporter…" of menu "Fichier" of
menu bar 1 of application process "iCal"
keystroke "Calendrier"
delay 2
-- click the button "Exporter"
-- keystroke return
end tell
j'arrive pas à "appuyer" sur le bouton Exporter ou à
faire Return
Quelqu'un aurait-Il la solution ?
merci d'avance
je me répond ...
j'ai trouvé pour la seconde voie : il fallait demander deux fois Exporter...
(attention ce ne sont pas trois petits points mais ellipses, un code obtenu avec ALt ; il me semble )
[QUOTE]
tell application "iCal"
activate
set the visible of the window 1 to true
tell application "System Events"
tell process "iCal"
tell menu bar 1
tell menu bar item "Fichier"
tell menu "Fichier"
tell menu item "Exporter..."
tell menu "Exporter..."
click menu item "Exporter..."
end tell
end tell
end tell
end tell
end tell
end tell
--keystroke "calendrierCourant"
keystroke "s" using command down
end tell
end tell
[/QUOTE]si on veux exporter tous les calendriers iCal
[QUOTE]
tell application "iCal"
activate
set the visible of the window 1 to true
set calendarNames to title of every calendar
repeat with theCalendar in calendarNames
tell application "System Events"
tell process "iCal"
tell menu bar 1
tell menu bar item "Fichier"
tell menu "Fichier"
tell menu item "Exporter..."
tell menu "Exporter..."
click menu item "Exporter..."
end tell
end tell
end tell
end tell
end tell
end tell
keystroke theCalendar
keystroke "s" using command down
end tell
end repeat
end tell
[/QUOTE]
les fichiers ics sont créés sur le bureau (pas terrible)
On peut toujours les dupliquer après ...
Bonjour, J'essaye en vain d'exporter un calendrier ical(version 4) au format ics en applescript .
Première piste essayée -> save set aliasfichier to alias "Macintosh HD:Users:Rene:Desktop:Calendrier.ics" tell application "iCal" activate set varcal to (calendars whose title is "Personnel") save varcal in aliasfichier end tell même en créant au préalable un fichier Calendrier.ics vide çà ne marche pas
Seconde voie testée: UI scripting tell application "iCal" to activate tell application "System Events" click menu item "Exporter…" of menu "Fichier" of menu bar 1 of application process "iCal" keystroke "Calendrier" delay 2 -- click the button "Exporter" -- keystroke return end tell j'arrive pas à "appuyer" sur le bouton Exporter ou à faire Return
Quelqu'un aurait-Il la solution ? merci d'avance
je me répond ... j'ai trouvé pour la seconde voie : il fallait demander deux fois Exporter... (attention ce ne sont pas trois petits points mais ellipses, un code obtenu avec ALt ; il me semble ) [QUOTE] tell application "iCal" activate set the visible of the window 1 to true tell application "System Events" tell process "iCal" tell menu bar 1 tell menu bar item "Fichier" tell menu "Fichier" tell menu item "Exporter..." tell menu "Exporter..." click menu item "Exporter..." end tell end tell end tell end tell end tell end tell --keystroke "calendrierCourant" keystroke "s" using command down end tell end tell [/QUOTE]si on veux exporter tous les calendriers iCal [QUOTE] tell application "iCal" activate set the visible of the window 1 to true set calendarNames to title of every calendar repeat with theCalendar in calendarNames tell application "System Events" tell process "iCal" tell menu bar 1 tell menu bar item "Fichier" tell menu "Fichier" tell menu item "Exporter..." tell menu "Exporter..." click menu item "Exporter..." end tell end tell end tell end tell end tell end tell
keystroke theCalendar keystroke "s" using command down end tell end repeat end tell [/QUOTE]
les fichiers ics sont créés sur le bureau (pas terrible) On peut toujours les dupliquer après ...
help: Quelqu'un a la solution avec save ????
Patrick Stadelmann
In article , reniou wrote:
les fichiers ics sont créés sur le bureau (pas terrible)
Une fois le dialoge d'enregistrement ouvert :
keystroke "g" using {command down, shift down} keystroke "~/Public" -- par exemple keystroke return
permet de changer le dossier.
help: Quelqu'un a la solution avec save ????
Pas possible, iCal ne supporte pas l'export via AppleScript.
Patrick -- Patrick Stadelmann
In article <KcqdnYn9gqaLChjW4p2dnAA@giganews.com>,
reniou <reniou@domain-xyz.in> wrote:
les fichiers ics sont créés sur le bureau (pas terrible)
Une fois le dialoge d'enregistrement ouvert :
keystroke "g" using {command down, shift down}
keystroke "~/Public" -- par exemple
keystroke return
permet de changer le dossier.
help: Quelqu'un a la solution avec save ????
Pas possible, iCal ne supporte pas l'export via AppleScript.
Patrick
--
Patrick Stadelmann <Patrick.Stadelmann@unine.ch>