Professional Web Applications Themes

paramters and AppleEvents - Mac Programming

I'm having some trouble understanding adding parameters to apple events. I want to take this apple script line (done for Apple Mail): Tell newMessage set visible to true end tell which is the AppleEvent: core\setd{ data:true($$), ----:obj { form:'prop', want:'prop', seld:'pvis', from:obj { form:'ID ', want:'bcke', seld:69333648, from:'null'() } }, &csig:65536 } I want to turn this into an AppleEvent with it's paramters. // create the AppleEvent err = AECreateAppleEvent('core', 'setd', &targetDesc, kAutoGenerateReturnID, kAnyTransactionID, &theAE); How do I add the rest of the event, the paramters, to the AppleEvent theAE? I know about AEPutParamPtr and AEPutParamDesc. But I need to ...

  1. #1

    Default paramters and AppleEvents

    I'm having some trouble understanding adding parameters to apple
    events.

    I want to take this apple script line (done for Apple Mail):

    Tell newMessage
    set visible to true
    end tell

    which is the AppleEvent:

    core\setd{ data:true($$), ----:obj { form:'prop', want:'prop',
    seld:'pvis', from:obj { form:'ID ', want:'bcke', seld:69333648,
    from:'null'() } }, &csig:65536 }

    I want to turn this into an AppleEvent with it's paramters.

    // create the AppleEvent
    err = AECreateAppleEvent('core', 'setd', &targetDesc,
    kAutoGenerateReturnID, kAnyTransactionID, &theAE);

    How do I add the rest of the event, the paramters, to the AppleEvent
    theAE?

    I know about AEPutParamPtr and AEPutParamDesc.
    But I need to see how it's done in a situation like this.

    Thanks!!!!
    T
    Toot Guest

  2. #2

    Default Re: parameters and AppleEvents

    In article <com>,
    Toot <com> wrote:
     

    Use AEPutParamDesc to put, as a direct object, the
    "visible" (pVis) property (prop) of the CreateObjSpecifier(
    'bcke'
    // parent is the application itself, represented by an empty aeDescriptor.
    formUniqueID,
    // an aeDescriptor with the unique id of the message, as an int here.
    )

    Take a look at:

    <http://groups.google.com/groups?selm=oster-F4D4CE.22395010112000%40news.pacbell.net>
    David Guest

  3. #3

    Default Re: paramters and AppleEvents

    Toot <com> wrote:
     

    A good discussion of this sort of thing (how to translate a raw apple
    event in aePrint form into the instructions needed to form the same
    apple event by hand) is the chapter on apple events in my REALbasic
    book. It talks in terms of REALbasic commands, not AEPutParamPtr etc.,
    but it is obvious how to map between them. m.

    --
    matt neuburg, phd = com, http://www.tidbits.com/matt/
    AppleScript: The Definitive Guide
    http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
    Read TidBITS! It's free and smart. http://www.tidbits.com
    matt Guest

  4. #4

    Default Re: parameters and AppleEvents

    On Sat, 10 Jan 2004 05:51:52 GMT, David Phillip Oster <org>
    wrote:

    Thanks!
    What about the "data:true($$)"?
    I'm not sure what to do with that.

     
    >
    >Use AEPutParamDesc to put, as a direct object, the
    >"visible" (pVis) property (prop) of the CreateObjSpecifier(
    > 'bcke'
    > // parent is the application itself, represented by an empty aeDescriptor.
    > formUniqueID,
    > // an aeDescriptor with the unique id of the message, as an int here.
    > )
    >
    >Take a look at:
    >
    ><http://groups.google.com/groups?selm=oster-F4D4CE.22395010112000%40news.pacbell.net>[/ref]

    Toot Guest

  5. #5

    Default Re: parameters and AppleEvents

    In article <com>,
    Toot <com> wrote:
     

    Use: AEPutParamDesc keyAEData with an aeDescriptor of typeTrue

    (I've never used typeTrue, myself. I've only used typeBoolean, with a
    handle length 1, containing either 0 or 1. typeTrue looks like it wants
    a NULL handle.)

    An example is:

    <http://developer.apple.com/samplecode/Sample_Code/Overview/MoreIsBetter/
    MoreFinderEvents.c.htm>
    David Guest

Similar Threads

  1. Gridview Stored Procedure output paramters or return value
    By LehrSJ in forum ASP.NET Data Grid Control
    Replies: 3
    Last Post: December 21st, 02:25 PM
  2. AppleMail and AppleEvents
    By V.Vill in forum Mac Programming
    Replies: 6
    Last Post: December 18th, 08:06 PM
  3. Replies: 4
    Last Post: November 19th, 12:20 AM
  4. Web Service with complex paramters and return types
    By J.Marsch in forum ASP.NET Web Services
    Replies: 1
    Last Post: November 14th, 02:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139