Re: Scripting makes AppleWorks 6 crash
Re: Scripting makes AppleWorks 6 crash
- Subject: Re: Scripting makes AppleWorks 6 crash
- From: Mark Butcher <email@hidden>
- Date: Thu, 26 Dec 2002 05:51:40 -0800
Doug
I can't help you, but have you looked at T&B's web-site? They have a
bunch of stuff on scripting AW, and something there may be useful to
you.
http://www.tandb.com.au/appleworks/
Happy Christmas!
MarkB
On Tuesday, Dec 24, 2002, at 13:07 US/Pacific, Doug McNutt wrote:
I'm not a regular AppleWorks user, but I suggested that a recent
demonstration of Chritstmas card printing from AppleWorks ought to be
scripted. Now I have to produce. In a landscape mode I want to paste
two pictures into carefully calculated locations and then insert a few
text items to simulate what has been done by hand.
The script below is where I stand. The commented lines work OK except
for some redrawing delays of infinite duration. But I'm in the process
of debugging the ones below which very likely contain errors due to
guessing on my part. AppleWorks has a blank drawing document open in
landscape mode.
AppleWorks CRASHES. It doesn't complain about something I'm doing
wrong. It simply crashes.
Now one friend of mine says that if you can cause a kernel panic by
something you do in a shell script the fault is NEVER yours. It's a
failure in the kernel. Is this a similar failure in AppleWorks?
Is AppleWorks recordable? I tried recording and got a few menu-related
items in the SE window but I'm beginning to think that's associated
with new features of 10.2.3 rather than AppleWorks.
** begin snapshot of script under development ***
property librariesPath : "Macintosh HD:Applications:AppleWorks
6:AppleWorks Essentials:Scripts Support:Libraries:"
-- This line appears in the sample code. I claim no understanding. I
also don't have a "Macintosh HD". Commenting the whole line out makes
no difference. The sample script runs with the line present. I assume
(bad thing to do) it's ignored.
tell application "AppleWorks 6"
set leftx to 36
set lefty to 5 * 72 + leftx
set topx to 288
set rightx to 4 * 72 + leftx
set righty to 4 * 72 + lefty
set bottomx to 3.5 * 72 + topx
--set LPicture to choose file with prompt "left side" -- Standard
additions
--insert LPicture
--set definition rectangle of selection to {leftx, topx, rightx,
bottomx}
--set RPicture to choose file with prompt "right side" -- Standard
additions
--insert RPicture
--set definition rectangle of selection to {lefty, topx, righty,
bottomx}
set Greeting to "From your SMMUG friends" as string
-- make new text frame -- This doesn't work
make new text frame at front in drawing layer of front document --
this works
set text body of selection to Greeting
-- AppleWorks 6.2.4 reliably crashes under system 10.2.3, SE 1.9
-- Something about a "Connection is invalid". Everything is on this
G4 right now. I'm not making any "connections" on purpose but things
are networked.
end tell
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
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.
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.
_______________________________________________
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.