2015-07-10 64 views
0

我試圖讓一個腳本來搜索一個號碼的文檔的範圍內的電子郵件地址,然後告訴我,電子郵件是在什麼單元的名稱。的AppleScript獲得細胞

tell application "Numbers" to tell document 1 to tell sheet 1 to tell table 1 
    set theEmail to "[email protected]" 
    set theRange to range "a:a" 
    set theCell to the name of cell is equal to theRange 
return theCell 
end tell 

回答

1

試試這個

tell application "Numbers" 
    tell document 1 to tell sheet 1 to tell table 1 
     set theEmail to "[email protected]" 
     set theRange to range "a:a" 
     try 
      return name of 1st cell of theRange whose value is theEmail 
     on error 
      return missing value 
     end try 
    end tell 
end tell 
+0

非常感謝現在的挫折。歡迎您來到 – LearningTheRopes

+0

,那麼您可以接受答案 – vadian