PDA

View Full Version : Behold, for I have made Applescript!




SC68Cal
Mar 30, 2006, 09:18 PM
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.

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
Mar 30, 2006, 09:19 PM
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
Mar 31, 2006, 02:03 AM
When I was uusing applescript, I had made an application called Finder Utility (http://users.forthnet.gr/ath/jonmecos/Mainsite/Development/Applescript/filez/Futil.zip) 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.