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

SC68Cal

macrumors 68000
Original poster
Feb 23, 2006
1,642
0
Hey everyone, I made a nice little application using Applescript that fulfilled a basic need for my internet browsing. I needed somewhere organized for all my documents that I download from the internet to sit in, instead of being all cluttered on my desktop. When you run the application, it takes all the files and folders in it and moves them to the trash.

Code:
tell application "Finder"
		activate
		if the folder "Temp" of desktop exists then
			open folder "Temp" of desktop
			delete every file of folder "temp"
			delete every folder of folder "temp"
		else
			display dialog "There is no Temporary folder present on your desktop. Press Okay for one to be created for you"
			tell application "Finder"
				make new folder at desktop with properties {name:"Temp"}
			end tell
		end if
	end tell
 

SC68Cal

macrumors 68000
Original poster
Feb 23, 2006
1,642
0
What I thought was interesting, is I originally made an automater workflow to do the same thing. What I noticed is that it's almost 8x as large as the application I created with applescript
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
When I was uusing applescript, I had made an application called Finder Utility which yould batch a dozen file renaming routines, and some good functions in the finder. Check it out in the link and see if you like it... Although for 2 years now I have moved to other languages, I still use it.

Applescript with Applescript studio is much more powerful than one can imagine when starting first time.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.