• 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: TextEdit rtfd problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextEdit rtfd problem


  • Subject: Re: TextEdit rtfd problem
  • From: Brian Christmas <email@hidden>
  • Date: Thu, 24 Sep 2015 12:58:51 +1000

I forgot to add that the actual script is in an ASObjC project, and is embedded in a ‘tell application “TextEdit’ handler, and that I’m running Yosemite.

Removing the ’Tell application “Finder” from my posted script seems to work, but when embedded into the project,  fails with a ‘You don’t have permissions’ error.

.

if my serverBackupState and my attachmentCounter = 0 then
try
tell application "Finder" to set my dailyServerFolder to (my serverFolder & ":" & ("Yearly Email Storage " & my theYear as text) & ":" & (my theAddedMonth) & ":" & (my dailyName) as text)
on error errmsg number errnum
if my runForOz then tell application "System Events" to display dialog "Mail Manager Loop Runner setupPrintCoverPage setting dailyServerFolder folder " & errmsg & " error number " & errnum & " p = " & p
end try
set p to 10
try
do shell script "mkdir -p " & quoted form of POSIX path of (my dailyServerFolder as text)
on error errmsg number errnum
if my runForOz then tell application "System Events" to display dialog "Mail Manager Loop Runner setupPrintCoverPage setting server folder " & errmsg & " error number " & errnum & " p = " & p & return & (my dailyServerFolder as text)
end try
try
do shell script "mkdir -p " & quoted form of POSIX path of ((my dailyServerFolder) & ":" & (my fileDateTimeName) as text)
on error errmsg number errnum
if my runForOz then tell application "System Events" to display dialog "Mail Manager Loop Runner setupPrintCoverPage setting timed server folder " & errmsg & " error number " & errnum & " p = " & p & return & ((my dailyServerFolder) & ":" & (my fileDateTimeName) as text)
end try
try
set temp to ((my fileDateTimeName) & " Cover Sheet" as text)
set tempTwo to a reference to file (my dailyServerFolder & ":" & temp as text)
save document 1 in tempTwo
on error errmsg number errnum
if my runForOz then tell application "System Events" to display dialog "Mail Manager Loop Runner setupPrintCoverPage saving document " & errmsg & " error number " & errnum & " p = " & p & return & ((my dailyServerFolder) & ":" & (my fileDateTimeName) as text)
end try
end if


 G’day scripters

I’ve tried lots of permutations, but cannot work out how to save an rtfd TextEdit document to a remote disk.

I usually get a message the I don’t have permissions, but I’ve set the permissions on both disk and containing folder to all three permissions as ‘read/write’.

My latest effort is…

property dailyServerFolder : "Jobs:Yearly Email Storage 2015:09:2015 09 24:2015-09-24 015737"
property fileDateTimeName : "(20150924 121212Z).rtfd"

tell application "TextEdit"
activate
delay 1
set temp to name of window 1
tell application "Finder"
set tempTwo to a reference to file (my dailyServerFolder & ":" & temp as text)
end tell
save document 1 in tempTwo
end tell


which gives an error of


Finder got an error: Can’t get file "Jobs:Yearly Email Storage 2015:09:2015 09 24:2015-09-24 015737:2015-09-24 003154 Cover Sheet.rtfd”.

Can someone set me straight on how to do this, please. It’s extremely important.

Regards

Santa
 _______________________________________________
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

  • Follow-Ups:
    • Re: TextEdit rtfd problem
      • From: Shane Stanley <email@hidden>
    • Re: TextEdit rtfd problem
      • From: Shane Stanley <email@hidden>
  • Prev by Date: TextEdit rtfd problem
  • Next by Date: Re: TextEdit rtfd problem
  • Previous by thread: TextEdit rtfd problem
  • Next by thread: Re: TextEdit rtfd problem
  • Index(es):
    • Date
    • Thread