Pages

Wednesday, January 9, 2013

Re: AppleScriptObjC app with check marks, asking for files, and moving the files?

So... would this work:

on ChangeFullTrashIconPushed_(sender)

        set FullTrashIcon to (choose file with prompt "Choose a PNG icon to use for your Full Trash icon:" of type {"PNG"} without invisibles)

set theFile to "Macintosh HD:System:Library:CoreServices:Dock.app:Contents:Resources:trashfull.png"

set qpp to quoted form of POSIX path of theFile

do shell script "zip " & qpp & ".zip " & qpp

        tell application "Finder"

            set theDupe2 to duplicate FullTrashIcon

            set the name of theDupe2 to "trashfull.png"

            move theDupe2 to "Macintosh HD:System:Library:CoreServices:Dock.app:Contents:Resources" with replacing

        end tell

        do shell script "killall Dock"

    end ChangeFullTrashIconPushed_

 

then I control-dragged a button to that script, and did a similar thing with buttons "Change Finder Icon" and "Change Empty Trash Icon"  Now I have a didderent problem. When I try to run it, I get this error:

Command /usr/bin/osacompile failed with exit code 1

What does that mean? I sort of messed up with creating a new project of the same thing and not replacing the old one due to a misspelling, so I renamed it in Xcode, and I don't know if that is related, but I also heard in reviews that simulator doesn't work well. How do I fix it? and did I do the first part right?

 

Thanks so much


View the original article here

0 comments:

Post a Comment