Can we embed Apple script inside iphone appplication?

Discussion in 'iOS Programming' started by shweta13, Aug 11, 2008.

  1. shweta13 macrumors member

    Joined:
    Aug 7, 2008
    #1
    Hi all,

    Can we embed Apple script inside iphone appplication? If so how do we do it?
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    No. Applescript is not supported on the iPhone.
     
  3. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #3
    Not Applescript, but you can embed Javascript inside an app which can be run inside a UIWebView.
     
  4. shweta13 thread starter macrumors member

    Joined:
    Aug 7, 2008
    #4
    Hi,

    So we can send mails using javascript inside UIWebView?
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  6. shweta13 thread starter macrumors member

    Joined:
    Aug 7, 2008
    #6
    Hi,

    Sorry i dont kno javascript...can you please tell me how to use mailto: URL in javascript...i want to directly invoke "mailto" without the help of controls such as buttons etc...
     
  7. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #7
    Last time I did JavaScript, it was
    Code:
    location.href = "mailto:user@aol.com?subject=test&message=test";
    The mailto: URL on the iPhone opens the a new message form, it doesn't send an email. If you need to send an email without user interaction, you'll have to use a server somewhere to do that.
     
  8. Sbrocket macrumors 65816

    Sbrocket

    Joined:
    Jun 3, 2007
    Location:
    /dev/null
    #8
    Rather than use JavaScript, you can use -[UIApplication openURL:] to open a new mail in MobileMail.app. Keep in mind that is will terminate your own application.

    Code:
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@""mailto:user@aol.com?subject=test&message=test"]];
    
     

Share This Page