0

.txt 形式 (1 行に 1 つのメンバー ID) で数百のメンバーのリストがあり、Automator を使用してそれらを Web アプリに追加する必要があります。

したがって、txtは次のようなものです。

30335842
30335843
30335844
...

これを Web ページに挿入する必要がありますが、automator を使用してアクションを作成できるため、簡単な部分だと思います。

自動化ワークフローで使用するたびにテキスト ファイルから新しい ID を取得する方法がわかりません。

助けてくれて本当にありがとうございます。

4

1 に答える 1

0

簡単です。基本的にはファイルを読み取り、結果をリストに入れます。次に、リスト番号を直接参照して、リスト内のアイテムを取得できます...

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
于 2011-05-14T06:41:41.563 に答える