0
我剛開始使用蘋果腳本,我想製作一個提示用戶輸入URL的應用程序。在此之後,應用程序會在Safari的新選項卡中打開給定的URL。這是我的,但它不工作。想要在Safari的新選項卡中打開用戶生成的URL
tell me
activate
set s to display dialog "Which website do you want to open?" default answer "https://www."
end tell
tell application "System Events"
tell application "Safari" to activate
tell process "Safari"
click menu item "New Tab" of menu "File" of menu bar 1
end tell
end tell
tell application "Safari"
set URL of document 1 to "text returned of s"
end tell