WWDC2003 Session 401
Transcript
Kind: captions Language: en testing hello do I get introduced I guess not done alright guys going to get me into trouble I'm south to going on the applescript product manager for Apple computer and thank you for coming here today thank you for coming to San Francisco thank you for being a part of this revolution that's going on right now and I really appreciate you being here and the applescript team appreciates it as well I first fell in love with Apple script back in 1992 when I got the developer CD and I saw that there was the ability for a normal Schmo to be able to make the computer do what I wanted it to do and the vision I had then the was to be able to create automation and workflows where I could take information from one program manipulate it move it to another program take that and move it to another program and build something and then the decade following that vision has not dimmed at all and matter of fact it has grown considerably as you saw today is the pinnacle of what we've been able to do with a new Xcode and Apple scripts integration as a peer language with Objective C and Java as a development language in the operating system it's unparalleled and what it can do now we have access into all the system API so you can call the command line we can do web services we have the interface and we can even control the UI elements of applications that aren't scriptable so it's been quite an adventure and it's progressing on and going even farther every day but instead of me giving you this overview i'm going to introduce someone who is new to the applescript team he's leading the team now he's doing an incredible job as you're seeing in Panther of delivering more and more tools and abilities to you are applescript customers so I'd like to introduce mr. Todd Fernandez and please come on up Todd [Applause] well good afternoon your clicker seems to be a little haywire today but eventually perhaps we'll get a slide with my name on it there we go alright well good afternoon welcome to session for one Apple script update itself starting like sex gracious introduction on pod fernandes on the relatively new Apple script engineering manager and I'm very pleased to be here with you today to talk to you and show you a lot of the great new work we've been working for panther now i know a lot of you who have been coming to WC for years and we've been working with Apple scripts for years they're probably wondering who I am and what I'm doing up here since for the last five years running Chris that's the nose has been presenting this session and in fact last year both presenters were named Chris so I'll tell you what I'm going to do to make everybody feel more comfortable you can call me Chris you know I'll response pod for its whatever so now we've gotten out of the way let's let's get started so here's our agenda go through a brief introduction I'll make sure it will bring everybody up to date on what's happened since the last time we were here together and then spend the bulk of the presentation going over the many new features and enhancements we've got cooking for Panther my this thing is really finicky all right so the first thing I want to do is go over the three things that I hope that you all take away from this session today first of all what are the changes that we're making in Panther for applescript secondly and more importantly how you can take advantage of them to improve your scripts and applications and something that Sal just was talking about in which I hope you saw in the keynote and the Steve use their first demo that all the changes we're making all the work that you're doing for your with your script enhancing your scriptable applications i'm hopefully there are people here with newly scriptural applications we really feel there's a lot of momentum building behind Apple script on Mac OS 10 and we hope that we can share our exciting with you during the session and the what I really want to do is thank all of you because the community is one of the things that makes apple stick Apple scripts so great and all the work we're doing combining with all the work you're doing to solve problems for our customers and so what I'd like to do I can't thank all of you personally but what I'd like to do is have Sal come back up here and give it a quick demo of a recently released application from a pioneer in the script book in scriptable design and layout workflows they just released a great new version of the flagship application and I like Sal to show you a little bit of what what you can do with quark xpress six combined with some of the great script of laps on Mac os10 so Sal thank you um this is the new quarkxpress six it's changed this idea that they're borrowing from our eye appt approach and the whole idea is you put things on the left and then it turns to text sentences they get published now actually one of the big things that's been happening this year besides apple script is the apple music store it's captivated the country is captivated the city is captivated Cupertino and I'm spending my entire paycheck buying songs and so I've gotten so many songs in my library now that I wanted to make some way to have a discography that keeps track of what artists i have gives me a little by little information about them and perhaps would list what tracks i've already purchased in which album so I know which ones to buy next and I wrote a little script for doing that with the new quark xpress 6 which is just introduced recently and it's running us natively on Mac OS 10 and the purpose of the app is really simple what I'll do is I'll just kind of scroll through here and find some people I like Julie London whoo Oscar Peterson i'll pick a track by him fish is great up take a little Reba McEntire and try something else Sheryl Crow a Stevie Ray Vaughn ok I'll picks them to him and what I want to do is create this discography now in QuarkXPress I have a template that I built myself this is the cover from my discography and I want to again get information from the internet a bio and a picture of the artists bring that down and then search the database and itunes for information i'm going to use the new script menu in quarkxpress choose build discography and the script will analyze what i have selected in itunes and then search for that artist on allmusic com it will get the profile of the artist and extract that and the artist picture from the page insert a new page put it into the court document size of Texas Calif it then it will go to the iTunes database find out what songs i haff I Reba McEntire get those pictures I the iTunes database add them in there and then lists all the slums underneath those pictures about what I have and does the same thing then for oscar peterson and we'll add a page for oscar and then get the pictures out and then put the songs in there so this shows the power and the connectivity of apple script that i can take some simple apps like this and put them together to build something for myself this has always been the vision of apple script and this will continue to be the vision of apple script whether it's a big multipurpose workflow for a big company or something small and simple like this so in a couple seconds I now have my discography that I can print and keep on my coffee table to amaze my friends and how much money I blow on music thank you [Applause] thanks very much so and I'd like to continue by going over the version history of Apple scripts so we're up to up to speed with where we are oh it's been a busy couple of years you're going to see a whole lot of releases we've done since the release of Mac OS 10 a little over two years ago we ship to Apple script 160 on inside with the initial release of Apple script of Mac OS 10 followed by version 1.7 with Mac os10 10.1 and for mac OS 9 as well women shipped a descrip 198 with the december 2001 developer tools and a series of updates after that culminating in apple script 183 which was a independent software update for both Mac OS 9 and Mac OS 10 last year at the conference we were talking about apple skip 19 which in fact we ship along with Jaguar maccalister 10 10.2 we ships a significant update late last year as apple script 19 dot one in the mac OS 10 10 point 2.3 update and then the script editor to and system events datas in with the december 2002 developer tools late last year so that brings us up to date with where we are with adil script and i'm pleased to announce today we're going to be shipping if the clicker will cooperate Apple script 192 with panther now you might look at the version over there and think well gosh they must not have been working very hard it's just a minor release but we're just converting conserving version numbers we in fact have done an awful lot of work which will go through now if we can actually get the clicker to work so let's dive right in and start talking about what we've been working on for Panther go through for four separate areas we're going to talk about some new formats for saving your scripts and applets along with the script ability enhancements touching nearly every component of the Apple script system there are a few changes to be aware of as you move to Panther for both scripts and your scriptable applications and then I'm going to touch briefly on Apple scripts to do so let's just jump right in so you might be wondering what are these new bundle formats and you might actually see them some day here all right well there are new alternative to the data and resource for format you're all familiar with they use a standard as the standard necklace chain packaging with script document file packages for compiled scripts and dot application bundles for applets and droplets of course they're supported by all the standard tool scripted or let's say compile and store scripts all can save and access scripts in the annapolis in these new format and in fact i know that a lot of you been asking for this for years oh it's a compile and store script can now create new applicant droplets in the new format yes thank you very much the team's work very hard on it however despite we in order to get some of these advantages there is a downside because the old apple script runtime and tools on earlier versions and mac OS 10 don't know anything about these new format these new formats do require Panther however if you do need your scripts to run on earlier versions of Mac OS can of course the old formats are still supported and still will be supported however there are some pretty significant advantages to these new formats that we make will make them worth your while to adopt it's in fact you can live with the lack of backwards compatibility they're more flexible Apple's can be moved easily across file systems even though the file systems don't know anything about resource Forks this makes it easy to store large chunks of data that your scripts depend on right as part of the script itself such as pictures or movies this also enables us to save persistent script attributes particularly inscription or two examples are the description for your script and the window bounds and location so every time you open your script again you don't have to drag it down and resize it just the way you like it now in fact script editors to the version that's in the Tampa Developer Preview doesn't yet do this but it will before we ship it stay tuned so so far they're talking about what these new formats means or scriptures what do they need for application developers so if you're an application if your application needs to interact directly with scripts and load and run them we have a set of new OS AAP is that support all the scripts file formats the new ones as well as all the old ones so we strongly encourage you to adopt these api's in your application the obvious pairs we have OS a load file and store file to load and store scripts and we have a pair of convenience methods that build on OS a load file and do with scripts what you need to do with them we think that these new OS AAP eyes will help you simplify your code make it easier to read maintain and of course you'll need to do this to sports a new bundle format so that's the new bundle format let's start going through all the enhances who made the script ability in cancer and as you can see from this list as I mentioned earlier we've touched almost every component in the system so let's start with script editor to which hopefully many of you have seen already we released the beta late last year as you know it's a Coco scriptable replacement for what we understand is the oldest remaining application that still shifts as part of Mac OS 10 but no longer so those of you have worked with it realize it's got some amazing new technology check this out unlike the technology built into this clicker it's got drag-and-drop it's got find and replace can you believe it it can work with scripts larger than 30 qk I don't know why anyone who wants to but you know if you do now you can and hey it's got undo now I'm sure no one in this audience would ever make a mistake when their coding their scripts but you know sometimes maybe the cat walks across the keyboard when you're getting coffee or something I don't know so it's there if you need it so more seriously though we're really excited about the this great new tool that we're providing for you and we what we're doing hopefully many of you saw the the demos and the sessions on the new Xcode IDE and what we're trying to do a script editor to is adopt some of the innovative new user interface elements that have gone into Xcode and we're going to continue to do that as we approach the final release of script editor to alongside with panther so one great enhancement I know you're all going to love is that we made open dictionary much faster in the new script editor you're not going to believe it there is a caveat however that I'll get you later when we get the changes to be aware of for you scriptable application developers out there however we told you about it last year so you shouldn't need to worry about it anymore and script editors who creates new applets in the bundle format that we just talked about however it will save existing applets in the same format that they're already in so that script editor too let's move on to folder actions as you know fuller actions are turned although it's not going to show up on the slide last year in mäkelä scan 10.2 we believe in Panther we've made them better than ever so the contextual menu and sliders back in Panther now of course that doesn't make it better than ever returns us to where we were with mac OS 9 but we've got a great new tool that we're really excited about that takes that we never had before we call folder action set up which again is slide ever there we go all right so full reaction set up shows you all of the attached folder actions on your system as a whole something you couldn't do before it also provides UI for enabling disabling attaching removing or individual folder action or script and that's something you couldn't do before either it wasn't possible to enable or disable an individual script that was part of a folder action but now you can further actions is in full rack and set up is in developed Panther Developer Preview but I do want to make you aware that the functionality that's in the Developer Preview is not complete for what we're going to ship in Panther it's already very useful I think you're going to like it but it's it's not complete now we've talked about polar actions let's move on to script menu we've got a lot of great new enhancements script menu make it even easier to use in fact you saw Steve was running it during the demo I'll start from the bottom because even unfortunately it's not enabled by default but it's very easy to install we're going to show that to you in a moment we've also added support for aliases including two remote machines and you put applications droplets documents almost anything you want in there and script name you will do the correct thing to open it or display it or whatever would be the appropriate thing we've also added some new ways to access what you've got stored in script menu if you select the folder it will open it for you and find her if you select the script while holding down the option key it will open it for you in scripture editors you can get right to editing your script we've also made it easier to work with script menu if you've got a lot of your own scripts previously you had all the library example scripts in the top of the menu and the user scripts now at the bottom we've now made it very easy to hide the library example scripts so it's easier to work with your own scripts and we've also had a great new feature that allows you to add a script specific to a particular application to script menu so that when you have that application frontmost those scripts show up beneath your user scripts so now I've been talking about all these things I'd like to actually show them to you and I'd like to ask Kim Bumgarner to help come up and help me show you the enhancements we made a script menu folder action script that or two and Panther thank you so the first thing we'd like to do is show you how easy it is to install it on your menu bar just notice that it's not in there by default and we'll just double click here and we'll double click there it is and you can see all the library example scripts are there but all you need to do is hide them and then you'll see just your user scripts which are the ones in your home your library scripts off your home directory so if you select the folder as I as I just mentioned will open implore you in finder and if you hold down the option key while selecting a script it will open it for you script editor so if you notice here if Kim will go back to script menu you see all the script editor scripts there so how do we do that if we go back to find her you'll see that the scripts are no longer there in script menu because script x32 is no longer frontmost but what if we want to have some finder specific scripts so all you need to do is in your library scripts folder create a folder called applications which you can see in finder window there yep and you see how to link the script editor and we just made a link to the finder example scripts of course you can make this these anything you want that you want to show up with liners front notes you just need to make the name of the alias to the folder whatever is in their match the name of the application that you want these scripts to show up for and now if we go back to script menu you'll see that all the finder scripts have shown up you can see each one has its own individual set this is an exciting feature I've been looking for this for a long time and hopefully all of you will find it useful as well so let's move on to folder action so as I mentioned the folder action contextual menu is back so if we select the folder hold down the control key you'll see we've got a couple of options there you can enable folder actions and let's start let's add one so attached a folder action through the desktop and let's just use one example a real guy I know we'll go down little while we're here flying from the demoing without a net all right choose okay that's how easy it is I just think that it actually is there an additive so we could remove it if we needed to or edit it mm-hmm all right well let's let's try one out we've actually got a folder action Steve mentioned this morning about the new built-in to version from postscript to PDF that's available in Panther we're to make use of that now using Apple script we've got a folder action attached with PDF output output folder there's a full script of people gets attached hood and if we drop this postscript file in there and a Suge long and you can see that our new item alert we just added to the desktop pops up to let us know we've got this new PDF that's just been created there and it's a handy file for this week nice map of San Francisco now we're here somewhere i'm not sure Gabbar yeah well we're all here right all right so I i mentioned that we've got this great new tool for action set up so let's let's show you that you can access it from the app application to Apple script menu or in folder in finder or just launched from the contextual menu as skin just did and as you can see you can enable and disable folder actions you can examine existing folder actions and see the attached the scripts that are part of them you can delete or remove attached script which is one and you can also delete entire folder action and of course add them you can also edit scripts directly from folder action set up to go to public either one hit edit script will open it for us and script editor so that's the new tool folder action step give it a try give us your feedback as I said we're still working on it you want to have some great new functionality to it and with that I'll turn it over to Tim to go over the new features in script editor tools great well thank you done good job alright very excited about this we're releasing a second beta here it's a conference in the Panther it should be out on your Panther Studios Todd mentioned and want to talk about a few things as Todd mention as well that it's no fun and that's really powerful we get a lot of functionality for free and he went through those so I'm just gonna go right in and talk about some of the new things with script ability of script editor itself and i'm going to type a little script here and what I'm going to do is I'm going to make a new document so I'm in script editor itself I don't need to tell another application because I'm scripting script editor itself so i'm going to make a new document and i'm going to set the content of the front document to now you'll notice if you are watching really carefully there was the little ellipses in there and so the type ahead and if i start typing here you'll see that it's not a little lip sees this is a new feature called code assistant not sure the name will stay the same could we use code says it's the same technology that we're using in Xcode so it's trying to guess what the thing is that I'm trying to type if i type an i or an SP in this case its lair criticals ooh it's expose junk-rated he got me okay don't hit thank you in this case it's not set up for display but I could bring up a list and choose which one I want and so I could figure out which one it is in this case let us play ballad was very sluggish I'm going to take this and we're going to say hello that's chill right scripters okay and hopefully I times that correctly and now it's what I've done is I'm going to tell it script that I could make it a document set the contents of that new document to this other script and now I'm going to tell it to execute so I'm going to execute the print document so we're going to compile that build and run and which bring a house key is a new window and in a display dial if it comes up right after that so I could use scripting and script the script editor itself that's a pretty cool thing that you could do and there's tons of things that you can do with that okay so let's close all those another thing that we can do I knew that another new feature is we've added this nav art again tated mention that we're trying to work with the tools group and use some of the same technology to save look and feel and so if I show the navigation bar it actually shows me a couple different things to have more pops up one is the different components that we have on the system in this case we just have the Apple script component and it's list our element so if i use our drag-and-drop i can drag into simple little script here and you'll notice now that it populates it so i can go to my global property or a global horrid property or to a different Handler and even more importantly as I'm moving around you'll notice up here that it's tracking which scripts are what element that I'm in which is great for really large scripts you can jump navigate very simply and find out where you are okay another of these another thing that really excited about not use all the time myself is under the window menu we've added a library window and when you bring this up it lists all of the I can put any scriptable application i'm using on a regular basis and so i can just simply go through here and select one like the finder and click on the Open dictionary and I could quickly get to the dictionary and find out any information I want about that so I can just double-click on it do the same thing look at the text edit and the other thing i could do is i said i can create a new script from here so if i click the finder and say make new script you can see that it automatically fills out the tail application block for me so i just i don't have to go type that every time which saves a ton of time i can do something like name of every you see it's the auto typing for me i can hit the complete key and i can type window and hit the complete key so it knows what i'm trying to type and let me do that so let's go ahead and run that in this case I don't have any windows open so let's go in here and add a few windows and i'll even minimize those it don't have to be open and we'll run this again and you can see down here another thing we've done is we consolidated the separate result window and event log and we put them all into a single window which makes it much simpler to use and keep with the theme that we're trying to do in the tools group as well all right so let's go ahead and close that now since the script error itself is scriptable what we're going to do is we can take advantage of that and we have these things are the contextual menus they're the same menus that are over here so you can use them now in two different ways you can come choose them from here or you can actually come in here and type something like name of every window and I could select these and usually modify our key to control key I can bring up the contextual menu and do a tell block so i can say let's do tell finder and it takes that bit of code and put it inside the tail blocks for me and we can run that we've already seen that but i could come in here and say oh let's make a set disk list to every gift okay now using that same script ability we can select this list and what I want to do is I want to iterate or repeat over every item in that list and do a little action so I select the bisque list go down the repeats and choose process every item and watch what will happen in the script itself it goes through it takes the list writes the script for substitutes that it gets ready for us just to put our action here for every item in that list now another another feature that we've added which I really use a lot because I do a lot of a lot of testing of scripting and we've added histories there's a result history and event log history you might have noticed that as I bring up a script window here I can type current date and run that and you'll see that the history shows up here and if I run it again I'll get a little bit of a different value and I can even compare that by selecting two of them and see what the difference is we're between that well I can come back to this script that ran a little earlier and now the nice thing is that i'll go ahead and close this window and you go you know i just did something in that script just a minute ago but I closed i sought to save it well during the you can just double-click and get back to the script that generated that result so you can go back / a lot there's a ton of other features and we're going to just keep improving this is that we're really excited about it and I'll bring Todd back up thank you back to slide please thank you one thing I neglected to mention earlier I want to let you know is in addition to shipping this new version of script editor in the panther Developer Preview we're also making it available to second beta for mac OS 10.2 and that's already available on Apple script website so so far we're talking about tools what about the apple script runtime and standard editions so we've made a lot of improvements there as well and before I show you this next slide I will warn you that my speaker training instructor would be horrified to see this slide but I really left it this way so you get us an idea of the scope of the number of changes that we've made in the standard edition so you might want to shield your eyes if in fact the clicker will work there we go so that's a lot of stuff up on the screen but I would like to highlight two things one then you choose color standard edition and that gives you a standard mäkelä skin color picker and returns you a list of the RGB values the second I'd like to highlight is the long list of new special folder enumerations we've added a path to if you want to get to the movies folder we've made it very easy to do that and in a portable way so it is very easy for you to give the script to somebody else it will work correctly on their system as well so let's talk about the absence of runtime as well we've made a lot of changes there also first of which I know that a lot of you going to be excited about applets now handle events first in first out so you can now write applescript cgi's fully excitement there all right we've made Unicode constants much more easy to use and we've made a number of enhancements to the date class which go over now taking to be excited about these two well first we added a short date string and the format of this string is controlled by the international panel and system preferences but more exciting I think might be that months can now be coerced to numbers and of course that means that months can be compared so you can write things like this all right so let's dive back into some tools stripped some events we release the data late last year with the new GUI scripting feature which I'll get to in a moment we've also made some number of other changes in the various suites that make up system events so in the system events sweet we've merged all the application classes from the other sweets into one in system event sweet and that class has gained a number of new properties including one related to the new GUI scripting feature disk folder file has also seen a number of improvements we've added a handful of new verbs and new classes including a new class called disk item which is which both file and folder inherit from so that if you want to see all files you can do that if you want to see all folders you can do that if you want to see all of both of them all the disk items we've made it very easy to do that we've also added the same set list of special folder properties to match path too so it doesn't matter whether your scripting using scripting addition or scripting system events and that brings us to the process of sweet which is where the new GUI scripting feature is you know i may just carry the keyboard with me actually work there we go yay so gooey scripting I'm sure a number of you have worked with the beta and that we released last year but I want to make sure the message gets clear gets through about what we think do we scripting 614 thanks so we believe there are two main uses for GUI scripting one is for automated GUI testing of applications and if you're interested in that you should come to John Comiskey session 3 11 on friday morning he's going to tell you all about it the second one is if you've got backward the monkey I was uh actually I don't know your neck stop standing so the second second use we see for inscription is you got a complicated work for you get a number of great scriptable applications to do what you're doing for your workflow and there's one application that's not scriptable or has one little alert panel that's not scriptable and all you need do is click OK and your entire workflow will be scriptable that might be a good problem the clean scripting might be able to help you solve however and I can't stress this strongly enough report every fraternity slide please it's not a substitute for object model script ability it's not so let's not get confused about that I'll go into more detail at why in a moment well practically speaking GUI scripting is part of the system that's prostitute is sweet there's a new UI element class that process now inherits from and it also has it as an element so that you can walk down the hierarchy of UI elements in an application and UI elements to just standard GUI widgets you're familiar with splitters radio buttons the ones there I've listed on the slide slide please so why is this just a good solution for object model script ability well there are four big limitations one is that disabled by default so that if you write a great GUI scripting scripts and you hand it off to somebody else well it's not going to run on their system until they set a specific obscure preference in system preferences what we recommend is that you actually add a check to your GUI scripting scripts that will tell the user why it's not going to run and tell them what they need to do so it will run so that's that's a resolvable problem however the next ones are a little bit more serious GUI scripting scripts are going to be extremely fragile when the applications UI changes because they're dependent on the ordering of the different UI elements on the window so that whenever the developer adds a new button a new textfield a new whatever which pretty much means every time they release a new version that you of the application your jewelry scripting script is going to break now if you're paying software testers to test your application they probably are going to be willing to put up with that but your customers aren't they really need object model scripting to protect them against this fertility another serious limitation is that gooey scripting scripts cannot control non-standard interface elements so if you're writing your own special widget that's not coco GUI scripting scripts aren't going to be out of control unless you do a lot of extra work to make to make it work with the accessibility API now I'm sure none of you use non-standard controls I'm sure you just drag them in your I be alpha palette but if you do GUI scripting won't work for your customers and a fourth limitation is that it's a GUI scripting does not work well with non-english languages this is primarily connected with keystrokes and keycodes we have some ideas of how to address this particular limitation but it's never going to be completely robust so what are the solutions to these limitations well you need optic model script abilities that if you're a script ER and you have an application that you need to use or want to use and it's not scriptable you should request object model script ability from the developer and if you're an application developer and you haven't made your application scriptable yet well you should come to the session on Thursday morning and find out how because your customers need and deserve object model script ability so that brings me to a completely new feature image events now okay then so what we can deconstruct the name here events well it sounds like system events and in fact it's also a faceless scriptable application like system event hang on Kim an image well you know you're working with images so it's actually a superset of color sink and image capture scripts ability so what can you do with image events well you can manipulate images and color sync profiles you can access image metadata you can add or change a profile you can rotate crops scale images and you can translate file formats so hang on I'll point to point actually so what we're excited about this we think those be very useful for workflows where you don't necessarily want to be launching all these you is to script your application you can just tell image events what you want to do with your images and do a lot of batch processing however the version of image events between your Panther Developer Preview is not functional yet the dictionary is there so you can definitely look at that in script editor and give us your feedback on the dictionary but you'll have to wait for the final release of Panther to see image events in all its glory thank you Tim the PDF workflow Steve talks a lot about PDF this morning in keynote and although this feature isn't actually new and Panther it was added in Mac OS 10 10 22.4 it's we think it's a great feature and we're going to actually show it to you a demo in a few moments it's documented on the Apple script website how to use it and what it allows you to do is to arbitrary processing of saves PDF files directly from the print dialog you can run any Apple script you want so you can do anything that Apple Store can do with the PDF file and I'll show you a couple examples what you need to do for your Apple scripts are using open handler to receive the references to the save files and when you create scripts or some of the other things that you can do to affect what the saved PDF file will do is just add these scripts and cop land full links to folders or anything else like that to a PDF services folder in your library folder and you can put this in your home directory library folder if you just want to see it yourself if you want to make it available to anyone using your machine you can put it in flash library and of course you can put it in network library as well one of the things we're very excited about and I think you can tell from hearing applescript mentioning all the earlier sessions is across Mac os10 we're seeing enhanced scripts ability to major major system applications such as address book finder I photo and mail and in fact we have two major newly scriptable apps in Panther the new ichat AV is scriptable and the new Xcode IDE is also scriptable and 10 in fact is going to demo that script ability in a session is Apple script studio session on Wednesday afternoon so we're very excited about this and we're going to continue to work with our colleagues you adding great new scriptable apps on necklace 10 and with that I'd actually like to show you the PDF workflow feature and tie it together with some of the great sketch of laps on necklace 10 we had demo three please so this is the webpage that documents the feature on the apple script web web page and I'll just show you what it looks like before we had this feature you bring up the print dialog when you use to here's the save as PDF button that Steve highlighted this morning we're going to make it even better so one of the things you can do well first of all we need to create a PDF services folder in our library our library folder let's just drag that over all right and one thing we can do is we can actually drag in an alias to a folder and that what that will fail to do is to copy the stay of tdf to that folder and we'll change the title of this alias because the name of whatever is in this folder is what will show up in the save save the PDF menu all right that's one thing you do another thing you do is drag applications in or alias excu them say you want to have it open and preview but what's most powerful is using Apple script of course which allows you to do almost anything let's just drag in the Apple scripts and I really like that name so let's go back to Safari and if we bring up the print dialog again you'll see that's a nice little save as PDF button is now and then you and you can see that you still can just save as PDF but you can also copy the PDF to that folder that we made and open it with preview or any Acrobat Reader whatever you want to add in here any application and then the script now what the script is going to do is actually receive the PDF file after creates it it's going to prompt me for a file name for it so it's the PDF workflow doc and when I click OK what it's going to do is save the file then ask address book for the names and email addresses for the members of a PDF reviewers group within address book and then create an tell mail to create a new message with this PDF files and attachment address to those recipients and you can see the new addresses of objects and this is just one small example of what you can do with this feature and combining it with other great scriptable applications go back to slides please can we get slides please thank you alright so we've been talking mostly about changes that affect scriptures there are also some significant enhancements of cocoa scripting for you application developers out there to improve the script ability in your application one great new enhancement is that you can now suspend and then resume the processing of the particular Apple evander script command that's being handled currently allows you to avoid having the script block on some long process in a particular application your scripting and also there's new API that allows you to access the the exact apple event that's being handled which means you can now set the return code for the apple event which allows you to get much better error handling in your scriptable applications you can also get direct access to parameters that crow prescription doesn't provide direct access to like a subject parameter and considering the ignoring and cocoa scripting now completely handles properties for you not to write any code and you get it for free so that brings us to the end of our list of script ability enhancements in Panther slide please so I now want to talk about the small number of things that you really need to be aware of if you move your applications and your scripts to Panther the first one is that with the new bundled format if you're using path to me in a bundled applet you will get a pass return to ends with a colon what this means is if your script is relying on getting the container the applet by just removing the last element in the past that logic is going to break of course it's pretty easy to fix you just remove the colon and the last element however if you're using a bundle what you really should do is use it as a bundle and store your reason beer the files that you are trying to access inside the bundling the contents Resources directory in which case you want the coal in there because you're going to have to add contents and resources so the next change is that we've changed the default behavior of offset of and I'll go into more detail in a moment this we also told you last year and we're reinforcing again this year that you should avoid implicitly encoded text types and again I'll go into a little bit more detail on for this slide the final one I alluded to this earlier and talking about the improved performance of open dictionary in script editor too we've got we're using a new API that only sees applications that have in a sample script enabled equals yes in there in Sochi list now we told you about this last year so we hope that all of your applications now have this setting but if they don't your application won't show up in the open dictionary list now of course your customers can still drag the application / script editor and can still browse through your application but if you want it to show up in open dictionary you will need to add the setting in your next release slide please so it up to Apple script 19 dot one offset of always considered case and ignore diet criticals this was in fact the opposite of the default in the app script runtime and in fact the scripting itions didn't honor ignoring and considering statements what we decided to do in alba script 1 99 dot to slide please it's make the default behavior match the apple script default so the system is more consistent and make sure that offset of honor is considering ignoring statements what this means is if your script what if your script depends on the old behavior you're going to need to add considering case and ignoring diet critical statements around your uses of offset of hang on okay get back to where there is one caveat however about a week and a half ago the underlying API that we use to implement ignoring diet criticals was changed on us so that in fact in the Developer Preview ignoring diet criticals won't work but we will fix this for panther next slide please so you need to avoid using implicitly included text I specifically type text and the reason is it's been capable of representing international characters and in fact you want to also avoid type c string a type E string not only can they not represent international characters they don't support full set of texts coercion we're deprecating them in Panther and we will remove them in a future release so you need to move off of these text types and what we suggest instead is they use type unicode text this 10 so those are the small number of changes you need to be aware others you move your scripts and apps to Panther and I just like to briefly mention alpha scripts to do I'm going to not feel too much of Tim thunder we definitely like to thank all of you for the great number of studio apps you've been writing it's really exciting to see all the new apps out there and in fact if you're interested in studio you may want to go to the migrating to Mac os10 session on Thursday morning I understand a representative from Pixar is going to be showing and talking about the studio application they use to move 300 of their users from a cliff 92 Mac os10 we're going to be shifting Apple scripts to do one about three it's in the developer preview and it's got a handful of new features a new property a couple of new event handlers and the major new feature which is very exciting in tins going to demo on Wednesday you can now write Apple scripts to do plugins for the new Xcode ide and as I mentioned Wednesday afternoon Tim will go through this in great detail so so you know you've been such a great audience and putting up with me up here instead of a crisp I thought I'd actually bring up a crisp talk to you about some of the things he talked about last year so Chris please come up [Applause] thank you God so that that doesn't look quite right could you thank you all right so last year so I please I was up here talking to you about all the nifty new stuff we're going to do over the following year that is to say bye now so how do we do well you know in theory there's no difference between theory and practice right so reality check time what we thought what we talked about last year was an XML replacement for the old AET resource format for dictionaries call def def we're going to have a new API called carbon scripting though make it much easier to make your application scriptable if you were writing in carbon we'd allow you to create scriptable plugins both for applications and as part of Apple script itself we are going to start moving away from four character codes for terminology and we're going to introduce a major new rev of Apple script itself called Apple script n so this year we have some good news we have some bad news and we have some slightly weird news so slide please so the good news first SDF actually shipped it's it's there it's usable we have a few clients and we've made a few improvements to SF the SF format itself and the SDP tool that that works with it in Panther and the cool thing about this is and this is one of the reasons we moved to xml in the first place is that we can actually make changes to the format without incredible pain and breaking everybody so it's all backward compatible and it all works we have a we have several internal clients now male I chat and I believe Xcode are all using FF to generate their terminology or scripting terminology in Panther that's very cool especially cuz it forced us to fix several things that were brought they were broken direct support in cocoa scripting is still coming for now you have to use SBP to turn your SF into a script tweet and script terminology file so we're working on that maybe Panther maybe not we're working on that okay next slide the bad news here's what didn't make it codeless terminology and apple script 10 now I want to be clear here is that we are still planning on doing these we haven't given up however they're not ready for primetime yet in fact they're not even really ready for late night hopefully next year I will have some good news on this slide instead all right next the weird news so carbon scripting you know the we really really like cocoa scripting we'd like to what it what it does for you we like the way it very neatly meshes with your application you have to put in very little effort to make your cocoa application scriptable and that's really what we wanted to emulate with carbon script date so it was supposed to be you know very much a parallel to cocoa scripting was built around object methods instead of views do these accessor functions which you largely had to write yourself and you know just do a lot more for you than the old object support that did so you know we thought about them you know we're looking at this will try and design and you look about at all the work and saying okay one we just like cocoa scripting and okay so have to write all the stuff and it could be just like social scripting and we have to test it and it's going to be just like cocoa scripting and we have to document it and it's going to be just like cocoa scripting what would happen if we just used cocoa scripting well you know we tried it and it actually works astonishingly well next no lie it really does what you do is you link in foundation kit which has all the scripting support you right objective-c classes that essentially front end all your scripting and they talk to your real carbon implementation and you add one line to your initialization and the pretty much just works so you can all you can do this you can use this to do scriptable plug-in system events does this today it's actually been doing them for several releases its all already documented and it also works on any version of Mac OS 10 you don't have to wait for Panther to use it there are some more details on this in session for 14 which I completely forget exactly what it is but go see that one making your carbon a carbon carbon and Coco application scriptable so you know this sounds this is pretty cool writing a note of it so it works it's documented there hang on a listen to the fine print next slide so first off this is not completely free there are significant runtime costs to this depending on if you do sort of the naive approach it can actually add several seconds to your application launch time there are ways around this however and we have we have some documentation prepared all for those the other thing is that writing glue to your existing application might be hard if you're up in depending on how your application is implemented of course you're probably going to have that problem no matter what kind of API we provided there's only so far we can we can pull you know a really old and crusty application design the other problems have to do with Coco scripting itself couple of scripting while it's you know pretty darn good is not perfect it's error handling is shall we say substandard however changes in pants they're correct a lot of that you can you can now get in sort of through the back door to do all the things the cocoa scripting won't do for you and you weren't able to do that Jaguar so you can at least fixing in yourself in the future we hope to improve Coco scripting so that it really does handle all this sort of thing correctly for you pretty much all of our attention in terms of making applications scriptable will be focused on Coco scripting next wake up oh yeah so summary so SF is here today use it it's you know it's night it's a lot nicer than writing script sweet script terminology or 80 resources by hand so please use it give us feedback karbonn scripting is Coco scripting so you know the solution is not for everyone so you know go to section 414 and then figure out whether or not this actually works for you it does work but it's not completely ideal and still to come Apple script encode looks terminology we're actually going to do this stuff for real at least that's my plan so that's it for me thank you very much come on back [Applause] alright I'd like to conclude what they referred through of some of the documentation resource we have available next slide please it's got a substantial reference library sisting of lots of different pieces I'm going to walk through one by one we've got a lot of updated content in a panther health center which you can see much of it is ready and in the developer preview and a little bit of idea about what we're planning for the future updating the language guide of course and we're planning to write a new book on scripting interface guidelines to give all of you who are making your application scriptable a better idea of how to make your application scriptable in a way that's going to be consistent across the platforms other applications so it's easier for customers to learn how to script your application slide please we're excited about it too so we've got lots of documentation for scripters of course the language guide is useful for application developers as well like slide please got lots of documentation for application developers whether your carbon or cocoa and of course we just learned that sometimes it doesn't matter next slide please lots of studio documentation fun we've got a series of technical notes about specific areas of apple scripts and related technologies next slide please and this particular reference includes links to the previous ones as well as a lot of other technical notes that you might find useful fine there's some technical q and a's where we've got questions that developers have asked over time and answers as well as a lot of sample code we've got the apple script website which is a great one stop shop it has links to many of the resources i just talked about there are lots of third-party websites perhaps maintained by some of you out there in the audience and we thank you for that there's the O'Reilly book as well as many other third-party books on apple script and they're more coming all the time so I just like to sum up by quickly going over what's next we're going to be shipping applicable one bot nine dots to in Panther and you have a version of that with the Developer Preview with lots of enhanced script ability and some great new tools and we'll be working on delivering applescript n to you after so what can you do with the developer preview it I'm sure many of you have picked up already well if you're an application developer you can test your application make sure it still works you can I hope take advantage of some of the enhancements to cocoa scripting we've referred to improve their handling of the script ability in your code in your application we strongly encourage you to adopt the new OS aapi so that your applications work with not only the old formats but also the new bundle format and definitely start writing terminology using SF as Chris explain we've got a couple of clients inside Apple and we'd like to have you join us if you're a scripter there with a few changes I talked about that you need to prepare your scripts for if they're affected and test them on Developer Preview to make sure that they'll run when you move to panther and with that we'll get to this kind of standard slide you some of the contacts course you knew almost fell now you've met me developer technical support and are the engineer who covers Apple scritch I'm Umbreon and Jason you know the necklace technology manager he's going to be up here shortly help around the QA fine we've got a great slate of sessions this week the order is a little bit weird but we're going to do the feedback form next actually on Wednesday morning so we hope to see you there we'd love to get your feedback on what you'd like what we talked about today what you see in the next couple days if you work with the developer preview what you'd like to see in the future we've got sessions on interactions with other important Apple technologies like quicktime of course the studio session making your application scriptable next slide and a set of sessions on Friday dealing with different aspects of using strips ability to solve different types of problems whether you're testing software or whether you're trying to make your life and assistant administrator much easier on Mac OS 10 you