| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
JBS, thanks for your input - I now have it working! I did have on error handling already within the try/end try block, but separating out getting the text from the thePodcast object, which uses XML suite (which is why it was in the System Events tell block), from the actual writing of the file did the trick. The working script now looks like: <script> set xmlFile to "/Path/To/XMLFILE/file1.xml" tell application "System Events" set thePodcast to (contents of XML file xmlFile) end tell set posixPath to "/Path/To/XMLFILE/file2.xml" set file_pointer to POSIX file posixPath try set the open_file to open for access file_pointer with write permission set eof of the open_file to 0 tell application "System Events" set podcastText to text of thePodcast end tell write podcastText to open_file starting at eof close access open_file on error error_message number error_number close access open_file display dialog "An error was encountered writing the file to: " & open_file & ". Error: " & error_message end try </script> Thanks! Will |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.