2015-07-10 61 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