在之前的OS X版本(10.6以前),可以通过Applescript(“Applescript Studio”)中的“调用方法”命令来调用Cocoa方法。例如:
set theURL to "http://www.apple.com"
set URLWithString to (call method "stringByAddingPercentEscapesUsingEncoding:" of theURL with parameter 30)
然而,在“Applescript Editor”(10.6)中的脚本解释器不理解“调用方法”的命令。- 是否有与“Applescript Editor”(10.6)等效的方法?