Excel スプレッドシートのセル番号 B2 からデータを読み取り、var1 を B2 の値に設定する Apple スクリプトを作成しようとしていますが、システムの時刻が値と一致することをセル A2 で確認したいA2 の値を取得し、その場合は B2 の値を取得して変数として設定します。
A3とB3からデータを収集するのは初めてで、2回目です
set SystemTime to (current date)
set current_row to 2 #Set starting row
repeat
tell application "Microsoft Excel"
set a_cell to (get value of cell (("A" & current_row) as string)) #Get A cell val
if a_cell = SystemTime then #If times match up
set b_cell to (value of cell (("B" & current_row) as string)) #Get B cell val
display dialog b_cell #Display that val
current_row = current_row + 1 #Increment the row we're looking at
end if
end tell
end repeat