Originally posted by Glenstorm:
<STRONG>I am trying to get AppleScript to generate a name based on the date. So say I generated this name today my file would be named foo07/11. What is the syntax for doing this? I know it is something like:
save window 1 in file "Max

esktop Folder

TR & (curent date)" as string with creator «class TBB6»
but I can't figure out the combo of parentheses in the path. Thanks.
Dan</STRONG>
Here's an example that will create a new text file with creator type "TBB6" on the desktop... as far as I know, the month still has to be coerced into a number (the result of (month of (current date)) being January...)
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>set month_list to {{a:<font color = red>"<font color = blue>1</font>"</font>, b:January}, {a:<font color = red>"<font color = blue>2</font>"</font>, b:February}, {a:<font color = red>"<font color = blue>3</font>"</font>, b:March}, {a:<font color = red>"<font color = blue>4</font>"</font>, b:April}, {a:<font color = red>"<font color = blue>5</font>"</font>, b:May}, {a:<font color = red>"<font color = blue>6</font>"</font>, b:June}, {a:<font color = red>"<font color = blue>7</font>"</font>, b:July}, {a:<font color = red>"<font color = blue>8</font>"</font>, b:August}, {a:<font color = red>"<font color = blue>10</font>"</font>, b:September}, {a:<font color = red>"<font color = blue>10</font>"</font>, b:October}, {a:<font color = red>"<font color = blue>11</font>"</font>, b:November}, {a:<font color = red>"<font color = blue>12</font>"</font>, b

ecember}}
repeat with a_month in month_list
<font color = green>if</font> month of (current date) is (b of a_month) then
set the_month to (a of a_month)
end <font color = green>if</font>
end repeat
set the_day to (day of (current date))
tell application <font color = red>"Finder"</font>
make file at desktop with properties {name:<font color = red>"foo"</font> & the_month & <font color = red>"/"</font> & the_day, file type:<font color = red>"TEXT"</font>, creator type:<font color = red>"TBB6"</font>}
end tell</font>[/code]
Hope this was what you're looking for...
-acur