很簡單,你基本上讀取文件並將結果放入列表中。然後,你可以在列表中的項目可以直接引用列表號...
set filePath to (path to desktop as text) & "memberID.txt" -- path to the file
set idsText to read file filePath -- get the file text
set idsList to paragraphs of idsText -- turn the text into a list
set nextID to item 2 of idsList
,或者你可以在他們所有的重複循環得到...
set filePath to (path to desktop as text) & "memberID.txt" -- path to the file
set idsText to read file filePath -- get the file text
set idsList to paragraphs of idsText -- turn the text into a list
repeat with i from 1 to count of idsList
display dialog (item i of idsList)
end repeat
所以這是的AppleScript閱讀文件並獲取成員ID?但我也需要使用automator來執行使用獲取的成員id的操作,我該如何將兩者結合起來? – 3zzy 2011-05-14 13:59:42