FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

problem opening Appleworks document

 
   Mac (Home) -> Apple Scripts RSS
Related Topics:
AppleWorks and Spreadsheet problems - I'm having trouble with I've found how to change the default font of a WP document to what's needed, but am stuck on and haven't looked at databases yet. I need to open all the AW version 5 change the..

Applescript version problem - newbie - I'm a newbie with little though I'm not new to in general. I just installed Tiger OS X from a factory Apple DVD. I did just a basic install. I then installed several other programs and seems to be..

Voice Controled Video Capture 2 Microphone Problem - I am trying to use to do a few video capture functions by voice control and I have hit a stumbling block where I don't think that I can have 2 mics open at the same time. I have the voice control part working and I can get BTV Pro to turn on..

- Item Numbers-SUPER MISC (0/1) Need Help on Scripting Pro.. - Tuesday, July 1, 2008 5:32:26 AM Hello! I regularly use Hypercard as the front end while passing commands to Here's my problem: I want to load a Microsoft Word document with data. The real problem is that the Word document is made..

scripting Quicktime to convert images to jpg - Here is a droplet that I am working on to have Quicktime translate still images generated by iMovie into JPG images that can be imported into iPhoto. on open (theList) tell repeat with x in theList if
Next:  Apple Scripts: Folder Actions and child folders  
Author Message
Fergus McMenemie

External


Since: Jun 01, 2008
Posts: 2



(Msg. 1) Posted: Sun Jun 01, 2008 7:43 am
Post subject: problem opening Appleworks document
Archived from groups: alt>comp>lang>applescript (more info?)

Anybody able to tell me where I am going wrong in the following:-


tell application "AppleWorks 6.2.9"
activate
try
set selectedText to selection of front document
set envelope to "TechmorePB:stationary:GPEnvelope10.cwk"

-- gave up with the above and tried a choose!
set envelope to choose file
open document envelope
display dialog "doc opened" buttons {"OK"} default button "OK"
with icon 1
paste
select menu item "Print…" of menu "File"
on error
display dialog "Unable to print envelope." buttons {"OK"} default
button "OK" with icon 0
end try
end tell

I cannot get the document to open at all using applescript. The document
GPEnvelope10.cwk is a plain AW document and opens fine in AW. I am
running under Mac OS X 10.5.2 leopard.
Back to top
Login to vote
Jolly Roger

External


Since: Nov 05, 2007
Posts: 466



(Msg. 2) Posted: Sun Jun 01, 2008 7:43 am
Post subject: Re: problem opening Appleworks document [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <1ihuiga.1r2wb0cuqrx0sN%fergus@twig.me.uk>,
fergus RemoveThis @twig.me.uk (Fergus McMenemie) wrote:

> Anybody able to tell me where I am going wrong in the following:-
>
(snip)
>
> I cannot get the document to open at all using applescript. The document
> GPEnvelope10.cwk is a plain AW document and opens fine in AW. I am
> running under Mac OS X 10.5.2 leopard.

What happens when you run it with the try block disabled (commented
out)?

It's always a good idea to disable try blocks when you are debugging
AppleScripts, because try blocks cause AppleScript not to display error
messages it would otherwise display.

Note that you can write try blocks such that they do display error
messages when errors occur, like so:

try
..
..
..
on error msg number num
display alert "Script Error" message msg & ¬
return & return & ¬
"Error code: " & num ¬
buttons "OK" default button 1 as critical
end try

But, as I said, it's better to disable the try block altogether when you
are debugging script problems.

--
Please send all responses to the relevant news group. E-mail sent to
this address may be devoured by my very hungry SPAM filter. I do not
read posts from Google Groups. Use a real news reader if you want me to
see your posts.

JR
Back to top
Login to vote
Fergus McMenemie

External


Since: Jun 01, 2008
Posts: 2



(Msg. 3) Posted: Sun Jun 01, 2008 11:00 pm
Post subject: Re: problem opening Appleworks document [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jolly Roger <jollyroger RemoveThis @pobox.com> wrote:

> >
> > I cannot get the document to open at all using applescript. The document
> > GPEnvelope10.cwk is a plain AW document and opens fine in AW. I am
> > running under Mac OS X 10.5.2 leopard.
>
> What happens when you run it with the try block disabled (commented
> out)?

Hmm, that did provide a clearer message which allowed me to modify the
script, I am now heading for the next hurdle!

thanks very much
Back to top
Login to vote
Display posts from previous:   
       Mac (Home) -> Apple Scripts All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact