更新时间:2023-11-27 20:47:40
code>脚本桥使用safari在safari中打开URL,您会在文件 Safari.h
中找到打开URL的方法。
要了解有关使用脚本桥
的更多信息,请参阅链接,并使用safari的脚本桥并生成 Safari.h
,请在此处参阅我的回答。
Use scripting bridge
with safari to open a URL in safari, You will find a method to open url in the file Safari.h
.
To know more about using Scripting bridge
refer the link and to use scripting bridge with safari and generate Safari.h
, refer my answer here.
打开Safari中的网址是:
The method to open a URL in Safari is:
NSDictionary *theProperties = [NSDictionary dictionaryWithObject:@"https://www.google.co.in/" forKey:@"URL"];
SafariDocument *doc = [[[sfApp classForScriptingClass:@"document"] alloc] initWithProperties:theProperties];
[[sfApp documents] addObject:doc];
[doc release];