PDA

View Full Version : I need an Appleworks "insert date/time" script....


str1
04-13-2002, 02:21 AM
Hi all.

Since Apple killed off the Appleworks macros in favor of Applescript, I've been lost without my insert date/time macro. All I want is a script that will insert the date, a carriage return, the time, and then bold all of that text.

Can someone either take pity on me and point me to a script that will do this or point me to an applescript book/web site somewhere?

Thanks in advance!

Cheers
Scott

xchanyazy
04-30-2002, 12:45 AM
do shell script "date | awk '{ print $1, $2, $3, $6, RS, $4, $5 }'"
set theDate to the result
tell application "AppleWorks 6"
set the selection to theDate
end tell


Hope this is close to what you are looking for.

One note, it uses \n as a newline instead of \r. This isn't a problem for most (well-designed) apps, but it gives MS products the fits.