• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: question about behaviour of Appleworks save.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about behaviour of Appleworks save.


  • Subject: Re: question about behaviour of Appleworks save.
  • From: yvan-koenig <email@hidden>
  • Date: Tue, 15 Feb 2005 14:11:32 +0100


Le 14 févr. 2005 , à 22:44, Andrew Hurst a écrit :

Hi,

(Power PC G4  OS X 10.3.8)

The following script to save an AppleWorks 6 file results in additional characters at the front and back of the file that don't appear in a manual save. The file being opened is an AppleWorks file previously saved as HTML, in which I need to change a URL link, then re-save. It opens, converting to text as an untitled document. Then I tinker and try to save it back replacing the original HTML file. Besides the crappy tinkering script, what am I doing wrong with the save part?

Thanks,
Andy Hurst
email@hidden

================================================
tell application "AppleWorks 6"
select characters 31 thru 36 of paragraph 11 of the front document
set closingtext to the selection
cut the selection
select characters 13 thru 30 of paragraph 11 of the front document
cut the selection
set standard_logo_spec to standard_logo_spec & closingtext
set characters 13 thru 80 of paragraph 11 of the front document to standard_logo_spec
save the front document in html_file_spec as file type text with replacing
close the front document saving no
end tell
=================================================


It may help to use this syntax:

set html_file_spec to "Macintosh HD:Users:yvankoenig:Documents:bzz"
set standard_logo_spec to "Yk yk YK yk"
tell application "AppleWorks 6"
activate

select characters 31 thru 36 of paragraph 11 of the front document
set closingtext to the selection
cut the selection
select characters 13 thru 30 of paragraph 11 of the front document
cut the selection
set standard_logo_spec to standard_logo_spec & closingtext
set characters 13 thru 80 of paragraph 11 of the front document to standard_logo_spec
set traducteur to my estCeAWfrancais()
save the front document in file html_file_spec as file type "TEXT" using translator traducteur with replacing
close the front document saving no
end tell


on estCeAWfrancais()
	tell application "AppleWorks 6"
		activate
		if (version as text) starts with "FU1-" then
			set tr to "Texte"
		else
			set tr to "Text"
		end if
	end tell -- Appleworks
	return tr
end estCeAWfrancais

CAUTION, the translator name is not the same for every localised version.

Yvan KOENIG


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: question about behaviour of Appleworks save.
      • From: yvan-koenig <email@hidden>
References: 
 >question about behaviour of Appleworks save. (From: Andrew Hurst <email@hidden>)

  • Prev by Date: Re: Setting icon
  • Next by Date: Multiple Clipboards?
  • Previous by thread: question about behaviour of Appleworks save.
  • Next by thread: Re: question about behaviour of Appleworks save.
  • Index(es):
    • Date
    • Thread