Multiline Input
We've made an Applescript that downloads and renames images from our website. It works well, but is limited to one entry at a time. We would like to do multiline input. Ideally the dialog box would give two options (Old Code, New Code) in single window. See attached picture. Or if not possible in Applescript, then two separate dialog boxes is OK.
Here is a list of codes to test:
NMWRAFT-BL
NMWRCNJ-PU
AMBBW
on run {input, parameters}
set path_to_desktop to path to desktop
set posix_path to POSIX path of path_to_desktop as text
display dialog "Type PRODUCT CODE" default answer "" buttons {"OK", "Cancel"} default button 1
if the button returned of the result is "Cancel" then
display dialog "Cancelled"
else
set OLD_code to (text returned of the result)
end if
display dialog "Paste NEW CODE" default answer "" buttons {"OK", "Cancel"} default button 1
if the button returned of the result is "Cancel" then
display dialog "Cancelled"
else
set NEW_code to (text returned of the result)
end if
set weblink to "'http://img.tenniswarehouse-europe.com/new_big/" & OLD_code & "'-[1-7].jpg"
set curl_command to "curl " & weblink & " -o " & posix_path & NEW_code & "-#1.jpg"
do shell script curl_command
return
input
end runnull-OTHER, OS X Yosemite (10.10.5)