Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

apenaroks

macrumors member
Original poster
I want to make a script but im not sure how to start. Here is what I want it to do. I want it to display a dialog box asking where I want to go. I want it to have three buttons. Cancel, Home and Applications

Cancel will close it,
Home will take me to my home folder

and applications takes me to my applications.

I know I can do this in finder quickly, but im going to replace home and applications with other folders that have long directories. I dont want to make aliases.

If any one can please build me a script to do this. Ive been trying all day and always get some error.



Someone told me to use:

display dialog "where do you want to go?" buttons {"Cancel", "Home", "Applications"} default button "Applications"

set answer to button returned of result

tell application "Finder"

if answer is "Home" then
make new Finder window
set target of window 1 to home
else
if answer is "Applications" then
make new Finder window
set target of window 1 to folder "Applications" of startup disk
end if
end if

end tell

which sort of worked, when i tried to replace home with the directory, it gave me an error. please tell me how to replace home and applications with directories (Like ~/Music/iTunes/iTunes Music/)!!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.