AppleWorks scripting - database question
AppleWorks scripting - database question
- Subject: AppleWorks scripting - database question
- From: "Bruce M. Axtens" <email@hidden>
- Date: Sat, 27 Jul 2002 22:47:31 +0500
Dear List
In the following code I am trying to make the selected record appear on my
screen but using "select" only selects it, it doesn't move the record into
view. How do I move the record into view? (If you have any suggestions on
how to improve the script as a whole, that would also be much appreciated!)
Bruce.
on run
local lim
local i
local jobList
local jobName
local jumpLoc
set jobList to {}
tell application "AppleWorks 6"
tell document "JobCard.cwk"
set lim to number of records
repeat with i from 1 to lim
tell record i
set jobName to value of field "Job Name"
set jobName to jobName as string
set end of jobList to jobName
end tell
end repeat
choose from list jobList with prompt "Select Job Card" \-
OK button name "Select" \-
without multiple selections allowed \-
and empty selection allowed
set jumpLoc to first item of the result
repeat with i from 1 to lim
tell record i
if value of field "Job Name" = jumpLoc then
select record i
exit repeat
end if
end tell
end repeat
end tell
end tell
end run
_______________________________________________
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.