Re: AppleWorks again
Re: AppleWorks again
- Subject: Re: AppleWorks again
- From: "Bruce M. Axtens" <email@hidden>
- Date: Fri, 09 Aug 2002 15:43:56 +0500
>
This is a bit raw, since I don't see a way yet back to the current subset
>
of visible records (if working with a found set of records). How to
>
show a group of records by their object specifiers is eluding me.
>
>
This will print the currently selected record.
>
>
tell application "AppleWorks 6"
>
activate
>
tell database of document 1
>
set selectid to id of selection
>
hide every record
>
show record id selectid
>
end tell
>
print document 1
>
end tell
>
>
Corny
And in the process of trying it out I trashed my database! I'm reminded of
the QIC site which has a graphics "Is your data backed up or just not yet
lost". Mine wasn't and is.
By the way, the id of selection was nowhere near as good as getting the
index, that is the record number.
Here's my code, for what it's worth.
on run
local jobName
local selectid
tell application "AppleWorks 6"
activate
tell document "Computer Department JobCard.cwk"
set selectid to index of current record
set value of field "Date Completed" of record selectid \-
to (date string of (current date))
hide every record
show record selectid
print -- with print dialog
set jobName to (value of field "Job Name" of record selectid)
display dialog "Delete " & jobName & "?" \-
buttons {"No", "Yes"} default button 2
if button returned of the result = "Yes" then
tell application "Finder"
try
move alias \-
("
Data:Jobs:" & WorkLib's canonicalFilename(jobName)) \-
to alias "
Data:Jobs:Completed:"
end try
end tell
delete record selectid
end if
show every record
end tell
end tell
end run
Bruce.
--
"If the first eleven chapters of Genesis are not literal history, then the
rest of the Bible is meaningless." -- Ken Ham
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.