Go Back   The macosxhints Forums > OS X Help Requests > Applications



 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 04-17-2008, 02:22 AM   #8
mark hunte
MVP
 
Join Date: Apr 2004
Location: Hello London Calling
Posts: 1,617
Well I can help converting the Text or rtf file into webarchives.

Convert from rtf ( or you can change to txt )
Code:
tell application "Finder"
	
	set sourcePath to (choose folder with prompt "Please select the source directory")
	set sig_webAs to (items of folder sourcePath whose name extension is "rtf") as alias list
	
end tell
repeat with i from 1 to number of items in sig_webAs
	
	set this_item to POSIX path of item i of sig_webAs
	tell application "System Events"
		
		set sig_xml to do shell script "Textutil   -convert webarchive " & quoted form of this_item
		log sig_xml
		
	end tell
	
end repeat

Convert from webarchive to rtf or ....

Code:
tell application "Finder"
	
	set sourcePath to "Macintosh HD:Users:UserName:Library:Mail:Signatures" as alias
	set sig_webAs to (items of folder sourcePath whose name extension is "webarchive") as alias list
	
end tell
repeat with i from 1 to number of items in sig_webAs
	
	set this_item to POSIX path of item i of sig_webAs
	tell application "System Events"
		
		set sig_xml to do shell script "Textutil   -convert rtf " & quoted form of this_item
		log sig_xml
		
	end tell
	
end repeat
With these examples, Textutil will create the new file in the same directory as the orig. But if you look at the Man page you can see how to change that.

Also I have not had time to test the import, but you should note the is a "SignaturesByAccount.plist" file that may also need updating
__________________
"".
mark hunte is offline   Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.