I am working on an applescript that moves an item into a folder… A simple operation but for some reason I keep getting errors when at the movement. (Currently only one of the buttons is coded as I am trying to bugfix)
set thePath to ((get path to startup disk) & "Users:" & ¬
(do shell script "echo $USER")) as string
set targetjar to thePath & "Library:Application Support:minecraft:bin" as string
display dialog "Pick Jar" buttons {"RegularMods", "Visual", "HaClient"} default button 3
set the button_pressed to the button returned of the result
if the button_pressed is "Regular Mods" then
-- action for 1st button goes here
else if the button_pressed is "Visual" then
-- action for 2nd button goes here
else
display dialog "Pick jar" buttons {"Nodus", "Nyan"} default button 2
if the button returned of the result is "Nodus" then
-- action for 1st button goes here
else
set Nyan to thePath & ":Desktop:minecraft:Mods:Nyan:nyan.jar" as string
tell application "Finder"
duplicate file of Nyan to targetjar
end tell
end if
end if
display dialog targetjar buttons {"OK"} default button 1
display dialog Nyan buttons {"OK"} default button 1