的Mac OS的應用程序我是新來了Xcode作爲以及我對AppleScript的基於AppleScript的
所有我需要的是在Xcode應用程序運行AppleScript。這可能嗎 ?
Bassically,下載應用軟件從Excel中的一個URL列表圖片和重命名這些文件acording在Excel
名單提前謝謝! 來自德國的問候!
這裏是AppleScript的代碼:
tell application "Microsoft Excel"
set filenames to value of every cell of range "K3:K200" of sheet "Image_Moves" of document 1
set URLs to value of every cell of range "L3:L200" of sheet "Image_Moves" of document 1
end tell
repeat with i from 1 to count URLs
if (item i of filenames is not missing value) and (item i of URLs is not missing value) then
set thisFname to quoted form of (POSIX path of ({path to desktop, "Image_Moves:"} as text) & item i of filenames)
set thisUrl to quoted form of item i of URLs
set status to (do shell script "curl -s -o " & thisFname & space & thisUrl)
end if
end repeat
try
tell application "Finder"
delete (every item of folder ("Image_Moves") whose name begins with "0")
end tell
on error
display dialog ("Error. Couldn't Move the File") buttons {"OK"}
end try
不清楚你的問題是什麼。它與Xcode有什麼關係?什麼是Xcode應用程序? – Eiko
Eiko,我有一個Applescript的版本,我想把它變成一個Mac OS的應用程序。它與Xcode有什麼關係?好吧,從我所知道的,你可以用X-Code來做到這一點,對吧? – AnotherUser31