Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Airlok apps

macrumors newbie
Original poster
Jul 25, 2011
4
0
what is wrong with this applescript in Xcode
Code:
   property textView : missing value
	property textField : missing value
    property textView1 : missing value
	property textField1 : missing value
    property textView2 : missing value
	property textField2 : missing value
  
    on mail1_(sender)
        set textFieldValue to textField's |stringValue|()
        set textviewvalue to textview's string()
    tell application "Mail"
        set theMessage to make new outgoing message with properties {visible:false, subject:textFieldValue, content:textviewvalue}
        tell theMessage
            make new to recipient at end of to recipients with properties {name:"example", address:"example@example.com"}
            send theMessage
        end tell
    end tell    
end mail1_
    
    on mail2_(sender)
       set textFieldValue1 to textField1's |stringValue|()
        set textviewvalue1 to textview1's string()
        tell application "Mail"
            set theMessage to make new outgoing message with properties {visible:false, subject:textFieldValue1, content:textviewvalue1}
            tell theMessage
                make new to recipient at end of to recipients with properties {name:"example", address:"example@example.com"}
                send theMessage
            end tell
        end tell    
    end mail2_
    
    on mail3_(sender)
       set textFieldValue2 to textField2's |stringValue|()
        set textviewvalue2 to textview2's string() 
        tell application "Mail"
            set theMessage to make new outgoing message with properties {visible:false, subject:textFieldValue2, content:textviewvalue2}
            tell theMessage
                make new to recipient at end of to recipients with properties {name:"example", address:"example@example.com"}
                send theMessage
            end tell
        end tell   
    end mail3_
 

mijail

macrumors 6502a
Oct 31, 2010
561
137
I'm sure the compiler will tell you.
If you already tried compiling, let us know the result.

Hint: make it easy for others to help you.
 

Airlok apps

macrumors newbie
Original poster
Jul 25, 2011
4
0
when i try to send the message i get:
Can’t get string {} of «class ocid» id «data kptr20059C01». (error -1728)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.