MacNN Forums (http://forums.macnn.com/)
-   Classic Macs and Mac OS (http://forums.macnn.com/classic-macs-and-mac-os/)
-   -   applescript in OS 9 question (http://forums.macnn.com/64/classic-macs-and-mac-os/180794/applescript-in-os-9-question/)

 
wil Oct 6, 2003 04:21 PM
applescript in OS 9 question
How do I tell an applescript to use the path of the current front window? (in OS9)

I'm trying to create an applescript that let's me create a new folder in the window I currently have open. when this new folder is created, I'd like the name to be a very specific date format. Any ideas?
 
Speckledstone Nov 3, 2003 07:21 AM
I'm sorry my reply is about a month late, I haven't been checking the Classic Forum lately.

Anyway... Will this work for you?


tell application "Finder"

set window_list to get every window as list
set frontmost_window to item 1 of window_list

set the_date to current date
set _day to day of the_date
set _month to month of the_date
set _year to year of the_date
set folder_name to (_month & " " & _day & ", " & _year) as string

make new folder with properties {name:folder_name} at frontmost_window

end tell
 
All times are GMT -4. The time now is 08:05 AM.

Copyright © 2005-2007 MacNN. All rights reserved.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2015, vBulletin Solutions, Inc.


Content Relevant URLs by vBSEO 3.3.2