Apple Script error -10000
Hi, I'm again now i have an other big problem with my script. everything of it works, until the last line I get error msg -10000
here is my script:
tell application "Finder"
set userd to (user domain) as text
set AppSupportPath to (path toapplication supportfromuser domain) as text
set bin to AppSupportPath & "minecraft:bin"
set frage to display dialog "Wollen Sie die Version von Minecraft wechseln?" buttons {"Ja", "Nein"}
if button returned of frage = "Ja" then
if folder "_back" of folder bin exists then
if file "minecraft.jar" of folder bin exists then
duplicate file "minecraft.jar" of folder bin to folder "_back" of folder bin
end if
else
makenewfolderatbinwith properties {name:"_back"}
end if
if file "minecraft.jar" of folder bin exists then
delete file "minecraft.jar" of folder "bin" of folder "minecraft" of folder AppSupportPath
else if folder "minecraft.jar" of folder bin exists then
delete folder "minecraft.jar" of folder "bin" of folder "minecraft" of folder AppSupportPath
end if
set mcversion to choose from list {"Beta 1.1_02", "Beta 1.4_01", "Beta 1.5_01", "Beta 1.9.6", "Vollversion 1.2.5"}
set lol to result
if lol = "Beta 1.1_02" then set lol to folder "versions:Beta:1.1_02" of userd
if lol = "Beta 1.4_01" then set lol to folder "versions:Beta:1.4_01" of userd
if lol = "Beta 1.5_01" then set lol to folder "versions:Beta:1.5_01" of userd
if lol = "Beta 1.9.6" then set lol to folder "versions:Beta:1.9.6" of userd
if lol = "Vollversion 1.2.5" then set lol to folder "versions:Vollversion:1.2.5"
duplicate file "minecraft.jar" of folder lol to folder bin
end if
end tell
error msg:
tell application "Finder"
path toapplication supportfromuser domain
--> alias "Macintosh HD:Users:manuelfederanko:Library:Application Support:"
display dialog "Wollen Sie die Version von Minecraft wechseln?" buttons {"Ja", "Nein"}
--> {button returned:"Ja"}
exists folder "_back" of folder "Macintosh HD:Users:manuelfederanko:Library:Application Support:minecraft:bin"
--> true
exists file "minecraft.jar" of folder "Macintosh HD:Users:manuelfederanko:Library:Application Support:minecraft:bin"
--> false
exists file "minecraft.jar" of folder "Macintosh HD:Users:manuelfederanko:Library:Application Support:minecraft:bin"
--> false
exists folder "minecraft.jar" of folder "Macintosh HD:Users:manuelfederanko:Library:Application Support:minecraft:bin"
--> true
delete folder "minecraft.jar" of folder "bin" of folder "minecraft" of folder "Macintosh HD:Users:manuelfederanko:Library:Application Support:"
--> folder "minecraft 20.21.46.jar" of item ".Trash" of folder "manuelfederanko" of folder "Users" of startup disk
--> error number 0
choose from list {"Beta 1.1_02", "Beta 1.4_01", "Beta 1.5_01", "Beta 1.9.6", "Vollversion 1.2.5"}
--> {"Beta 1.5_01"}
copy file "minecraft.jar" of folder {"Beta 1.5_01"} to folder "Macintosh HD:Users:manuelfederanko:Library:Application Support:minecraft:bin"
--> error number -10000 from folder {"Beta 1.5_01"}
Ergebnis:
error "„Finder“ hat einen Fehler erhalten: Fehler in der AppleEvent-Routine." number -10000 from folder {"Beta 1.5_01"}
Apple Script-OTHER, Mac OS X (10.7.3)