Re: Golf List Picker...
Re: Golf List Picker...
- Subject: Re: Golf List Picker...
- From: Takaaki Naganoya <email@hidden>
- Date: Wed, 14 Mar 2018 14:18:30 +0900
Hi, I wrote a simple ABPeoplePicker AppleScript.
It is a 150 lines of script. It is too complicated to recommend to newbie
scripter.
So, I advise you to use more easier way.
(1)other easy selection way
<AppleScript>
tell application "Contacts"
set thePeople to name of every person
end tell
set aPerson to choose from list thePeople
</AppleScript>
(2)Supply Person Data via vCard file
You can export person data to vCard file. And you can choose these files by
using simple choose file command.
--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/
> 2018/03/05 9:28、Michael S. Green <email@hidden>のメール:
>
> 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
_______________________________________________
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