Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Classic Macs and Mac OS > applescript in OS 9 question

applescript in OS 9 question
Thread Tools
Mac Enthusiast
Join Date: Oct 2001
Location: Seattle
Status: Offline
Reply With Quote
Oct 6, 2003, 04:21 PM
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?
Dedicated MacNNer
Join Date: Apr 2002
Location: Chicago
Status: Offline
Reply With Quote
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
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Privacy Policy
All times are GMT -4. The time now is 01:05 PM.
All contents of these forums © 1995-2015 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2015, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2