这应该给你指明方向。这是未经测试的(我在手机上),但如果没有打字错误应该可以工作。
property leftEdge1 : "<key>myValueTime</key>"
property rightEdge1 : "<key>serviceToken</key>"
--Getting the file name
set ShortDate to short date string of (current date)
set [dayN, MonthN, YearN] to the words of ShortDate
set myUSDate to YearN & MonthN & dayN as string
set myFileName to "TIME" & myUSDate & ".log"
-- Read file
set p to "/Users/kevin/Library/Logs/MyAPP/" & myFileName
set plistfile_path to POSIX file p
set newFile to (plistfile_path as text)
set theSource to read file newFile as text
-- Save text item delimiter
set saveTID to text item delimiters
-- First get all elements that start with leftEdge1
set text item delimiters to leftEdge1
set allContent to every text item of theSource
set text item delimiters to rightEdge1
set classValues to {}
-- Loop through text items and find content up to rightEdge1
repeat with singleContent in allContent
set end of classValues to ((text item 1 of singleContent) as text)
end repeat
-- Restore text item delimiters
set text item delimiters to saveTID
classValues