document.write('<link rel="stylesheet" href="http://gist.github.com/stylesheets/gist/embed.css"/>')





document.write('<div id=\"gist-226109\" class=\"gist\">\n  \n  \n    \n            \n\n      <div class=\"gist-file\">\n        <div class=\"gist-data gist-syntax\">\n          \n          \n          \n            <div class=\"gist-highlight\"><pre><div class=\"line\" id=\"LC1\">(* alternative Finder &quot;New Folder&quot; behaviour *)<\/div><div class=\"line\" id=\"LC2\">tell application &quot;Finder&quot;<\/div><div class=\"line\" id=\"LC3\">	set selectedItems to selection<\/div><div class=\"line\" id=\"LC4\">	set firstItem to (first item in selectedItems)<\/div><div class=\"line\" id=\"LC5\">	(* is the first item selected a folder? *)<\/div><div class=\"line\" id=\"LC6\">	if ((class of firstItem) as text is equal to &quot;Folder&quot;) then<\/div><div class=\"line\" id=\"LC7\">		set theLocation to firstItem<\/div><div class=\"line\" id=\"LC8\">		(* is it a folder on the desktop? *)<\/div><div class=\"line\" id=\"LC9\">		if ((folder of firstItem) as text is equal to desktop as text) then<\/div><div class=\"line\" id=\"LC10\">			(* user cancelled error: we want the default &quot;New Folder&quot; behaviour *)<\/div><div class=\"line\" id=\"LC11\">			error number -128<\/div><div class=\"line\" id=\"LC12\">		end if<\/div><div class=\"line\" id=\"LC13\">	else<\/div><div class=\"line\" id=\"LC14\">		set theLocation to folder of firstItem<\/div><div class=\"line\" id=\"LC15\">	end if<\/div><div class=\"line\" id=\"LC16\">	(* make new folder and select it *)<\/div><div class=\"line\" id=\"LC17\">	set newFolder to make folder at theLocation<\/div><div class=\"line\" id=\"LC18\">	set the selection to newFolder<\/div><div class=\"line\" id=\"LC19\">end tell<\/div><\/pre><\/div>\n          \n        <\/div>\n\n        <div class=\"gist-meta\">\n          <a href=\"http://gist.github.com/raw/226109/5369816c45b2b7be6ca481e26a7e8358ab542e28/AltNewFolderBehaviour.txt\" style=\"float:right;\">view raw<\/a>\n          <a href=\"http://gist.github.com/226109#file_alt_new_folder_behaviour.txt\" style=\"float:right;margin-right:10px;color:#666\">AltNewFolderBehaviour.txt<\/a>\n          <a href=\"http://gist.github.com/226109\">This Gist<\/a> brought to you by <a href=\"http://github.com\">GitHub<\/a>.\n        <\/div>\n      <\/div>\n    \n  \n<\/div>\n')
