• 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
save story in Quark6 seems flaky
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

save story in Quark6 seems flaky


  • Subject: save story in Quark6 seems flaky
  • From: Scott Lawton <email@hidden>
  • Date: Wed, 9 Mar 2005 15:25:52 -0500

Any idea why save story might fail sometimes?  Is there a better way to get the same text that's exported using File > Save Text?  (As noted in the comments, "get text" gets something different.)

In the following, I know that outputFolder exists; I use it earlier in the script.

The error msg: "QuarkXPress got an error: Disk some object wasn't found."  The problem happens on someone else's machine (OS X; not sure which version).  Any suggestions for additional debugging code I could add to pinpoint what's going on?

	tell application "QuarkXPress"
		set target_file to (outputFolder & my getBaseName(name of document 1) & ".txt")
			-- snip figuring out which story to save
			-- it sets longestID

			-- saving the story directly appears to mimic the
			-- File > Save Text menu item; that's what we want
			-- in contrast, "get text" includes control chars with
			-- uncertain mapping (convert to whitespace vs. delete)
			-- note that target_file must be a string not alias
			save story longestID in target_file
		end tell
	end tell


on getBaseName(inString)
	-- drop 3 or 4 char extension
	if (character -5 of inString is equal to ".") then
		return text from character 1 to -6 of inString
	else if (character -4 of inString is equal to ".") then
		return text from character 1 to -5 of inString
	else
		return inString
	end if
end getBaseName
 _______________________________________________
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: save story in Quark6 seems flaky
      • From: "Shane Stanley" <email@hidden>
  • Prev by Date: About keychain scripting
  • Next by Date: Select Similar in PhotoShop
  • Previous by thread: Re: About keychain scripting
  • Next by thread: Re: save story in Quark6 seems flaky
  • Index(es):
    • Date
    • Thread