• 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: AppleScript-Users Digest, Vol 10, Issue 387
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-Users Digest, Vol 10, Issue 387


  • Subject: Re: AppleScript-Users Digest, Vol 10, Issue 387
  • From: Barry Fass-Holmes <email@hidden>
  • Date: Mon, 04 Nov 2013 16:07:14 +0000
  • Date: Mon, 04 Nov 2013 08:07:12 -0800

I can print a PDF from Pages to the Desktop successfully. Likewise export a PDF to the Desktop.

That would be consistent with Alex’s message below (permissions issue).

I changed the following line in my script

set docPathAndName to (path to desktop as string) & docName

to

set docPathAndName to (path to docs as string) & docName

and the script did not execute.

How do I change it to test whether the script can save to the user Documents folder?

Thanks in advance!

Barry F-H

From: Alex Zavatone <email@hidden>
Subject: Re: AppleScript-Users Digest, Vol 10, Issue 387
Date: November 4, 2013 at 7:38:19 AM PST
Date: November 4, 2013 at 7:38:17 AM PST
To: Barry Fass-Holmes <email@hidden>
Cc: email@hidden

If you can do that, then this seems like a sandboxing permissions issue since you can't save to the desktop.

Can you save the file into the documents folder?


On Nov 4, 2013, at 7:52 AM, koenig.yvan <email@hidden> wrote:

Le 04/11/2013 à 16:36, Barry Fass-Holmes <email@hidden> a écrit :

Yes.

Barry F-H

On Nov 4, 2013, at 7:26 AM, email@hidden wrote:

Message: 1
Date: Mon, 04 Nov 2013 08:28:00 -0500
From: Alex Zavatone <email@hidden>

Can you print to PDF?


From: Barry Fass-Holmes <email@hidden>
Subject: Pages 4.3 and Mavericks - Can't export as PDF
Date: November 3, 2013 at 3:41:25 PM PST
To: email@hidden

The script below likewise does not function properly in Pages 09 under Mavericks. It displays a progress bar that gets “stuck.” My similar AppleScript script for export to .doc functions properly.

tell application "Pages"
set docName to name of front document
-- Remove .pages extension.
set prevTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to ".pages"
-- Add .pdf extension.
set docName to first text item of docName & ".pdf"
set AppleScript's text item delimiters to prevTIDs
-- Save file to Desktop.
set docPathAndName to (path to desktop as string) & docName
save front document as "SLDocumentTypePDF" in docPathAndName
set userInput to display dialog "Do you want to close this document?" buttons {"No", "Yes"} default button 1
if the button returned of userInput is "Yes" then
close front document
else
tell application "Pages"
activate
end tell
end if
end tell

Barry F-H

If I understand well, Yes at top means that you may export the Pages document in a PDF file.

Here your script doesn't do the job and fails as you wrote in your first post (passed in size 18).

Yvan KOENIG (VALLAURIS, France) lundi 4 novembre 2013 16:52:11




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: AppleScript-Users Digest, Vol 10, Issue 387 (From: Barry Fass-Holmes <email@hidden>)

  • Prev by Date: Re: Re(2): Pages 4.3 and Mavericks - Can't export as PDF
  • Next by Date: Re: Pages 4.3 and Mavericks - Can't export as PDF
  • Previous by thread: Re: AppleScript-Users Digest, Vol 10, Issue 387
  • Next by thread: Hide Safari Toolbar in Full Screen mode
  • Index(es):
    • Date
    • Thread