Scripting Bridge

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Scripting Bridge - Presentation Transcript

    1. Scripting Bridge tell every application to objc_msgSend() Jonathan ‘Wolf’ Rentzsch http://rentzsch.com PSIG 111 Red Shed Software better necessarily means different
    2. App Interoperation • examples: “Reveal in Finder”, “Pause iTunes” • low-level: AppleEvents; high-level: AppleScript • Standard Cocoa application interop technique: • Embed an AppleScript, execute via NSAppleScript • Lame: • Slow • AppleScript logic separated from app (ObjC) logic Red Shed Software better necessarily means different
    3. Scripting Bridge • Scripting Dictionary -> Objective-C bridge • Send AppleEvents by writing ObjC code • New in 10.5 Leopold • not to be confused with Bridge Support • Bridge Support => XML describing all Sys APIs. for Python+Ruby+F-Script+Nu • “Faster” than AppleEvents (not really) Red Shed Software better necessarily means different
    4. How It Works • sdef /Applications/iTunes.app • extracts Scripting dictionary as XML • sdp -fh --basename iTunes • generates iTunes.h • ObjC 2 code: properties galore • Add ScriptingBridge.framework to project • Make sure project is targeting 10.5 Red Shed Software better necessarily means different
    5. How It Works • #import \"iTunes.h\" • [SBApplication applicationWithBundleIdentifier:@\"com.apple.iTunes\"]; • [app playpause]; • Slow on first message send • parses target scripting dictionary Red Shed Software better necessarily means different
    6. Demo iTunes Playpause Red Shed Software better necessarily means different

    + rentzschrentzsch, 2 years ago

    custom

    517 views, 0 favs, 0 embeds more stats

    brief intro to 10.5's new Scripting Bridge framewor more

    More Info

    CC Attribution License

    Go to text version
    • Total Views 517
      • 517 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 9
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as innappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel

    Categories