Revision: 3850
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3850&view=rev
Author:   hofman
Date:     2008-05-05 12:29:32 -0700 (Mon, 05 May 2008)

Log Message:
-----------
Simplify mail applescripts.

Modified Paths:
--------------
    trunk/SKPDFDocument.m

Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m       2008-05-05 16:54:24 UTC (rev 3849)
+++ trunk/SKPDFDocument.m       2008-05-05 19:29:32 UTC (rev 3850)
@@ -901,33 +901,27 @@
     if ([mailAppName rangeOfString:@"Entourage" 
options:NSCaseInsensitiveSearch].length) {
         scriptString = [NSMutableString stringWithString:@"tell application 
\"Microsoft Entourage\"\n"];
         [scriptString appendString:@"activate\n"];
-        [scriptString appendString:@"set m to make new draft window\n"];
+        [scriptString appendFormat:@"set m to make new draft window with 
properties {subject:\"[EMAIL PROTECTED]"}\n", [self displayName]];
         [scriptString appendString:@"tell m\n"];
-        [scriptString appendFormat:@"set subject to \"[EMAIL PROTECTED]"\n", 
[self displayName]];
-        [scriptString appendFormat:@"make new attachment at end of attchements 
with properties {file: POSIX file \"[EMAIL PROTECTED]"}\n", fileName];
+        [scriptString appendFormat:@"make new attachment with properties 
{file:POSIX file \"[EMAIL PROTECTED]"}\n", fileName];
         [scriptString appendString:@"end tell\n"];
         [scriptString appendString:@"end tell\n"];
     } else if ([mailAppName rangeOfString:@"Mailsmith" 
options:NSCaseInsensitiveSearch].length) {
         scriptString = [NSMutableString stringWithString:@"tell application 
\"Mailsmith\"\n"];
         [scriptString appendString:@"activate\n"];
-        [scriptString appendString:@"set m to make new message window\n"];
+        [scriptString appendFormat:@"set m to make new message window with 
properties {subject:\"[EMAIL PROTECTED]"}\n", [self displayName]];
         [scriptString appendString:@"tell m\n"];
-        [scriptString appendFormat:@"set subject to \"[EMAIL PROTECTED]"\n", 
[self displayName]];
-        [scriptString appendFormat:@"make new enclosure at end of enclosures 
with properties {file: POSIX file \"[EMAIL PROTECTED]"}\n", fileName];
+        [scriptString appendFormat:@"make new enclosure with properties 
{file:POSIX file \"[EMAIL PROTECTED]"}\n", fileName];
         [scriptString appendString:@"end tell\n"];
         [scriptString appendString:@"end tell\n"];
     } else {
         scriptString = [NSMutableString stringWithString:@"tell application 
\"Mail\"\n"];
         [scriptString appendString:@"activate\n"];
-        [scriptString appendString:@"set m to make new outgoing message at 
beginning of outgoing messages\n"];
-        [scriptString appendString:@"tell m\n"];
-        [scriptString appendFormat:@"set subject to \"[EMAIL PROTECTED]"\n", 
[self displayName]];
-        [scriptString appendString:@"tell content\n"];
-        [scriptString appendFormat:@"make new attachment with properties {file 
name: \"[EMAIL PROTECTED]"} at after last character\n", fileName];
+        [scriptString appendFormat:@"set m to make new outgoing message with 
properties {subject:\"[EMAIL PROTECTED]", visible:true}\n", [self displayName]];
+        [scriptString appendString:@"tell content of m\n"];
+        [scriptString appendFormat:@"make new attachment at after last 
character with properties {file name:\"[EMAIL PROTECTED]"}\n", fileName];
         [scriptString appendString:@"end tell\n"];
-        [scriptString appendString:@"set visible to true\n"];
         [scriptString appendString:@"end tell\n"];
-        [scriptString appendString:@"end tell\n"];
     }
     
     if (scriptString) {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to