Gå till innehåll
Just nu i M3-nätverket

Ta reda på när man skrivit en kalenderhändelse?


E-Tech

Rekommendera Poster

Jag skulle behöva ta reda på när i tiden jag skrivit en kalenderhändelse, är det möjligt? :whistling:

 

Länk till kommentar
Dela på andra webbplatser

property theTime : date "måndag 4 april 2016 11:00:00"
property theCal : "Vad heter kalendern????"
tell application "Calendar"
	set theEvent to first event of calendar theCal whose start date is equal to theTime
	set textOutput to "description " & description of theEvent & return & "start date " & start date of theEvent & return & "end date " & end date of theEvent & return & "allday event " & allday event of theEvent & return & "recurrence " & recurrence of theEvent & return & "sequence " & sequence of theEvent & return & "stamp date " & stamp date of theEvent & return & "excluded dates " & excluded dates of theEvent & return & "status " & status of theEvent & return & "summary " & summary of theEvent & return & "location " & location of theEvent & return & "uid " & uid of theEvent & return & "url " & url of theEvent
	display dialog textOutput
end tell

Ett Applescript. Öppna Skriptredigerare och klistra in. Ändra de två första raderna till rätt värden och kör. Det tar några sekunder.

Länk till kommentar
Dela på andra webbplatser

property theTime : date "måndag 4 april 2016 11:00:00"
tell application "Calendar"
	
	--välj kalender
	set calList to name of every calendar
	set theCal to (choose from list calList with prompt "Välj kalender:") as string
	
	--plocka ut rätt kalenderhändelse
	set theEvent to first event of calendar theCal whose start date is equal to theTime
	
	--omvandla informationen om händelsen till något läsbart som visas
	set textOutput to "description " & description of theEvent & return & "start date " & start date of theEvent & return & "end date " & end date of theEvent & return & "allday event " & allday event of theEvent & return & "recurrence " & recurrence of theEvent & return & "sequence " & sequence of theEvent & return & "stamp date " & stamp date of theEvent & return & "excluded dates " & excluded dates of theEvent & return & "status " & status of theEvent & return & "summary " & summary of theEvent & return & "location " & location of theEvent & return & "uid " & uid of theEvent & return & "url " & url of theEvent
	display dialog textOutput
end tell

Samma skript fast man väljer kalender i GUI istället.

Länk till kommentar
Dela på andra webbplatser

stamp date ger info om när händelsen senast ändrades, något skapande datum hittar jag inte. Men uid ska visst vara en "globally unique identifier" så antagligen innehåller den bland annat information om skapandetid, kodad på något sätt.

Länk till kommentar
Dela på andra webbplatser

Arkiverat

Det här ämnet är nu arkiverat och är stängt för ytterligare svar.



×
×
  • Skapa nytt...