I have a script which add the current time to a plist.
Basically it's help me taking track of my overtime.
That's work fine if I run it once but if I run it more than once the primary
Plist is replaced by the value of the new one.
Can I add all in the same plist instead of overwriting ?
e.g
"Start Time 1 : 06:39"
"Start Time 2 : 21:05"
Where is my current script :
set ShortDate to short date string of (current date)
set myDate to date string of (current date)
set [dayLetter, dayNumber, MonthLetter, yearNumber] to the words of myDate
set t to (time string of (current date))
set [hoursInNumber, minutesInNumber, secondInNumber] to the words of t
set startTimeValue to (current date)
set startTimeClear to dayLetter & " " & dayNumber & " " & MonthLetter & " at " & hoursInNumber & ":" & minutesInNumber
set plistR to {startTime:startTimeValue, startTimeClear:startTimeClear}
tell application "System Events"
set plistf to make new property list file ¬
with properties {name:"~/Desktop/Time/myTime" & dayNumber & "_" & MonthLetter & ".plist"}
set plistf's value to plistR
end tell
Best Answer
I figured out that I need to add " at end with properties" and make the key's name different, in my case I'm adding the time in the key's name