• 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: Shane Stanley <email@hidden>
  • Date: Thu, 24 Sep 2015 14:21:58 +1000

On 24 Sep 2015, at 2:05 PM, Brian Christmas <email@hidden> wrote:

I’m trying playing around with the terminology I posted, I suspect I haven’t got it right, and it is an Xcode project.

I'm not sure why you're trying to complicate things. If I run this:

property dailyServerFolder : "General:From TC"

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

It works fine. That's the bog-standard AppleScript way to save a file.

If I put it in an Xcode project:

script AppDelegate
property parent : class "NSObject"
property dailyServerFolder : "General:From TC"


on applicationWillFinishLaunching:aNotification
tell application "TextEdit"
activate
delay 1
set temp to name of window 1
save document 1 in file (my dailyServerFolder & ":" & temp)
end tell
end applicationWillFinishLaunching:


on applicationShouldTerminate:sender
-- Insert code here to do any housekeeping before your application quits 
return current application's NSTerminateNow
end applicationShouldTerminate:


end script

It still works fine.

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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: TextEdit rtfd problem (From: Brian Christmas <email@hidden>)
 >Re: TextEdit rtfd problem (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: due dates, reminders, & AppleScript
  • Next by Date: Re: due dates, reminders, & AppleScript
  • Previous by thread: Re: TextEdit rtfd problem
  • Next by thread: Re: TextEdit rtfd problem
  • Index(es):
    • Date
    • Thread