Golf List Picker...
Golf List Picker...
- Subject: Golf List Picker...
- From: "Michael S. Green" <email@hidden>
- Date: Sun, 04 Mar 2018 18:28:17 -0600
I’m new to apple scripting. I found enough info to create something useful, but
I want to take it to the next level.
Listed below is my code for a calendar event creation with a drop down list.
I keep track of where I play golf.
The next 2 enhancements I want to make are to add a people picker so I can keep
track of who I played with and have that data show up in the display dialog.
The 2nd enhancement is to add the cost of the round with those results include
in the display.
I need a nudge in the right direction to help me with these enhancements as I
have been unsuccessful in making this work.
I have an app that exports the calendar data into excel, I then refresh my
pivot table with the new data and it makes a nice summary.
Thanks in advance,
Mike
set calendarName to "Golf"
set theSummarylist to (choose from list {"Course 1 ", "Course 2 ", "Course 3"})
if theSummarylist is false then display dialog "Select Golf Course From List"
with icon stop buttons {"Exit"} default button {"Exit"}
end
set startDate to " February 28, 2018 11:00:00 AM "
set endDate to startDate
set alarm to -30
set startDate to date startDate
set endDate to (date endDate) + 16200
set eventnotes to "Test A " & " Test B"
display dialog "New Golf Date Added to Golf Calendar: " & theSummarylist &
startDate
tell application "Calendar"
tell (first calendar whose name is calendarName)
make new event at end of events with properties
{summary:theSummarylist, start date:startDate, end date:endDate}
end tell
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden